arXiv:2604.18396cs.CL2026-04ACL

提出无需训练的高效早退出机制,解决大模型推理延迟难题

River-LLM: Large Language Model Seamless Exit Based on KV Share

  • 通过共享KV缓存实现逐令牌无损早退出
  • 实测推理速度提升1.53至2.16倍且保持生成质量
  • 适合需要低延迟推理的部署场景

大型语言模型在多个领域表现卓越,但推理延迟越来越高。早退出机制可通过动态跳过冗余层加速推理。然而,在仅解码器架构中,由于跳过层无法提供后续标记所需的历史状态,导致早退出效率受限。现有方案如重计算或掩码会引入显著延迟或严重精度损失,难以实现理论层减少到实际运行时加速的跨越。本文提出River-LLM,一种无需训练的框架,实现无损逐令牌早退出。该方法引入轻量级的KV共享退出路径,使骨干网络缺失的KV缓存可在退出过程中自然生成并保留,避免昂贵的恢复操作。同时,利用解码块内状态转移相似性预测累积KV误差,指导精准退出决策。在数学推理和代码生成任务上的大量实验表明,River-LLM实现了1.53至2.16倍的实际加速,同时保持高生成质量。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have demonstrated exceptional performance across diverse domains but are increasingly constrained by high inference latency. Early Exit has emerged as a promising solution to accelerate inference by dynamically bypassing redundant layers. However, in decoder-only architectures, the efficiency of Early Exit is severely bottlenecked by the KV Cache Absence problem, where skipped layers fail to provide the necessary historical states for subsequent tokens. Existing solutions, such as recomputation or masking, either introduce significant latency overhead or incur severe precision loss, failing to bridge the gap between theoretical layer reduction and practical wall-clock speedup. In this paper, we propose River-LLM, a training-free framework that enables seamless token-level Early Exit. River-LLM introduces a lightweight KV-Shared Exit River that allows the backbone's missing KV cache to be naturally generated and preserved during the exit process, eliminating the need for costly recovery operations. Furthermore, we utilize state transition similarity within decoder blocks to predict cumulative KV errors and guide precise exit decisions. Extensive experiments on mathematical reasoning and code generation tasks demonstrate that River-LLM achieves 1.53 to 2.16 times of practical speedup while maintaining high generation quality.

大模型推理早退出KV缓存加速

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。