arXiv:2608.15592cs.AI2026-08

提升大模型输出长度预测精度,让推理更高效

When Entropy Is Not Enough: Reclaiming Lost Semantics in LLM Output Length Prediction

论文配图:When Entropy Is Not Enough: Reclaiming Lost Semantics in LLM Output Length Prediction
图 1 · 摘自论文原文
  • 融合熵与注意力重要性,更好捕捉关键语义信息
  • 在ForeLen基准上误差率更低,预测更准确
  • 轻量设计适合部署,可显著提升系统吞吐

高效的大模型服务常受限于序列填充至固定最大长度的开销,造成计算浪费和吞吐下降。提前预测输出长度可实现长度感知调度,降低资源消耗,尤其在长上下文推理和强化学习中效果显著。现有方法如基于熵的分词池化,仅依赖词元级熵,忽略语义内容差异,导致重要词元被低估、无意义词元被高估,影响预测可靠性。本文提出ESTP(Entropy-and-Semantic Token Pooling)框架,通过结合熵与自注意力权重计算的重要性分数,实现对不确定性和语义重要性的双重捕捉。该方法复用预填充阶段的激活值,几乎不增加内存开销,引入极低延迟。在ForeLen基准测试中,ESTP优于基线方法,多数场景下预测精度更高、误差更低。集成至端到端系统后,配合长度感知调度器,进一步提升整体吞吐并降低填充比例。结果表明,ESTP是构建高效长度感知大模型服务系统的有效实用组件。

原文摘要 · Abstract (English)

Efficient LLM serving is often bottlenecked by the need to pad sequences to a fixed maximum length, and this wastes compute and degrades throughput. Predicting output lengths in advance makes it possible to adopt length-aware scheduling, and this reduces the overhead. This advantage is especially pronounced in long-context reasoning and reinforcement learning applications. Existing approaches, such as entropy-guided token pooling, use token-wise entropy as their primary signal, but they tend to ignore differences in semantic content across tokens. So, important tokens are often underweighted, and tokens carrying little information receive disproportionate emphasis. This hurts the reliability of length prediction. We introduce ESTP (Entropy-and-Semantic Token Pooling), a lightweight framework that addresses this issue by combining entropy with attention-based importance scores. These scores are derived directly from the self-attention weights computed during the LLM prefill phase, and this allows ESTP to capture both uncertainty and semantic importance with minimal additional computation. Since the framework reuses prefill activations, it adds almost no extra memory overhead and introduces only minimal latency. On the ForeLen benchmark, ESTP outperforms baseline methods, achieves better prediction accuracy and lower error rates in most scenarios. When integrated with a length-aware scheduler in end-to-end system tests, it further helps improve overall throughput and reduce the padding ratio. Our results offer a practical and effective building block for length-aware LLM serving systems.

大模型推理长度预测注意力机制系统优化

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