arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2602.11812cs.AI
收藏

通过熵引导表示预测LLM输出长度

Predicting LLM Output Length via Entropy-Guided Representations

King Abdullah University of Science and Technology (KAUST)(阿卜杜拉国王科技大学);Provable Responsible AI and Data Analytics (PRADA) Lab(可验证负责任人工智能与数据分析实验室);Mohamed bin Zayed University of Artificial Intelligence (MBZUAI)(穆罕默德·本·扎耶德人工智能大学)

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

AI总结:

本文提出熵引导标记池化和渐进长度预测方法,有效减少LLM推理中的计算浪费,提升吞吐量。

摘要:

序列长度的长尾分布导致LLM服务和强化学习采样中存在大量计算浪费,由于批量推理中的过度填充。现有方法依赖辅助模型进行静态长度预测,但存在高开销、泛化差和无法处理随机'一对一多'采样场景的问题。我们引入了一个轻量级框架,重用主模型的内部隐藏状态进行高效长度预测。该框架包含两个核心组件:1) 熵引导标记池化(EGTP),利用即时激活和标记熵实现高精度静态预测且成本极低;2) 渐进长度预测(PLP),在每一步解码中动态估计剩余长度以处理随机生成。为验证我们的方法,我们构建并发布了ForeLen,一个包含长序列、思维链和RL数据的综合基准。在ForeLen上,EGTP实现了最先进的准确性,将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.

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

↑