TokenSkip: Controllable Chain-of-Thought Compression in LLMs

LLM MQIA CoT
思维链(Chain-of-Thought, CoT)已被证明可以有效提升大语言模型(LLMs)的推理能力。最近的进展,如OpenAI的o1和DeepSeek-R1,表明在推理过程中扩展CoT序列的长度可以进一步提高LLM的推理性能。然而,由于LLM解码的自回归特性,更长的CoT输出会导致推理延迟线性增加,从而影响用户体验,特别是在CoT超过10,000个标记时尤为明显。为了解决这一限制,我们分析了CoT输出中各个标记的语义重要性,并发现它们对推理的贡献各不相同。基于这一见解,我们提出了TokenSkip,这是一种简单而有效的方法,使LLM能够有选择地跳过不太重要的标记,从而实现可控的CoT压缩。广泛的实验表明,TokenSkip在减少CoT标记使用的同时,仍能保持强大的推理性能。特别值得一提的是,在应用于Qwen2.5-14B-Instruct时,TokenSkip在GSM8K数据集上将推理标记减少了40%(从313减少到181),且性能下降不到0.4%。
Chain-of-Thought (CoT) has been proven effective in enhancing the reasoning capabilities of large language models (LLMs). Recent advancements, such as OpenAI's o1 and DeepSeek-R1, suggest that scaling up the length of CoT sequences during inference could further boost LLM reasoning performance. However, due to the autoregressive nature of LLM decoding, longer CoT outputs lead to a linear increase in inference latency, adversely affecting user experience, particularly when the CoT exceeds 10,000 tokens. To address this limitation, we analyze the semantic importance of tokens within CoT outputs and reveal that their contributions to reasoning vary. Building on this insight, we propose TokenSkip, a simple yet effective approach that enables LLMs to selectively skip less important tokens, allowing for controllable CoT compression. Extensive experiments across various models and tasks demonstrate the effectiveness of TokenSkip in reducing CoT token usage while preserving strong reasoning performance. Notably, when applied to Qwen2.5-14B-Instruct, TokenSkip reduces reasoning tokens by 40% (from 313 to 181) on GSM8K, with less than a 0.4% performance drop.
许愿