Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Predicting LLM Output Length via Entropy-Guided Representations

About

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.

Huanyi Xie, Yubin Chen, Liangyu Wang, Lijie Hu, Di Wang• 2026

Related benchmarks

TaskDatasetResultRank
Output Length PredictionForeLen LongSeq
MAE78.83
48
Output Length PredictionForeLen Reasoning
MAE111.2
32
Output Length PredictionForeLen RL
MAE95.24
32
Length PredictionForeLen RL 1.0 (test)
MAE88.52
16
Length PredictionForeLen Avg. 1.0 (test)
MAE122.5
16
Output Length PredictionLMSYS
MAE68.33
16
Length PredictionForeLen Reasoning 1.0 (test)
MAE145.8
16
Output Sequence Length PredictionWritingPrompts super-long sequences (> 17k tokens) OOD
MAE195.9
8
System Performance EvaluationLong Sequence
Throughput131.1
8
System Performance EvaluationReasoning
Throughput194.2
8
Showing 10 of 12 rows

Other info

Follow for update