arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.13223cs.LGcs.AI
收藏

TokenSqueeze:面向推理大语言模型的性能保持压缩

TokenSqueeze: Performance-Preserving Compression for Reasoning LLMs

State Key Lab of CAD&CG, Zhejiang University(浙江大学CAD&CG国家重点实验室);School of Software Technology, Zhejiang University(浙江大学软件学院);Alibaba Cloud(阿里云);Zhiyuan Research Institute(智源研究院)

Yuxiang Zhang, Zhengxu Yu, Weihang Pan, Zhongming Jin, Qiang Fu, Deng Cai, Binbin Lin, Jieping Ye

AI总结:

针对推理LLM长思维链导致token使用量大、效率低的问题,提出TokenSqueeze方法,通过自适应匹配推理深度的样本选择和分布对齐语言优化,实现保持性能的token压缩,在MATH500上使模型token减少50%且准确性不变。

摘要:

OpenAI-o1和DeepSeek-R1等新兴推理大语言模型(LLM)通过生成长思维链(CoT)轨迹,在复杂推理任务上取得了优异性能。然而,这些长CoT会增加token使用量,导致推理延迟升高和内存消耗增加。因此,平衡准确性与推理效率对于推理LLM的实际部署至关重要。现有长变短(Long2Short)方法旨在缩短推理长度,但常牺牲准确性,凸显了对保持性能同时降低token成本方法的需求。为解决这一效率-准确性权衡问题,我们提出TokenSqueeze,一种新型Long2Short方法,可在仅依赖自生成数据的情况下压缩推理路径并保持性能。首先,为防止推理深度过度压缩导致性能下降,我们提出选择推理深度与问题复杂度自适应匹配的自生成样本。为进一步优化语言表达而不改变底层推理路径,我们引入分布对齐的语言优化方法,在保持逻辑完整性的同时提升推理路径的清晰度和简洁性。综合实验结果表明,TokenSqueeze在减少token使用量的同时保持了准确性。值得注意的是,使用我们方法微调的DeepSeek-R1-Distill-Qwen-7B在MATH500基准测试中实现了平均50%的token减少,同时保持了准确性。TokenSqueeze仅利用模型的自生成数据,无需依赖人工整理的短答案数据集,即可在多种应用中实现高效且高保真的推理。我们的代码可在https://github.com/zhangyx1122/TokenSqueeze获取。

英文摘要:

Emerging reasoning LLMs such as OpenAI-o1 and DeepSeek-R1 have achieved strong performance on complex reasoning tasks by generating long chain-of-thought (CoT) traces. However, these long CoTs result in increased token usage, leading to higher inference latency and memory consumption. As a result, balancing accuracy and reasoning efficiency has become essential for deploying reasoning LLMs in practical applications. Existing long-to-short (Long2Short) methods aim to reduce inference length but often sacrifice accuracy, revealing a need for an approach that maintains performance while lowering token costs. To address this efficiency-accuracy tradeoff, we propose TokenSqueeze, a novel Long2Short method that condenses reasoning paths while preserving performance and relying exclusively on self-generated data. First, to prevent performance degradation caused by excessive compression of reasoning depth, we propose to select self-generated samples whose reasoning depth is adaptively matched to the complexity of the problem. To further optimize the linguistic expression without altering the underlying reasoning paths, we introduce a distribution-aligned linguistic refinement method that enhances the clarity and conciseness of the reasoning path while preserving its logical integrity. Comprehensive experimental results demonstrate the effectiveness of TokenSqueeze in reducing token usage while maintaining accuracy. Notably, DeepSeek-R1-Distill-Qwen-7B fine-tuned using our proposed method achieved a 50\% average token reduction while preserving accuracy on the MATH500 benchmark. TokenSqueeze exclusively utilizes the model's self-generated data, enabling efficient and high-fidelity reasoning without relying on manually curated short-answer datasets across diverse applications. Our code is available at https://github.com/zhangyx1122/TokenSqueeze.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑