arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.13041cs.CL
收藏

RAMP:用于循环深度语言模型高效预填充的循环自适应混合精度

RAMP: Recurrent Adaptive Mixed Precision for Efficient Prefill in Recurrent-Depth Language Models

University of Virginia(弗吉尼亚大学)

Ke Wan, Chen Chen

AI总结:

针对循环深度语言模型长上下文预填充的高开销问题,提出RAMP方法,通过循环深度早期用低精度计算、终端恢复高精度,在保持预填充质量的同时实现1.16倍加速与13.9%延迟降低。

摘要:

循环深度语言模型通过重复应用共享网络来优化内部表示,从而提升推理时的推理能力,但额外的循环计算也增加了推理成本。这种开销在长上下文预填充阶段尤为明显,此时完整输入序列会在循环深度中被重复处理。权重与激活量化为通过低精度算术加速该计算提供了自然途径,但重复应用量化计算会引入沿循环轨迹累积的数值扰动。我们系统分析了此类误差如何在循环深度中传播,结果表明,早期引入的量化误差会被后续更多循环步骤衰减,因此对最终表示的影响更小。匹配预算实验有力支持了这一预测,显示在循环深度中较早放置量化计算始终能获得最佳保真度。基于该见解,我们提出RAMP(Recurrent Adaptive Mixed Precision,循环自适应混合精度),其使用低精度权重与激活计算执行早期循环优化,并在终端优化时恢复高精度。在长达4K的上下文长度下,RAMP在保持接近全精度预填充质量的同时,在NVIDIA H100上实现了最高1.16倍的端到端首次预填充加速,对应延迟降低13.9%。

英文摘要:

Recurrent-depth language models improve inference-time reasoning by repeatedly applying a shared network to refine internal representations, but the additional recurrent computation also increases inference cost. This overhead is particularly pronounced during long-context prefill, where the full input sequence is repeatedly processed across recurrent depth. Weight-and-activation quantization offers a natural way to accelerate this computation through lower-precision arithmetic, yet repeatedly applying quantized computation introduces numerical perturbations that accumulate along the recurrent trajectory. We systematically analyze how such errors propagate across recurrent depth and show that quantization errors introduced earlier are attenuated by more subsequent recurrent steps and therefore have a smaller effect on the final representation. Matched-budget experiments strongly support this prediction, showing that placing quantized computation earlier in recurrent depth consistently yields the best fidelity. Based on this insight, we introduce RAMP (Recurrent Adaptive Mixed Precision), which performs early recurrent refinement using low-precision weight-and-activation computation and restores high precision for terminal refinement. Across context lengths up to 4K, RAMP preserves near-full-precision prefill quality while achieving up to 1.16x end-to-end first-prefill speedup on an NVIDIA H100, corresponding to a 13.9% latency reduction.

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

↑