PACE: Periodic and Channel-Aligned Encoding of Four-Bit Recurrent States
作者: Patrick Haller, Filipe Laitenberger, Alan Akbik
分类: cs.CL
发布日期: 2026-10-21
备注: 11 pages, 6 tables, 7 figures
💡 一句话要点
提出PACE以解决四位递归状态量化精度不足问题
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)
关键词: 四位量化 线性注意力 递归状态 模型优化 自然语言处理
📋 核心要点
- 现有的状态量化方法在生成每个标记后进行四位量化,导致精度损失,尤其是在低位宽情况下。
- PACE通过减少量化频率,仅在每生成几个标记后进行一次量化,从而降低了状态中的误差累积。
- 在多个参数规模的混合模型上,PACE在内存使用上表现优越,且在解码速度上保持了优势。
📝 摘要(中文)
线性注意力语言模型在解码时保持固定大小的递归状态,现有状态量化方法在生成每个标记后进行四位量化,导致精度损失。本文提出PACE,一种后处理的四位状态量化器,减少了量化频率,从而降低了状态中累积的误差。PACE通过在每列中共享量化尺度,并将保留误差的头部设置为八位,显著提高了模型在内存使用和解码速度上的表现。实验结果表明,PACE在多个模型上与现有方法相比具有竞争力。
🔬 方法详解
问题定义:本文旨在解决现有四位状态量化方法在生成每个标记后进行量化所导致的精度损失问题。现有方法在低位宽下表现不佳,尤其是在模型未经过微调时。
核心思路:PACE的核心思路是减少量化频率,仅在生成几个标记后进行一次量化,从而降低状态中的误差累积。此外,PACE通过在每列中共享量化尺度来优化量化过程。
技术框架:PACE的整体架构包括状态缓冲区、量化模块和解码模块。状态缓冲区用于存储生成的标记,量化模块负责在适当时机进行状态量化,解码模块则执行生成任务。
关键创新:PACE的主要创新在于减少量化频率和共享量化尺度,这与现有方法的逐标记量化方式形成鲜明对比,从而显著提高了模型的性能。
关键设计:PACE在设计中采用了四位和八位混合头部的策略,确保保留误差较长的头部使用八位量化,同时在内存使用上进行优化。
🖼️ 关键图片
📊 实验亮点
实验结果显示,PACE在四个不同参数规模的混合模型上表现出色,尤其在内存使用上仅为八位DAMP的三分之二,同时在相同内存下,PACE的四位头部模型在性能上超越了Q-Mamba,且保持了解码速度的优势。
🎯 应用场景
PACE的研究成果可广泛应用于需要高效内存管理和快速解码的自然语言处理任务,如机器翻译、对话系统和文本生成等领域。其优化的量化方法将推动更大规模模型的实际应用,降低计算资源需求。
📄 摘要(原文)
Linear-attention language models keep their context in a recurrent state of fixed size, where an inference system stores one copy of this state for every sequence it decodes at the same time. Storing the state at lower precision therefore lets more sequences share an accelerator. Existing state quantizers round the state after every generated token and report that four bits lose accuracy unless the bit width is raised or the model is fine-tuned.\par We introduce PACE, a post-hoc four-bit state quantizer. PACE rounds the state only once every few generated tokens, as chunked kernels already do once per chunk during prefill, and keeps the tokens generated in between in a small buffer. Rounding less often reduces the error that accumulates in the state. Additionally, we find that the large entries of the gated-delta state gather in columns, because some channels of the update written at each token remain large across many tokens. PACE therefore shares each quantization scale within one column. It also keeps the heads that retain rounding error longest at eight bits. On four hybrid models from 4B to 35B parameters, PACE with mixed four- and eight-bit heads is competitive with eight-bit DAMP on the three larger models at about two thirds of its memory, PACE with four-bit heads throughout scores higher than Q-Mamba at equal memory, and rounding every few tokens preserves the decoding speedup of the buffer.