arXiv:2502.09601cs.AIcs.CL2025-02ACL被引 206

让大模型推理链可变长短,难任务长思考,易任务快回答。

CoT-Valve: Length-Compressible Chain-of-Thought Tuning

  • 通过调节模型参数空间方向控制推理链长度
  • 在GSM8K上推理长度从741降至225词元,性能仅微降
  • 适合需要动态推理效率的实用场景

思维链显著提升模型推理能力,但伴随推理成本上升。我们发现简单任务下推理路径易压缩,而复杂任务则难以压缩,因此探索仅用一个模型弹性控制推理链长度的可行性。提出新型调优与推理策略CoT-Valve,使模型能生成不同长度的推理链。方法基于在参数空间中识别可有效调控推理链长度的方向,并构建了从长到短的同题多长度推理数据集。设计两种增强策略:精确长度可控调优与渐进式压缩。实验表明,CoT-Valve实现推理链可控且可压缩,优于提示控制。应用于QwQ-32B-Preview模型,在GSM8K上推理链由741降至225词元(性能95.07%→94.92%),在AIME上由6827降至4629词元,仅多出1个错误答案。

原文摘要 · Abstract (English)

Chain-of-Thought significantly enhances a model's reasoning capability, but it also comes with a considerable increase in inference costs due to long chains. With the observation that the reasoning path can be easily compressed under easy tasks but struggle on hard tasks, we explore the feasibility of elastically controlling the length of reasoning paths with only one model, thereby reducing the inference overhead of reasoning models dynamically based on task difficulty. We introduce a new tuning and inference strategy named CoT-Valve, designed to allow models to generate reasoning chains of varying lengths. To achieve this, we propose to identify a direction in the parameter space that, when manipulated, can effectively control the length of generated CoT. Moreover, we show that this property is valuable for compressing the reasoning chain. We construct datasets with chains from long to short for the same questions and explore two enhanced strategies for CoT-Valve: (1) a precise length-compressible CoT tuning method, and (2) a progressive chain length compression approach. Our experiments show that CoT-Valve successfully enables controllability and compressibility of the chain and shows better performance than the prompt-based control. We applied this method to QwQ-32B-Preview, reducing reasoning chains on GSM8K from 741 to 225 tokens with a minor performance drop (95.07% to 94.92%) and on AIME from 6827 to 4629 tokens, with only one additional incorrect answer.

推理链压缩模型效率可控生成

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