[论文解读] Atom: Low-bit Quantization for Efficient and Accurate LLM Serving
Atom 引入低比特权重-激活量化(W4A4),具混合精度、细粒度分组量化、动态激活量化与 KV-cache 量化,以在最小精度损失的前提下提升 LLM 服务吞吐量;在端到端吞吐量方面,相对于 FP16 最高可提升至 7.73x,相对于 INT8 提升至 2.53x。
The growing demand for Large Language Models (LLMs) in applications such as content generation, intelligent chatbots, and sentiment analysis poses considerable challenges for LLM service providers. To efficiently use GPU resources and boost throughput, batching multiple requests has emerged as a popular paradigm; to further speed up batching, LLM quantization techniques reduce memory consumption and increase computing capacity. However, prevalent quantization schemes (e.g., 8-bit weight-activation quantization) cannot fully leverage the capabilities of modern GPUs, such as 4-bit integer operators, resulting in sub-optimal performance. To maximize LLMs' serving throughput, we introduce Atom, a low-bit quantization method that achieves high throughput improvements with negligible accuracy loss. Atom significantly boosts serving throughput by using low-bit operators and considerably reduces memory consumption via low-bit quantization. It attains high accuracy by applying a novel mixed-precision and fine-grained quantization process. We evaluate Atom on 4-bit weight-activation quantization in the serving context. Atom improves end-to-end throughput (token/s) by up to $7.7 imes$ compared to the FP16 and by $2.5 imes$ compared to INT8 quantization, while maintaining the same latency target.
研究动机与目标
- 在批处理和内存约束下,激发对更高 LLM 服务吞吐量的需求。
- 开发一种在现代 GPU 上利用 4 位权重-激活运算的量化技术。
- 通过混合精度、细粒度分组量化和动态激活量化来保持精度。
- 降低 KV-cache 的内存移动量,以进一步提升自注意力层的吞吐量。
- 提供一个具备硬件感知量化技术的端到端服务框架。
提出的方法
- 通过将异常值和正常值分离并重新排序激活以实现规则的内存访问,采用混合精度量化。
- 应用细粒度分组量化,按组量化以降低量化误差,同时实现高效融合。
- 在推理期间使用动态激活量化,为每个激活矩阵定制量化参数。
- 以低比特精度对 KV-cache 进行量化,以加速受内存限制的自注意力层,并将反量化与 FlashInfer 融合。
- 将量化和重新排序步骤融合到现有算子中,以最小化开销并利用低比特张量核心。
实验结果
研究问题
- RQ14 位权重-激活量化(W4A4)能否在大规模 LLM 上保持接近 FP16 基线的准确性?
- RQ2在服务场景中,Atom 的低比特设计对密集层和自注意力层的吞吐量影响有多大?
- RQ3混合精度、分组量化、动态激活量化和 KV-cache 量化如何共同影响总体精度与吞吐量?
- RQ4在现实工作负载下,使用 Atom 的端到端服务在大批量情况下是否能够有效扩展?
主要发现
- 在相同内存约束下,Atom 在端到端吞吐量上相对 FP16 提高最多 7.73x,相对 INT8 提高 2.53x。
- 在 W4A4 下的 Llama 模型上,Atom 的困惑度与 FP16 相近(如 WikiText2 的困惑度接近 FP16,同時在若干设置中优于基线)。
- 在零-shot 评估中,W4A4 的 Atom 通常在多个任务上胜过其他权重-激活量化基线,减少相对于 FP16 的准确性损失。
- 端到端延迟在不同批量大小下保持具有竞争力或优于 FP16/INT8,实用批量下 Atom 提供更低的延迟。
- 4 位权重-激活量化使 KV-cache 内存显著减少,提升自注意力吞吐量,同时并未显著牺牲精度。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。