Views
No views yet
[!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).
| Component | Method | Result |
|---|---|---|
| Text weights | HLWQ Q5 + torchao INT4 | 21.8 GB |
| Vision encoder | BF16 (full quality) | included |
| KV Cache | HLWQ Q3 (5.3x) | longer context |
| Reasoning | Claude Opus 4.6 distilled | high-effort |
| Metric | Value |
|---|---|
| VRAM | 22.8 GB (streaming loader) |
| Speed | ~24.9 tok/s |
| Download | 21.8 GB |
| Vision | ✅ Golden Gate Bridge |
| Compression | 2.9x |
| Quantized layers | 602 |




| GPU | VRAM | Fits? |
|---|---|---|
| RTX 4090 | 24 GB | ✅ |
| L4 | 24 GB | ✅ |
| RTX 5090 | 32 GB | ✅ |
| A100 | 40-80 GB | ✅ |
1pip install polarquant[all]
2polarquant chat TeichAI/gemma-4-31B-it-Claude-Opus-Distill --vision| Method | Bits | Compression | Max Context (4GB) |
|---|---|---|---|
| FP16 | 16 | 1.0x | 4K |
| HLWQ Q4 | 4 | 4.0x | 17K |
| HLWQ Q3 | 3 | 5.3x | 22K |
| HLWQ Q2 | 2 | 8.0x | 35K |
1@article{polarquant2025,
2 title={HLWQ: Hadamard-Rotated Lloyd-Max Quantization for LLM Compression},
3 author={Vicentino, Caio},
4 journal={arXiv preprint arXiv:2603.29078},
5 year={2025}
6}pip install git+https://github.com/caiovicentino/polarengine-vllm.git1from polarengine_vllm import HLWQModel
2
3model = HLWQModel.from_pretrained("caiovicentino1/Gemma-4-31B-Claude-Opus-HLWQ-Q5-Vision")
4print(model.generate("Hello, how are you?", max_new_tokens=100))1model = HLWQModel.from_pretrained("caiovicentino1/Gemma-4-31B-Claude-Opus-HLWQ-Q5-Vision", kv_cache_nbits=3)
2# KV cache now uses 5.3x less memory — fit longer conversations!
3print(model.generate("Explain quantum computing in detail.", max_new_tokens=500))polarquant bench caiovicentino1/Gemma-4-31B-Claude-Opus-HLWQ-Q5-Vision --ppl --chartpolarquant demo caiovicentino1/Gemma-4-31B-Claude-Opus-HLWQ-Q5-Vision --shareHLWQ Q5 (cos_sim > 0.996) > GGUF Q5_K_M (~0.99) at same size