River-LLM: KV 공유 기반의 원활한 대형 언어 모델 조기 종료
River-LLM: Large Language Model Seamless Exit Based on KV Share
April 20, 2026
저자: Yingtao Shen, An Zou
cs.AI
초록
대규모 언어 모델(LLM)은 다양한 영역에서 뛰어난 성능을 보여주고 있지만, 높은 추론 지연시간으로 인해 점차 제약을 받고 있다. 얼리 엑싯(Early Exit)은 불필요한 계층을 동적으로 우회하여 추론 속도를 높이기 위한 유망한 해결책으로 부상했다. 그러나 디코더 전용 아키텍처에서 얼리 엑싯의 효율성은 KV 캐시 부재(KV Cache Absence) 문제로 인해 심각하게 저하된다. 이 문제는 건너뛴 계층이 후속 토큰에 필요한 이전 상태를 제공하지 못하는 현상이다. 재계산이나 마스킹과 같은 기존 해결책은 상당한 지연시간 오버헤드를 초과하거나 심각한 정밀도 손실을 일으켜, 이론적인 계층 감소와 실제 월클락 속도 향상 간의 격차를 해결하지 못한다. 본 논문에서는 훈련 없이도 원활한 토큰 수준 얼리 엑싯을 가능하게 하는 River-LLM을 제안한다. River-LLM은 경량의 KV 공유 엑싯 강(KV-Shared Exit River)을 도입하여 엑싯 과정에서 백본의 누락된 KV 캐시가 자연스럽게 생성되고 보존되도록 하여, 비용이 큰 복구 연산의 필요성을 제거한다. 더 나아가, 디코더 블록 내 상태 전이 유사성을 활용하여 누적 KV 오류를 예측하고 정확한 엑싯 결정을 안내한다. 수학적 추론 및 코드 생성 작업에 대한 폭넓은 실험을 통해 River-LLM이 높은 생성 품질을 유지하면서 1.71배에서 2.16배의 실제 속도 향상을 달성함을 입증한다.
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.71 to 2.16 times of practical speedup while maintaining high generation quality.