SmolLM3-3B GLQ 6bpw

SmolLM3-3B quantized to 6 bits per weight using GLQ (Golay-Leech Quantization).

Key Features

  • 6bpw -- 3-stage residual vector quantization (E8 lattice codebook)
  • 99.6% of bf16 quality on lm-eval 5-task benchmark
  • 2.5 GB model size (vs 6.1 GB bf16)
  • Block-diagonal FHT -- zero padding waste, honest bpw labeling

Quality (lm-eval 5-task)

Task bf16 GLQ 6bpw
arc_easy 0.7908 0.7824
hellaswag 0.5651 0.5618
piqa 0.7845 0.7802
winogrande 0.6685 0.6661
lambada_openai 0.6592 0.6645
Average 0.6936 0.6910 (99.6%)

Usage

pip install glq
import glq.hf_integration
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(
    "xv0y5ncu/SmolLM3-3B-GLQ-6bpw",
    device_map="cuda",
    dtype="float16",
)
tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM3-3B")

inputs = tokenizer("The capital of France is", return_tensors="pt").to("cuda")
output = model.generate(**inputs, max_new_tokens=64)
print(tokenizer.decode(output[0], skip_special_tokens=True))

Requirements

  • transformers >= 5.0 (4.x has a weight loading bug that breaks small GLQ models)
  • torch >= 2.0
  • glq >= 0.2.8 (pip install glq)

How it works

GLQ uses the E8 lattice codebook (65536 entries) with Randomized Hadamard Transform (RHT) for incoherence processing. At 6bpw, three codebook stages are used:

  1. Primary E8 codebook (16 bits per 8-weight block = 2 bpw)
  2. Secondary E8 codebook on residual (16 bits = 2 bpw)
  3. Tertiary E8 codebook on residual (16 bits = 2 bpw)

Block-diagonal FHT decomposes non-power-of-2 dimensions into sums of powers of 2, eliminating padding waste. For SmolLM3-3B (hidden_size=2048), dimensions are already power-of-2 so there is zero overhead.

GPU Memory

bf16 GLQ 6bpw
Model weights 6.1 GB 2.5 GB
Inference (B=1) ~6.5 GB ~3 GB

License

Apache 2.0 (same as base model)


🔗 GLQ on GitHub: https://github.com/cnygaard/glq — if you like it, a ⭐ is appreciated.

Downloads last month
10
Safetensors
Model size
1B params
Tensor type
BF16
·
F16
·
I16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for xv0y5ncu/SmolLM3-3B-GLQ-6bpw

Quantized
(109)
this model

Collections including xv0y5ncu/SmolLM3-3B-GLQ-6bpw