NestMSQ: Nested Multi-State Quantization for Fast and Accurate LLM Prefill and Decoding
Simon Kurz, Sebastian Buschjäger, Basile Lewandowski, Lydia Y. Chen, Jian-Jia Chen
Abstract
Nested quantization of large language models embeds lower-precision models in the bits of a higher-precision one, so one checkpoint serves requests with different latency and accuracy needs without deploying a separate model for each precision. We present NestMSQ (Nested Multi-State Quantization), a post-training quantization (PTQ) method whose INT8 checkpoint provides 4-bit weights for speed and 8-bit weights for accuracy, each with low-bit activations for arithmetic-heavy long prefill (W4A4, W8A8) or with 16-bit activations for bandwidth-heavy low-batch decoding (W4A16, W8A16). The shared checkpoint can switch precision per request and between prefill and decoding without loading another model. During calibration, different weight and activation precisions give the four modes different layer inputs and rounding errors. Compensation-based PTQ offsets rounding errors by adjusting weights still to be quantized. Nested weight precisions already favor different adjustments, while varying activation precision also makes the modes evaluate these errors on different inputs. NestMSQ therefore calibrates each mode on its own inputs and keeps its preferred adjustments separate while choosing each INT8 weight jointly for all modes. Compared with sharing inputs and adjustments, this closes 73% of the W4A4 perplexity gap to a separately quantized model. Across two 8B models, the nested checkpoint stays within 1.3 average-accuracy points of separately quantized models in every mode. For single requests, W4A16 decoding after a W4A4 prefill keeps W4A4 speed and matches W4A16 accuracy on MATH-500. When long-input W4A4 prefill costs accuracy, W8A8 prefill with W4A16 decoding stays within 2.6 points of BF16 on three tasks at 1.96 to 2.61 times its output throughput. This flexibility extends to continuous-batching serving, where precision adapts as the number of parallel requests changes.
Create a lesson
Metadata
- Categories
- cs.LG, cs.CL
Related papers
Multi-Signal Internal-State Online Quality Monitoring for LLM Serving
Shared title terminologycs.LGYibo Zhao, Nengneng Yu, Sixian Xiong et al.
Structured Decoding of World States from Language Model Representations
Shared title terminologycs.LGBinwen Liu
PTQ-NAS-Bench: A Multi-Scheme Post-Training Quantization Benchmark for Hardware-Efficient Architecture and Scheme Co-Search
Shared title terminologycs.LGEleftherios Mylonas, Alexios Birbas, Angelos Kouprizas
Joint KV-Cache and Recurrent-State Quantization in Hybrid Linear-Attention LLMs
Shared title terminologycs.LGMinseok Shin
Mixing Expertise with Confidence: A Mixture of Experts Framework for Robust Multi-Modal Continual Learning
Shared title terminologycs.LGMd Abdullah Al Forhad, Yuansheng Zhu, Abhinab Acharya et al.
Strong EEG Decoding without EEG-Specific Pretraining: A Simple Reversible Interface for Vision Backbones
Shared title terminologycs.LGZi Liang, Haibo He, Peng Hu et al.