arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.13778cs.LGcs.AI
收藏

ReplaySSM:缓存SSM输入而非状态

ReplaySSM: Cache SSM Inputs, Not State

Princeton University(普林斯顿大学);NVIDIA(英伟达公司)

Ze-Wei Liou, Harris Nover, Amey Naik, Andrii Skliar, Igor Shovkun, Ido Shahaf, Tri Dao

AI总结:

ReplaySSM通过缓存SSM输入而非状态,减少混合模型的状态内存流量,在vLLM中实现后可加速解码、提升吞吐量并降低精度损失。

摘要:

状态空间模型(SSM)维护固定大小的循环状态,但在每个解码步骤读写该状态会成为混合模型的瓶颈。这种急切的状态管理会导致大量状态I/O、低算术强度,使投机解码无法低成本回滚,并将状态量化误差传入后续循环更新。我们提出ReplaySSM,它展开循环以将状态表示为检查点和近期SSM输入的缓冲区,将输出计算与检查点更新分离。通过定期更新检查点,ReplaySSM避免了大多数步骤的状态写入,大致将主导状态内存流量减半。保留近期输入还使投机回滚成为缓冲区指针操作,无需具体化中间状态即可实现仅输出验证。这种分离还允许低精度检查点在大多数步骤服务输出计算,而高精度检查点服务循环更新,因此低精度副本的舍入误差永远不会进入后续更新。我们在vLLM中为Mamba-2和Gated DeltaNet实现了ReplaySSM,在服务批量大小为256时,它在四个混合模型上比调优后的vLLM基线将标准解码加速了1.20至1.47倍,在两个120B级模型上的吞吐量约为vLLM投机解码的1.8倍。与共享低精度检查点相比,分离的状态精度还降低了输出KL散度和下游精度损失。

英文摘要:

State-space models (SSMs) maintain a fixed-size recurrent state, but reading and writing it at every decoding step can bottleneck hybrid models. This eager state management causes large state I/O with low arithmetic intensity, leaves speculative decoding no cheap rollback, and feeds state quantization error into subsequent recurrent updates. We introduce ReplaySSM, which unrolls the recurrence to represent the state as a checkpoint and a buffer of recent SSM inputs. This separates output computation from checkpoint updates. By updating the checkpoint periodically, ReplaySSM avoids state writes on most steps and roughly halves the dominant state memory traffic. Keeping recent inputs also makes speculative rollback a buffer-pointer operation and enables output-only verification without materializing intermediate states. The same separation allows a low-precision checkpoint to serve output computation on most steps while a higher-precision checkpoint serves recurrent updates, so rounding error in the low-precision copy never enters later updates. We implement ReplaySSM in vLLM for Mamba-2 and Gated DeltaNet. At serving batch size 256, it accelerates standard decoding by $1.20$--$1.47\times$ over a tuned vLLM baseline across four hybrid models, and delivers about $1.8\times$ the throughput of vLLM's speculative decoding on the two 120B-class models. Separate state precisions also reduce output KL divergence and downstream accuracy losses compared with a shared low-precision checkpoint.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑