English

BCJR-QAT: A Differentiable Relaxation of Trellis-Coded Weight Quantization

Machine Learning 2026-05-12 v1

Abstract

Trellis-coded quantization sets the current 2-bit post-training frontier for LLMs (QTIP), but pushing below the PTQ ceiling requires quantization-aware training, and QAT on a trellis is obstructed by the non-differentiable Viterbi argmax. We introduce BCJR-QAT, a relaxation that replaces the argmax with the BCJR forward-backward sum-product algorithm at temperature TT, producing a soft codeword equal to the Boltzmann expectation over trellis paths, exactly differentiable, recovering the hard QTIP code as T0T \to 0, and mathematically identical to the transfer-matrix computation for a 1D Ising-like spin chain. We contribute (i) a fused Triton kernel making BCJR tractable on a single consumer GPU (6.57×6.57\times speedup, fp32 parity); (ii) a quantitative drift-budget theory of when BCJR-QAT can escape the QTIP-PTQ Voronoi basin, verified across four experiments; and (iii) a positive empirical result on Llama-3.2-1B at 2 bpw under end-to-end forward-KL distillation: with the right schedule (skip the high-TT phase to avoid an overshoot we diagnose), single-layer BCJR-QAT beats QTIP-PTQ by 0.084\mathbf{-0.084} PPL on WikiText-2, and multi-layer compounding is super-additive.

Cite

@article{arxiv.2605.10655,
  title  = {BCJR-QAT: A Differentiable Relaxation of Trellis-Coded Weight Quantization},
  author = {Venugopalan Iyengar},
  journal= {arXiv preprint arXiv:2605.10655},
  year   = {2026}
}

Comments

26 pages, 4 figures, 4 tables. Code at https://github.com/Venugopalan2610/quant-2bit. Model weights and trajectory snapshots at https://huggingface.co/Venugopalan2610/BCJR-QAT-Llama-3.2-1B-2bit

R2 v1 2026-07-22T07:04:37.320Z