TL;DR
Convolutional Code Quantization (CCQ) is a novel post-training quantization method that compresses Large Language Models (LLMs) down to 2.0–2.75 bits per weight with minimal accuracy loss. By replacing slow, irregular vector quantization codebook lookups with hardware-friendly bit-shift operations, CCQ bridges the gap between high compression and high inference speed, enabling single-GPU deployment of massive models like DeepSeek-V3 and ERNIE 4.5.
What Problem Does This Paper Address?
As large language models scale to hundreds of billions of parameters, the financial and computational costs of serving them skyrocket. Quantizing models to 8-bit or 4-bit precisions has become standard practice to save memory, but pushing past the 3-bit barrier typically breaks down:
- Scalar Quantization (e.g., GPTQ, AWQ) rounds individual weights to the nearest integer. At 2 bits, the numerical space is simply too constrained to capture the model's complexity, leading to catastrophic accuracy drops.
- Vector Quantization (VQ) groups weights into vectors and maps them to a codebook of high-precision vectors. While VQ maintains high accuracy at 2 bits, it requires massive, non-contiguous codebook lookups during dequantization. This disrupts data locality, stalls hardware pipelines, and severely degrades inference throughput.
The authors introduce CCQ to break this accuracy-efficiency deadlock, delivering extreme compression without sacrificing hardware execution speed.
Methods
CCQ combines the mathematical elegance of convolutional coding theory with scalar quantization to build a lookup-free encoding space.
Key components of the methodology include:
- Convolutional Code Quantization: Instead of storing an explicit, arbitrary codebook, CCQ defines a convolutional encoding configuration $(L, N, S)$ where overlapping bits between adjacent states represent the weight vectors. This transforms a directed graph representation into a structured code table.
- Bit-Shift Decoding: Because of the mathematical structure of convolutional codes, decoding doesn't require memory lookups. Instead, the weights are reconstructed via fast, hardware-native bit-shifting operations (
>>), preserving data locality and maximizing GPU utilization. - Hybrid Encoding: To align arbitrary compression rates with standard hardware data types (like
INT8orINT16), CCQ alternates between different encoding configurations within a single weight group, packing seven numerical values into 16 bits to achieve an equivalent 2.28 bits per weight (bpw). - Code Cluster: To reach a true 2-bit representation, the authors apply uniform quantization to the convolutional codes themselves, mapping the encoding space into a tight 8-bit range that can be entirely resolved through linear arithmetic rather than indexing.
Datasets
The authors evaluated CCQ across a diverse suite of standard LLM benchmarks targeting different capabilities:
- Mathematical Reasoning: GSM8K, CMath, and MUSR (multi-step reasoning).
- Complex Tasks & Reading Comprehension: BBH (Big-Bench Hard) and DROP.
- General Multi-Task Language Understanding: C-Eval (Chinese) and MMLU.
No new datasets were introduced; evaluation relied on these established benchmarks to ensure a fair comparison against existing 4-bit and 8-bit baselines.
Key Insights and Ideas
- Lookup-Free Vector Quantization: The core "aha" moment is that you can get the accuracy benefits of vector quantization (mapping high-dimensional vectors to low-dimensional representations) without the memory-access penalties of a codebook by using the algebraic structure of convolutional codes.
- Exploiting Code Distributions: The authors observed that the code values generated by convolutional quantization naturally approximate a normal distribution. This makes them uniquely well-suited for uniform quantization (the Code Cluster step), allowing further compression down to 2 bits via pure computation.
- Repurposing Redundant Bits: When weight group sizes aren't perfectly divisible by the number of encoding states, the remaining bits are typically wasted. CCQ cleverly repurposes these redundant bits to store the group's quantization scale factors, eliminating scale storage overhead.
Key Results
CCQ was validated on two state-of-the-art flagship models: DeepSeek-V3 (671B) and ERNIE-4.5-300B-A47B.
- Extreme Memory Savings: CCQ compressed DeepSeek-V3 down to 184GB (2.06 bpw) and ERNIE 4.5 down to 89GB (2 bpw). This represents an approximate 70% reduction in model size compared to 8-bit baselines.
- Single-GPU Deployment: The 2-bit compression allowed ERNIE 4.5 to be deployed on a single NVIDIA H20 GPU, completely eliminating the inter-card communication overhead that typically plagues distributed inference.
- High Accuracy Retention: On DeepSeek-V3, the baseline 8-bit average score across benchmarks was 90.01%. CCQ at 2.06 bpw maintained an impressive 87.76%, avoiding the catastrophic accuracy collapse typical of standard 2-bit methods.
- Inference Speedups: In General Matrix-Vector Multiplication (GEMV) kernels, CCQ achieved up to a 2× speedup over VPTQ (a state-of-the-art vector quantization method) and closely matched the speed of standard 2-bit scalar quantization while delivering vastly superior accuracy.
Limitations and Future Work
Despite the strong results, the authors note that accuracy drops primarily occur in 5-shot C-Eval and MMLU tasks, which they attribute to minor instruction-following failures in the ultra-low-bit regime.
For future work, they propose loss-based dynamic bit allocation. For example, during testing, they found that keeping just the 6th Mixture-of-Experts (MoE) layer of ERNIE 4.5 at 4-bit precision while quantizing the rest to 2-bit CCQ recovered significant accuracy. Systematically identifying and protecting these critical layers is a promising research direction. They also plan to explore extending this framework to other coding theories and co-designing runtime permutation strategies to further optimize memory-bound operations.
Summary updated