caiovicentino1/Qwen3.5-9B-PolarQuant-Q5

Model

3

stars

26

commits

1

repos using this model

2

linked in READMEs

Apr 13, 2026

updated

compressed-tensors
conversational
endpoints_compatible
hlwq
image-text-to-text
int4
marlin
quantized
qwen3_5
safetensors
text-generation
transformers
vllm
Browse cluster: Quantized Qwen Language Models

README

[!IMPORTANT] Naming notice (2026-04-10). The "HLWQ" technique used in this model is being rebranded to HLWQ (Hadamard-Lloyd Weight Quantization). The change is only the name; the algorithm and the weights in this repository are unchanged.

The rebrand resolves a name collision with an unrelated, earlier KV cache quantization method also named HLWQ (Han et al., arXiv:2502.02617, 2025). HLWQ addresses weight quantization with a deterministic Walsh-Hadamard rotation and Lloyd-Max scalar codebook; Han et al.'s HLWQ addresses KV cache quantization with a random polar rotation. The two methods are technically distinct.

Existing loaders that load this repository by ID continue to work without changes. Future model uploads will use the HLWQ name.

Reference paper for this technique: arXiv:2603.29078 (v2 in preparation; v1 still uses the old name).

Qwen3.5-9B — HLWQ INT4

Native vLLM. Marlin kernel. Zero plugin.

HLWQ Q5 preprocessing produces better INT4 weights than direct quantization — stored in CompressedTensors format for native vLLM inference.

Quick Start — vLLM (one command)

pip install vllm
vllm serve caiovicentino1/Qwen3.5-9B-HLWQ-Q5 --language-model-only --enforce-eager

That's it. No plugin, no pip install polarquant, no custom code.

Tested results:

GPUtok/s
A100 80GB168 tok/s (9B)
RTX PRO 6000 96GB44 tok/s (9B) / 18 tok/s (27B)

Quick Start — HuggingFace Transformers

pip install polarquant
import polarengine_vllm  # auto-registers with transformers
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("caiovicentino1/Qwen3.5-9B-HLWQ-Q5", device_map="auto", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("caiovicentino1/Qwen3.5-9B-HLWQ-Q5", trust_remote_code=True)

inputs = tokenizer("Hello!", return_tensors="pt").to("cuda")
out = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(out[0], skip_special_tokens=True))

Consumer GPU Compatibility

GPUVRAMWorks?Expected tok/s
RTX 40608 GBYES~20
RTX 3060/407012 GBYES~30
RTX 408016 GBYES~35
RTX 409024 GBYES~40
A10080 GBYES~168

Why HLWQ INT4 is Better

Standard INT4 (GPTQ/AWQ) quantizes weights directly — outliers cause errors.

HLWQ adds a preprocessing step:

  1. Hadamard rotation — distributes weight energy uniformly (eliminates outliers)
  2. Lloyd-Max Q5 — MSE-optimal quantization for the resulting Gaussian distribution
  3. Dequant → INT4 — the cleaned weights produce better INT4 than direct quantization
MethodPPL (lower = better)
BF16 baseline6.37
HLWQ → INT46.56
Direct INT46.68

Same speed as GPTQ/AWQ, better quality.

Important Flags

FlagWhy
--language-model-onlyQwen3.5 is multimodal — this skips the vision encoder (we only quantized text)
--enforce-eagerRequired on Blackwell GPUs (cc 12.0). Optional on A100/H100 (faster without it)

Contributors

caiovicentino1

26 commits

caiovicentino1/Qwen3.5-9B-PolarQuant-Q5

Model

3

stars

26

commits

1

repos using this model

2

linked in READMEs

Apr 13, 2026

updated

compressed-tensors
conversational
endpoints_compatible
hlwq
image-text-to-text
int4
marlin
quantized
qwen3_5
safetensors
text-generation
transformers
vllm
Browse cluster: Quantized Qwen Language Models

README

[!IMPORTANT] Naming notice (2026-04-10). The "HLWQ" technique used in this model is being rebranded to HLWQ (Hadamard-Lloyd Weight Quantization). The change is only the name; the algorithm and the weights in this repository are unchanged.

The rebrand resolves a name collision with an unrelated, earlier KV cache quantization method also named HLWQ (Han et al., arXiv:2502.02617, 2025). HLWQ addresses weight quantization with a deterministic Walsh-Hadamard rotation and Lloyd-Max scalar codebook; Han et al.'s HLWQ addresses KV cache quantization with a random polar rotation. The two methods are technically distinct.

Existing loaders that load this repository by ID continue to work without changes. Future model uploads will use the HLWQ name.

Reference paper for this technique: arXiv:2603.29078 (v2 in preparation; v1 still uses the old name).

Qwen3.5-9B — HLWQ INT4

Native vLLM. Marlin kernel. Zero plugin.

HLWQ Q5 preprocessing produces better INT4 weights than direct quantization — stored in CompressedTensors format for native vLLM inference.

Quick Start — vLLM (one command)

pip install vllm
vllm serve caiovicentino1/Qwen3.5-9B-HLWQ-Q5 --language-model-only --enforce-eager

That's it. No plugin, no pip install polarquant, no custom code.

Tested results:

GPUtok/s
A100 80GB168 tok/s (9B)
RTX PRO 6000 96GB44 tok/s (9B) / 18 tok/s (27B)

Quick Start — HuggingFace Transformers

pip install polarquant
import polarengine_vllm  # auto-registers with transformers
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("caiovicentino1/Qwen3.5-9B-HLWQ-Q5", device_map="auto", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("caiovicentino1/Qwen3.5-9B-HLWQ-Q5", trust_remote_code=True)

inputs = tokenizer("Hello!", return_tensors="pt").to("cuda")
out = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(out[0], skip_special_tokens=True))

Consumer GPU Compatibility

GPUVRAMWorks?Expected tok/s
RTX 40608 GBYES~20
RTX 3060/407012 GBYES~30
RTX 408016 GBYES~35
RTX 409024 GBYES~40
A10080 GBYES~168

Why HLWQ INT4 is Better

Standard INT4 (GPTQ/AWQ) quantizes weights directly — outliers cause errors.

HLWQ adds a preprocessing step:

  1. Hadamard rotation — distributes weight energy uniformly (eliminates outliers)
  2. Lloyd-Max Q5 — MSE-optimal quantization for the resulting Gaussian distribution
  3. Dequant → INT4 — the cleaned weights produce better INT4 than direct quantization
MethodPPL (lower = better)
BF16 baseline6.37
HLWQ → INT46.56
Direct INT46.68

Same speed as GPTQ/AWQ, better quality.

Important Flags

FlagWhy
--language-model-onlyQwen3.5 is multimodal — this skips the vision encoder (we only quantized text)
--enforce-eagerRequired on Blackwell GPUs (cc 12.0). Optional on A100/H100 (faster without it)

Contributors

caiovicentino1

26 commits