用轻量预测器控制大模型推理长度,省钱又提效。
Steering LLM Thinking with Budget Guidance
- 用伽马分布预测剩余思考长度,软性引导每步生成。
- 紧预算下数学题准确率提升26%,仅用63%的思考token。
- 无需微调,适配多任务,还能估算题目难易度。
近期深度推理的大语言模型常通过长时间推理提升性能,但过长的推理会带来高昂的推理成本且收益递减。如何在不牺牲性能的前提下控制推理长度,尤其在严格预算下,仍具挑战。本文提出预算引导(Budget Guidance),一种无需模型微调的简单有效方法,通过引入轻量级预测器,在生成过程中建模剩余思考长度的伽马分布,以软性、逐标记的方式引导推理,确保整体推理轨迹符合指定预算。该方法实现自然可控的推理长度,并在困难数学基准测试中显著提升效率。例如,在MATH-500基准上,紧预算下准确率较基线最高提升26%,同时仅使用全推理模型63%的思考标记。预算引导还具备跨任务泛化能力,展现出估算问题难度等涌现特性。代码已开源。
原文摘要 · Abstract (English)
Recent deep-thinking large language models often reason extensively to improve performance, but such lengthy reasoning is not always desirable, as it incurs excessive inference costs with disproportionate performance gains. Controlling reasoning length without sacrificing performance is therefore important, but remains challenging, especially under tight thinking budgets. We propose budget guidance, a simple yet effective method for steering the reasoning process of LLMs toward a target budget without requiring any LLM fine-tuning. Our approach introduces a lightweight predictor that models a Gamma distribution over the remaining thinking length during next-token generation. This signal is then used to guide generation in a soft, token-level manner, ensuring that the overall reasoning trace adheres to the specified thinking budget. Budget guidance enables natural control of the thinking length, along with significant token efficiency improvements over baseline methods on challenging math benchmarks. For instance, it achieves up to a 26% accuracy gain on the MATH-500 benchmark under tight budgets compared to baseline methods, while maintaining competitive accuracy with only 63% of the thinking tokens used by the full-thinking model. Budget guidance also generalizes to broader task domains and exhibits emergent capabilities, such as estimating question difficulty. The source code is available at: https://github.com/UMass-Embodied-AGI/BudgetGuidance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。