엔트로피 유도 표현을 통한 LLM 출력 길이 예측
Predicting LLM Output Length via Entropy-Guided Representations
LLM 서빙 및 강화학습(RL) 샘플링에서 나타나는 시퀀스 길이의 롱테일(long-tailed) 분포는 배치 추론 시 과도한 패딩으로 인해 상당한 연산 낭비를 초래합니다. 기존 방법들은 정적 길이 예측을 위해 보조 모델에 의존하지만, 이는 높은 오버헤드를 발생시키고 일반화 성능이 떨어지며, 확률적인 "일대다(one-to-many)" 샘플링 시나리오에서는 실패하는 경향이 있습니다. 우리는 효율적인 길이 예측을 위해 메인 모델의 내부 은닉 상태(hidden states)를 재사용하는 경량 프레임워크를 소개합니다. 이 프레임워크는 두 가지 핵심 구성 요소를 특징으로 합니다. 1) EGTP(Entropy-Guided Token Pooling)는 실시간 활성화값과 토큰 엔트로피를 사용하여 무시할 수준의 비용으로 매우 정확한 정적 예측을 수행하며, 2) PLP(Progressive Length Prediction)는 각 디코딩 단계에서 남은 길이를 동적으로 추정하여 확률적 생성을 처리합니다. 접근 방식을 검증하기 위해 우리는 긴 시퀀스, Chain-of-Thought, RL 데이터를 포함한 포괄적인 벤치마크인 ForeLen을 구축하고 공개합니다. ForeLen에서 EGTP는 최고 수준(state-of-the-art)의 정확도를 달성하여, 최고 성능의 베이스라인 대비 MAE를 29.16% 감소시켰습니다. 우리의 방법을 길이 인식 스케줄러와 통합하면 상당한 종단간 처리량 향상을 얻을 수 있습니다. 본 연구는 효율적인 LLM 추론을 위한 새로운 기술 및 평가 기준을 제시합니다.
The long-tailed distribution of sequence lengths in LLM serving and reinforcement learning (RL) sampling causes significant computational waste due to excessive padding in batched inference. Existing methods rely on auxiliary models for static length prediction, but they incur high overhead, generalize poorly, and fail in stochastic "one-to-many" sampling scenarios. We introduce a lightweight framework that reuses the main model's internal hidden states for efficient length prediction. Our framework features two core components: 1) Entropy-Guided Token Pooling (EGTP), which uses on-the-fly activations and token entropy for highly accurate static prediction with negligible cost, and 2) Progressive Length Prediction (PLP), which dynamically estimates the remaining length at each decoding step to handle stochastic generation. To validate our approach, we build and release ForeLen, a comprehensive benchmark with long-sequence, Chain-of-Thought, and RL data. On ForeLen, EGTP achieves state-of-the-art accuracy, reducing MAE by 29.16\% over the best baseline. Integrating our methods with a length-aware scheduler yields significant end-to-end throughput gains. Our work provides a new technical and evaluation baseline for efficient LLM inference.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.