arXiv:2505.19217cs.CL2025-05NeurIPS被引 13

让大模型少废话,按难易程度自动压缩输出,又快又好。

The Overthinker's DIET: Cutting Token Calories with DIfficulty-AwarE Training

  • 根据题目难度动态调整惩罚力度和目标长度,智能压缩文本。
  • 减少40%以上token数,推理准确率反而提升,效率与性能双赢。
  • 适合追求高效推理的开发者,尤其在资源受限场景下优势明显。

近期的大语言模型虽具备强大推理能力,但常过度思考,生成冗长响应影响效率。我们提出DIET(Difficulty-Aware Training)框架,将实时估计的问题难度融入强化学习过程,系统性削减‘token卡路里’。DIET通过调节令牌惩罚强度并依据任务难度设定目标长度,动态优化性能与效率的权衡。我们还理论分析了组归一化强化学习算法(如GRPO)中简单奖励加权的缺陷,提出优势加权技术,实现稳定有效的难度感知目标。实验表明,DIET显著降低令牌数量,同时提升推理表现。除直接减少令牌外,还发现两个被忽视的关键优势:(1) 推理可扩展性更强——在固定计算预算下,以更少令牌保持高样本质量,支持更多样本多数投票,优于现有方法;(2) 保留了响应长度与问题难度间的自然正相关关系,避免压缩方法破坏这一合理分配。本研究为构建更高效、实用且高性能的大语言模型提供了原则性框架。

原文摘要 · Abstract (English)

Recent large language models (LLMs) exhibit impressive reasoning but often over-think, generating excessively long responses that hinder efficiency. We introduce DIET ( DIfficulty-AwarE Training), a framework that systematically cuts these "token calories" by integrating on-the-fly problem difficulty into the reinforcement learning (RL) process. DIET dynamically adapts token compression strategies by modulating token penalty strength and conditioning target lengths on estimated task difficulty, to optimize the performance-efficiency trade-off. We also theoretically analyze the pitfalls of naive reward weighting in group-normalized RL algorithms like GRPO, and propose Advantage Weighting technique, which enables stable and effective implementation of these difficulty-aware objectives. Experimental results demonstrate that DIET significantly reduces token counts while simultaneously improving reasoning performance. Beyond raw token reduction, we show two crucial benefits largely overlooked by prior work: (1) DIET leads to superior inference scaling. By maintaining high per-sample quality with fewer tokens, it enables better scaling performance via majority voting with more samples under fixed computational budgets, an area where other methods falter. (2) DIET enhances the natural positive correlation between response length and problem difficulty, ensuring verbosity is appropriately allocated, unlike many existing compression methods that disrupt this relationship. Our analyses provide a principled and effective framework for developing more efficient, practical, and high-performing LLMs.

大模型优化推理效率强化学习难度感知

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