arXiv:2608.28003cs.LGcs.AI2026-08

针对大模型量化,精准分配每层比特数以提速不损质。

A Method for Layer Bit-Width Allocation in LLM Quantization via Performance Maximization Under a Quality-Degradation Constraint

论文配图:A Method for Layer Bit-Width Allocation in LLM Quantization via Performance Maximization Under a Quality-Degradation Constraint
图 1 · 摘自论文原文
  • 按层分组动态分配比特,结合激活直通模式优化性能。
  • 在短上下文下注意力层量化反致延迟上升,需特别处理。
  • 实测最高提速19.1%,适合追求推理加速的部署场景。

本文针对Gemma-3-1B提出一种基于质量退化约束的层比特位分配方法,目标是在允许的质量损失范围内最大化性能(降低延迟)。与传统均匀量化或无实证加速效果的方法不同,该方法利用先前工作SA-PTQ得到的层敏感性分析,在TensorRT-LLM中采用激活直通模式,对各层以块为单位独立确定精度(如5+5、10+10、all26),区分前馈网络(FFN)、注意力(Attention)和lm_head对整体加速的贡献。在RTX 5090上测试了13种W8A8变体。结果表明:对于FFN和lm_head,量化/反量化开销被整数运算优势抵消;但在短上下文下,注意力层量化反而增加延迟。为此手动实现了SmoothQuant以适配TensorRT-LLM,因原生导出失败且lm_head不可用。综合三类指标后最优方案为FFN 5+5 + lm_head,实现11.0%延迟下降,质量损失极小(Top-1一致率98.90%,困惑度升高0.85%)。若接受一定质量损失,采用FFN all26 + lm_head可获最高19.1%加速。建议后续优化包括:融合注意力内核(INT8)、KV缓存量化、采用FP8替代INT8,以及类比FFN的局部注意力量化。

原文摘要 · Abstract (English)

This paper proposes a layer bit allocation method for Gemma-3-1B, formulating the problem as performance maximization (latency decrease) given a degradation budget constraint (allowable level of generation quality loss). This approach is different from time- and resource-consuming uniform layer quantization methods that are used in the literature (like GPTQ or AWQ) or allocation methods without proven performance-accelerating effect (like MixLLM or TorchAO). The layer sensitivity profile resulting from our prior work SA-PTQ is applied using the activation pass-through mode inside TensorRT-LLM. For each layer precision is determined individually in blocks, according to a grouping introduced in the prior step (5+5, 10+10, all26), differentiating the contribution of FFN, Attention, and lm_head to the overall speedup. The clock speed was measured for 13 W8A8 variants on an RTX 5090. We find that for FFN and lm_head the time cost of quantization/dequantization is compensated for by the use of integer arithmetic, while for short context lengths, the opposite holds true for Attention: an additional step of quantization slows execution down. We propose a manual implementation of SmoothQuant for TensorRT-LLM which was necessary due to export failures, unavailable for lm_head. The best solution found under joint consideration of all three criteria with minimal degradation was FFN 5+5 with lm_head, providing an 11.0% reduction in latency with negligible quality loss (98.90% Top-1 agreement, +0.85% perplexity degradation). With acceptable quality loss for FFN all26 + lm_head, a speedup up to 19.1% was found possible. We suggest further optimizations: fused attention kernels in INT8, KV-cache quantization, using FP8 instead of INT8 and partial Attention quantization analogous to FFN.

量化大模型推理加速张量流

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。