2-Bit Quantization: Up to 7.94% Accuracy Drop in Code Generation
Benchmarking shows a significant performance cliff for 2-bit quantized LLMs in coding tasks, with one study noting a 7.94% accuracy drop for Mistral-7B-Instruct-v0.2 compared to 4-bit, making 2-bit risky for production where accuracy is critical. While 4-bit can achieve 98.9% accuracy in coding, sub-4-bit quantization (like 2-bit) regresses sharply on most current architectures, particularly for complex reasoning and math benchmarks.
The top 3
- Code Generation's Steepest Accuracy Drops with 2-Bit Quantization: Aggressive 2-bit quantization can lead to severe performance degradation in code generation tasks. For instance, the 2-bit quantized Qwen3-14B model exhibited a notable 16-point accuracy drop on the IFEval benchmark, and Mistral-7B-Instruct-v0.2 was deemed "fundamentally broken" for logical code generation on HumanEval.
- Why 2-Bit Quantization Devastates Code's Logical Coherence: Code generation is uniquely vulnerable to aggressive 2-bit quantization due to its inherent need for precise syntax, strict logical consistency, and accurate representation of high-entropy programming language tokens. Extreme compression often corrupts these critical elements, leading to non-functional, syntactically incorrect, or logically incoherent code outputs.
- Code vs. Other Tasks: 2-Bit Quantization's Hardest Hits: Code generation, alongside mathematical reasoning, experiences some of the steepest performance degradation from 2-bit quantization, significantly more than open-ended generation, summarization, or language tasks. LiveBench data shows Q2_K models significantly reduce scores in coding and data analysis, while only slightly impacting instruction following.
Sources
Open the full topic