arXiv:2412.11664cs.CLcs.LG2024-12AAAI被引 203

让大模型推理过程缩短一半以上,还能保持准确率。

C3oT: Generating Shorter Chain-of-Thought without Compromising Effectiveness

  • 用压缩器+条件训练,让短推理保留关键信息
  • 在4个数据集上实现超50%的推理长度压缩
  • 适合对响应速度敏感的搜索推荐场景

在生成答案前进行链式思考(CoT)能显著提升大语言模型的推理能力与准确性。但多数情况下,生成的CoT远长于最终答案,带来额外解码开销。现有研究发现,即使保留关键信息,缩短推理步骤也会削弱模型表现。这使得大模型与CoT难以应用于对延迟敏感的搜索、推荐等实际场景。为此,本文提出C3oT——一种条件压缩链式思考框架,包含压缩器将长CoT压缩为短CoT,条件训练方法使模型同时学习长/短CoT对应关系,以及条件推理方法,让模型通过生成短CoT获得来自长CoT的推理能力。在涵盖算术与常识推理的四个数据集上实验表明,该方法可将生成CoT长度压缩超过50%,且不损害有效性。

原文摘要 · Abstract (English)

Generating Chain-of-Thought (CoT) before deriving the answer can effectively improve the reasoning capabilities of large language models (LLMs) and significantly improve the accuracy of the generated answer. However, in most cases, the length of the generated CoT is much longer than the desired final answer, which results in additional decoding costs. Furthermore, existing research has discovered that shortening the reasoning steps in CoT, even while preserving the key information, diminishes LLMs' abilities. These phenomena make it difficult to use LLMs and CoT in many real-world applications that only require the final answer and are sensitive to latency, such as search and recommendation. To reduce the costs of model decoding and shorten the length of the generated CoT, this paper presents $\textbf{C}$onditioned $\textbf{C}$ompressed $\textbf{C}$hain-of-$\textbf{T}$hought (C3oT), a CoT compression framework that involves a compressor to compress an original longer CoT into a shorter CoT while maintaining key information and interpretability, a conditioned training method to train LLMs with both longer CoT and shorter CoT simultaneously to learn the corresponding relationships between them, and a conditioned inference method to gain the reasoning ability learned from longer CoT by generating shorter CoT. We conduct experiments over four datasets from arithmetic and commonsense scenarios, showing that the proposed method is capable of compressing the length of generated CoT by up to more than 50% without compromising its effectiveness.

链式思考推理压缩大模型优化

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