TL;DR
EdgeRazor introduces a lightweight framework for compressing Large Language Models (LLMs) to sub-2-bit precision using Mixed-Precision Quantization-Aware Distillation (MPQAD). By dynamically selecting informative intermediate layers and balancing distillation objectives via teacher distribution entropy, it achieves state-of-the-art low-bit performance while slashing training costs by up to 10$\times$.
What Problem Does This Paper Address?
Deploying LLMs on resource-constrained edge devices requires heavy model compression, typically achieved via quantization (converting 16-bit weights to lower bit-widths). While 4-bit quantization maintains reasonable accuracy, pushing models down to ultra-low precisions (like 2-bit or 1.58-bit) usually causes catastrophic performance drops.
Existing solutions fall short: Post-Training Quantization (PTQ) degrades severely below 4-bits, while Quantization-Aware Training (QAT) requires prohibitive retraining budgets. Quantization-Aware Distillation (QAD)—which uses a full-precision "teacher" model to guide a low-bit "student"—offers a middle ground but currently relies on rigid, heuristic design choices. Specifically, current QAD methods use uniform bit-widths that ignore varying parameter sensitivities, rely on hardcoded teacher layers for feature alignment, and use distillation objectives restricted to narrow, teacher-generated datasets.
Methods
EdgeRazor addresses these limitations through three core architectural modules:
- Structural Quantization with Mixed Precision (SQMP): Instead of applying a uniform bit-width across the entire model, SQMP mixes 4-bit and 1.58-bit weight channels in a periodic "super-group" pattern. This deterministic layout mathematically minimizes the worst-case error caused by salience drift—the phenomenon where the most important weight channels shift dynamically during training.
- Layer-Adaptive Feature Distillation (LAFD): Rather than aligning a pre-specified, static set of teacher and student layers, LAFD uses a token-level cosine similarity metric to dynamically identify which teacher layers are actively performing the most significant feature transformations for a given input, concentrating the distillation signal where it matters most.
- Entropy-Aware KL Divergence (EAKLD): To align output probabilities, EAKLD dynamically balances mode-covering (forward KLD) and mode-seeking (reverse KLD) behaviors based entirely on the entropy of the teacher's output distribution. This removes the dependency on teacher-synthesized datasets, allowing the framework to seamlessly leverage diverse human-annotated data.
Datasets
- Training Data: The text models were trained on a diverse mixture of human-annotated and externally distilled instruction data, including BAAI/Infinity-Instruct, allenai/tulu-v3.1, and AM-DeepSeek-R1-Distilled-1.4M, combined with training splits from various commonsense reasoning tasks. The multimodal variant utilized the HuggingFaceM4/TGIF video dataset.
- Evaluation Benchmarks: Models were benchmarked across 14 domain-specific downstream tasks spanning commonsense reasoning (ARC, HellaSwag, BoolQ, PIQA, Winogrande, SIQA), reading comprehension (OpenBookQA), trustworthiness (Ethics), truthfulness (TruthfulQA2), knowledge (MMLU), instruction following (IF-Eval), mathematics (GSM8K), and coding (HumanEval). Video understanding was evaluated using Video-MME and MLVU.
Key Insights and Ideas
- Combating Salience Drift: In PTQ, important weight channels are static, allowing for straightforward mixed-precision allocation. However, in QAT/QAD, gradient updates cause important channels to fluctuate. EdgeRazor’s periodic super-group allocation acts as evenly spaced, high-precision buffers that decouple model performance from these unpredictable shifts.
- Layer Importance is Domain-Dependent: The authors discovered that different data domains transform entirely different intermediate layers (e.g., mathematical data heavily alters layers 17 and 18, while coding data modifies layer 2 more frequently). This proves that fixed-layer feature distillation is fundamentally inefficient for heterogeneous datasets.
- Entropy Over Confidence: Previous QAD methods balanced distillation using the teacher's confidence score on specific tokens, which causes severe mismatch errors on human-annotated data. Using the full entropy of the teacher's distribution makes the framework dataset-agnostic.
Key Results
- Sub-2-Bit Superiority: Under weight-activation quantization, the 1.88-bit Qwen3-0.6B-EdgeRazor outperformed state-of-the-art 2-bit baselines by 11.27 points and even surpassed the strongest 3-bit baselines by 4.38 points.
- Drastic Budget Reductions: When compressing MobileLLM-350M, EdgeRazor achieved superior performance while requiring a training token budget 4$\times$ to 10$\times$ lower than the leading QAT method, ParetoQ.
- Real-World Edge Acceleration: When deployed via
llama.cppon an Apple M4 Pro chip, the 1.58-bit Qwen3-0.6B-EdgeRazor reduced storage requirements from 1.11 GB to just 0.19 GB, while delivering a massive 15.16$\times$ decoding speedup over the 16-bit baseline.
Limitations and Future Work
- Multimodal Deployment Constraints: The multimodal projector feature remains experimental within the
llama.cppinference framework, meaning end-to-end edge deployment benchmarks for the multimodal Omni variant are not yet fully optimized. - Distillation Overhead: While the student model becomes incredibly lightweight, the training phase still requires running a full-precision teacher model in tandem, maintaining a high computational footprint during the distillation process itself.
Summary updated