RoleQ: Role-Aligned Scales for Converting Language Models to Ternary
Organizations: Harvard University · Georgia Tech
Abstract
Weight quantization below four bits shrinks memory and bandwidth at a perplexity that looks acceptable, but often at the cost of factual knowledge and task accuracy. Ternary weights have mostly been obtained by training from scratch or long fine-tuning. We introduce RoleQ, a quantization framework that places scales by the functional roles of Transformer units rather than by the layout of the weight matrix, as conventional formats do. Vectors that read from the residual stream take one scale per output unit; those that write to it, one per input unit. The rule is structural, needs no search, calibration or stored state, and holds on integer and ternary grids. In a rotated basis it matches a per-layer axis search at half the solver work, and at ternary it cuts perplexity by up to half against layout-based placement in two families at every size from 0.6B to 14B, where per-row scales leave MMLU at chance. Our lightweight post-training pipeline converts an existing checkpoint to 1.59 bits per weight in a few GPU-hours, a fraction of the cost of learned ternarization, and leads every post-training ternary method at matched or lower memory-resident bits on perplexity, zero-shot accuracy and MMLU, most widely on knowledge. A sparse second ternary plane placed by a per-unit Fisher saliency keeps the matmul multiplication-free and recovers what ternary loses first: at 8B, a fraction of a bit returns about half the MMLU that conversion costs, well ahead of random or Hessian-based placement at equal bits.
Figures & tables
| Method | Stage | claimed bpw | resident bpw | WT2 ppl | Zero-shot | MMLU |
|---|---|---|---|---|---|---|
| Qwen3-8B-Base fp16: 6.99 / 70.42 / 76.82 | ||||||
| one ternary plane | ||||||
| Qronos + HIP + MagR | PTQ | 1.58 | 1.591 | 22.80 | 46.67 | 25.93 |
| PT 2 -LLM | PTQ | 1.58 | 1.835 | 67.95 | 44.88 | 26.52 |
| PT 2 -LLM codes + our SD | +SD | 1.58 | 1.835 | 15.51 | 56.37 | 36.74 |
| RoleQ-T (ours) | PTQ | 1.585 | 1.590 | 22.42 0.22 | 50.39 0.09 | 33.32 1.48 |
| Qwen3-Base | ||||||
| Configuration | bpw | 0.6B | 1.7B | 8B | 14B | Llama-8B |
| fp16 | 16.000 | 12.66 | 9.39 | 6.99 | 6.38 | 6.30 |
| Ternary: per-OC | 1.590 | 387.2 34.0 | 222.3 8.0 | 35.47 0.52 | 37.89 0.65 | 114.4 8.6 |
| Ternary: per-IC | 1.590 | 1187 226 | 305.0 19.8 | 33.39 1.70 4 | 42.60 0.48 | 669.9 28.1 |
| Ternary: RoleQ (ours) | 1.590 | 351.9 21.8 | 136.2 8.8 | 31.28 0.77 4 | 25.25 0.34 | 58.13 2.29 |
| INT2-g128: per-OC | 2.156 | 79.87 1.65 | 37.87 0.45 | 13.11 0.08 4 | 10.90 0.05 | 49.7 14.0 |
| Configuration / Score | Total bpw | WikiText-2 PPL | 7-Task Zero-Shot Avg. | MMLU |
|---|---|---|---|---|
| One Plane | 1.590 | |||
| Hessian Weight | 1.988 | |||
| Random Units | 1.991 | |||
| Knowledge Fisher (Ours) | 1.990 | |||
| Full Precision (FP16) | 16.000 | 9.72 | 69.36 | 74.93 |
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Claimed | Resident | Trains? | Calibrates? | Scale axis | Source |
|---|---|---|---|---|---|---|
| RoleQ-T (ours) | 1.585 | 1.590 | SD of scales and norm gains | yes, C4 | role: readers per row, writers per column | – |
| Qronos + HIP + MagR | 1.58 | 1.591 | no | yes | per-OC, fp scale and zero point | rerun |
| PT 2 -LLM | 1.58 | 1.835 | no | yes | per-OC g128, scale and shift | rerun |
| QTEA | 1.70 | 2.26–2.28 | no | yes, WT2 | per-OC g128 + FP8 residual (1:4 sparse) on salient columns | rerun 8B; ckpt 14B |
| CAT-Q | 1.58 | 1.71 | learned ternarization, 60 epochs | yes, C4 ( ) | per-row g128 | ckpt |
| TWLA | 1.58 | 4.15–4.65 | rotation, fit to weights | yes (GPTQ) | per-(row, g128) , saliency masks, second plane on 26% (code, not paper) | rerun |
| Method | Term | bpw | Resident? | Total |
| RoleQ-T | ternary codes, | 1.585 | yes | |
| one fp16 scale per unit, | 0.0039 | yes | ||
| reintroduced norm gains | 0.0007 | yes | ||
| sign vector per layer | yes | |||
| / / , folded into the weights | 0 | no | 1.590 | |
| RoleQ-T-g128 / per-OC g128 | + ternary group scales, | 0.125 | yes | 1.710 |
| Models | Qwen3-0.6B / 1.7B / 8B / 14B-Base; Qwen3-1.7B / 8B post-trained; Llama-3.1-8B-Base; Llama-3.1-8B-Instruct (Table 10 ) |
|---|---|
| Calibration, paper draw | 512 C4 sequences 512 tokens; standard draw for rows that match a competitor’s protocol and for Llama-3.1-8B-Instruct; post-trained models: 272 chat sequences up to 1536 tokens, half UltraChat, half self-generated |
| Calibration seeds | 45 and 46 on every cell of ours; 47 and 48 added where a cell says four seeds |
| Solver | GPTQ with act-order, damping 0.01 of the mean Hessian diagonal, lazy block 128; exact per-vector ternary step; reader refit in the metric |
| Rotation | recipe: (l4) (opt) (block 1024); ablations and placement controls: random Hadamard |
| Scale distillation (SD) | 400 steps, batch 8, learning rate , KL to the cached fp teacher, 3,200 RedPajama-1T-Sample windows of 512 tokens; scales and norm gains only, codes frozen; 2 h at 8B on one A100 |
| Perplexity | WikiText2 test at 2048 tokens |
| (a) ternary | 0.6B | 1.7B | Qwen-8B | 14B | Llama-8B |
|---|---|---|---|---|---|
| RoleQ | 351.9 ±21.8 | 136.2 ±8.8 | 31.28 ±0.77 4 | 25.25 ±0.34 | 58.13 ±2.29 |
| per-OC | 387.2 ±34.0 | 222.3 ±8.0 | 35.47 ±0.52 | 37.89 ±0.65 | 114.4 ±8.6 |
| per-IC | 1187 ±226 | 305.0 ±19.8 | 33.39 ±1.70 4 | 42.60 ±0.48 | 669.9 ±28.1 |
| writer half | 1.10 | 1.63 | 1.14 | 1.50 | 1.97 |
| reader half | 3.37 | 2.24 | 1.07 | 1.69 | 11.5 |
| best uniform | per-OC | per-OC | per-IC | per-OC | per-OC |
| Kind | RoleQ | Picks IC, rotated | Picks IC, unrotated |
|---|---|---|---|
| OC | 1 / 16 | 15 / 16 | |
| OC | 0 / 16 | 14 / 16 | |
| OC | 0 / 16 | 11 / 16 | |
| OC | 0 / 16 | 15 / 16 | |
| OC | 3 / 16 | 16 / 16 | |
| IC | 16 / 16 | 6 / 16 |
| Run | Basis | bpw | Stage | WT2 ppl | Zero-shot | MMLU |
|---|---|---|---|---|---|---|
| ternary body on the role axis | 1.590 | PTQ | 30.99 ±0.01 | 49.13 ±0.31 | 32.82 ±0.21 | |
| 1.590 | +SD | 12.07 ±0.04 | 59.40 ±0.35 | 45.88 ±0.87 | ||
| = RoleQ-T | recipe | 1.590 | PTQ | 22.42 ±0.22 | 50.39 ±0.09 | 33.32 ±1.48 |
| recipe | 1.590 | +SD | 11.33 ±0.06 | 60.33 ±0.27 | 47.59 ±2.72 | |
| + ternary group scales g128, per-OC | recipe | 1.710 | PTQ | 19.16 ±0.07 | 52.37 ±0.28 | 37.25 ±1.68 |
| recipe | 1.710 | +SD | 10.87 ±0.06 | 61.93 ±0.31 | 51.33 ±0.38 |
| Method | Stage | bpw | WT2 ppl ( fp) | Zero-shot (%) | MMLU (%) |
|---|---|---|---|---|---|
| QTIP 2-bit | PTQ + FT | 2.0065 | 8.83 (1.22) | 68.13 (90.6) | 59.93 (80.7) |
| GuidedQuant on QTIP, 2-bit | PTQ | 2.0 | 10.11 (1.40) | 66.29 (85.4) | 57.58 (75.2) |
| RoleQ-T + planes, recipe | PTQ | 2.0065 | 21.58 ±0.86 (2.98) | 57.86 ±0.31 (61.9) | 40.50 ±0.26 (35.8) |
| RoleQ-T + planes, recipe | +SD | 2.0065 | 11.06 ±0.06 (1.53) | 63.81 ±0.02 (78.5) | 51.02 ±0.63 (60.1) |
| RoleQ-T + planes, | PTQ | 2.0065 | 26.34 (3.64) | 55.75 (56.0) | 37.62 (29.1) |
| RoleQ-T + planes, | +SD | 2.0065 | 11.50 (1.59) | 63.09 (76.5) | 47.99 (53.1) |
| (a) WikiText2 perplexity | ||||||
| Model | Stage | planes | RoleQ-INT2-g128 | per-OC INT2-g128 | lead | gap range |
| Qwen-8B | PTQ | 11.43 ±0.02 | 11.79 ±0.01 | 11.88 ±0.03 | 1.032 | ∗ |
| Qwen-8B | +SD | 9.30 ±0.02 | 9.44 ±0.00 | 9.44 ±0.03 | 1.016 | |
| Llama-8B | PTQ | 13.58 ±0.05 | 17.42 ±0.15 | 17.21 ±0.40 | 1.27 | ∗ |
| Llama-8B | +SD | 9.59 ±0.04 | 10.25 ±0.04 | 10.22 ±0.05 | 1.065 | ∗ |
| (b) zero-shot average | ||||||
| Selector | PTQ | after SD | |
|---|---|---|---|
| loss-sensitivity scores | |||
| text Fisher (C4 windows) | 9.70 ±0.17 | 5.45 | |
| knowledge Fisher | 10.15 ±0.05 | 5.58 | |
| TaCQ score on the knowledge items | – | 10.30 ±0.19 | 5.59 |
| error-magnitude scores | |||
| activation norm | – | 13.71 | 5.73 |
| (a) Rotation | objective | slot 2 | weight-space | PTQ | +SD | |
| none | – | – | – | – | 1245.9 | 67.53 |
| random Hadamard | – | – | – | 119.8 | 23.70 | |
| , sparsifying (opt) | opt | – | – | 130.3 | 23.23 | |
| , flattening (l4) | l4 | – | – | 89.99 | 21.39 | |
| , TWLA’s tri-modal | trigmm | – | – | 158.4 | 24.81 | |
| opt | yes | 92.81 | 21.00 |
| Model, method | standard | paper | ratio |
|---|---|---|---|
| Qwen3-8B-Base, ternary body | 33.90 (4.85) | 30.32 (4.33) | |
| Llama-3.1-8B-Base, ternary body | 127.9 (20.3) | 56.95 (9.04) | |
| Qwen3-1.7B-Base, ternary body | 282.6 (30.1) | 119.8 (12.8) | |
| PT 2 -LLM on Qwen3-8B-Base, WikiText2 draw | 28.96 (4.14) | 25.73 (3.68) | |
| PT 2 -LLM on Qwen3-8B-Base, C4 draw | 84.49 (12.1) | 67.95 (9.72) |
LLM Quantization
Large language model quantization reduces numerical precision to lower memory use and accelerate training or inference.
See all 360 papers