Downloads · 30 days
116
17% of all-time downloads
xv0y5ncu/SmolLM2-135M-Instruct-GLQ-block-diagonal-4bpw
SmolLM2-135M-Instruct-GLQ-block-diagonal-4bpw is a text generation model from xv0y5ncu. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
GLQ (E8-lattice) 4 bpw quantization of HuggingFaceTB/SmolLM2-135M-Instruct, using a block-diagonal randomized Hadamard transform — no power-of-2 FHT padding, so the stored size matches the nominal rate (a genuine 4 bp…
Downloads · 30 days
116
17% of all-time downloads
All-time downloads
695
Public
Parameters
55.2M
113 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors111 MB · 97%
How the weights are stored.
BF1628.3M · 51%
From the Hugging Face model README
GLQ (E8-lattice) 4 bpw quantization of HuggingFaceTB/SmolLM2-135M-Instruct, using a block-diagonal randomized Hadamard transform — no power-of-2 FHT padding, so the stored size matches the nominal rate (a genuine 4 bpw, ~111 MB).
vs the earlier xv0y5ncu/SmolLM2-135M-Instruct-GLQ-4bpw: that checkpoint zero-padded non-power-of-2 dimensions up to the next power of two for the FHT, which inflated the effective rate to ~10 bpw (~191 MB). This block-diagonal version stores only the real weights — smaller, with an accurate bpw label. At equal storage, block-diagonal also yields higher SQNR, so it is a strict per-bit improvement.
GLQ and bf16 measured on the same stack (vLLM backend, transformers 5.x).
| Task | GLQ 4 bpw | bf16 | GLQ / bf16 |
|---|---|---|---|
| arc_easy | 0.4407 | 0.4899 | 90.0% |
| hellaswag (acc_norm) | 0.4178 | 0.4294 | 97.3% |
| piqa | 0.6545 | 0.6687 | 97.9% |
| winogrande | 0.5422 | 0.5107 | 106.2% |
| lambada_openai | 0.3846 | 0.4007 | 96.0% |
| average | 0.4880 | 0.4999 | 97.6% |
Tasks: arc_easy, hellaswag, piqa, winogrande, lambada_openai (acc_norm where available, else acc). Per-task ratios slightly above 100% are within lm-eval noise.
python -m venv .venv
source .venv/bin/activate
pip install 'glq[vllm]'
import glq.hf_integration # registers GLQ with transformers
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "xv0y5ncu/SmolLM2-135M-Instruct-GLQ-block-diagonal-4bpw"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, device_map="cuda", dtype=torch.float16)
ids = tok("The capital of France is", return_tensors="pt").to("cuda")
print(tok.decode(model.generate(**ids, max_new_tokens=20)[0], skip_special_tokens=True))
Serve with vLLM: vllm serve xv0y5ncu/SmolLM2-135M-Instruct-GLQ-block-diagonal-4bpw --quantization glq.
Apache 2.0. Original model: HuggingFaceTB/SmolLM2-135M-Instruct. Derivative quantization work; the base model and the GLQ tooling (github.com/cnygaard/glq) are both Apache 2.0.
🔗 GLQ on GitHub: https://github.com/cnygaard/glq — if you like it, a ⭐ is appreciated.