STEPQuant:在 Delta 規則遞迴狀態量化中,誤差何時與何處重要
STEPQuant: When and Where Errors Matter in Delta-Rule Recurrent State Quantization
September 29, 2026
作者: Bingchen Yao, Haobo Xu, Haokun Lin, Yichen Wu, Ziyu Guo, Renrui Zhang, Zhichao Lu, Zhenan Sun, Ying Wei
cs.AI
摘要
線性注意力以固定大小的遞迴狀態取代不斷增長的 KV 快取,然而這些持久狀態在並行服務下可能成為相當大的記憶體瓶頸。直接將遞迴狀態量化至低精度,往往會導致嚴重的準確度下降,因為量化誤差會透過連續的狀態更新傳播。我們發現這些誤差的影響取決於兩個互補的維度:在時間上,長生命週期記憶中的誤差會持續跨越許多解碼步驟;在空間上,不同鍵行中的誤差會對模型輸出造成不同影響,而狀態量值沿著行與列皆有顯著變化。受這些觀察啟發,我們提出 STEPQuant,一套針對 Delta 規則遞迴狀態的時空訓練後量化框架。STEPQuant 會根據誤差大小與記憶生命週期分配精度,並根據狀態分佈與鍵行對輸出誤差的影響,聯合擬合鍵行與值列的縮放尺度。在 Qwen3.8-27B 與 Kimi-Linear-48B-A3B-Instruct 上,跨長生成與短生成基準的實驗顯示,STEPQuant 在名義 6 位元預算下與 FP32 狀態準確度幾乎一致,且在其 4 位元配置下優於均勻 INT8。整合至 SGLang 並搭配經優化的 GPU 核心後,6 位元 STEPQuant 達到超過 5 倍的遞迴狀態壓縮,並將總服務記憶體降低最多 68.7%。我們的程式碼可在 https://github.com/Dreamer-Toby/STEPQuant 取得。
English
Linear attention replaces growing KV caches with fixed-size recurrent states, yet these persistent states can become a substantial memory bottleneck under concurrent serving. Directly quantizing recurrent states to low precision often leads to severe accuracy degradation, as quantization errors propagate through successive state updates. We discover that the impact of these errors depends on two complementary dimensions: temporally, errors in long-lived memory can persist across many decoding steps; spatially, errors in different key rows affect model outputs differently, while state magnitudes vary substantially along both rows and columns. Motivated by these observations, we propose STEPQuant, a spatial-temporal post-training quantization framework for Delta-rule recurrent states. STEPQuant allocates precision according to error magnitude and memory lifetime, and jointly fits key-row and value-column scales based on state distributions and key-row impact on output error. Experiments on Qwen3.8-27B and Kimi-Linear-48B-A3B-Instruct across both long- and short-generation benchmarks show that STEPQuant closely matches FP32-state accuracy under a nominal 6-bit budget and outperforms uniform INT8 in its 4-bit configuration. Integrated into SGLang with optimized GPU kernels, 6-bit STEPQuant achieves over 5x recurrent-state compression and reduces total serving memory by up to 68.7%. Our code is available at https://github.com/Dreamer-Toby/STEPQuant.