用扩散模型并行剪枝提示词,提速80%且不丢精度。
DiffuMask: Diffusion Language Model for Token-level Prompt Pruning

- 基于扩散模型迭代预测掩码,批量删除冗余词元。
- 最高可压缩80%提示长度,保持甚至提升准确率。
- 适合需要快速推理的场景,支持灵活控制保留内容。
上下文学习和思维链提示能提升大语言模型的推理能力,但通常需要更长、更昂贵的提示,可能包含冗余信息。基于剪枝的提示压缩提供了实用解决方案,但现有方法依赖逐个词元删除,计算成本高。我们提出DiffuMask,一种结合层级样本级与词元级剪枝信号的扩散框架,通过迭代掩码预测实现快速、并行的提示剪枝。DiffuMask在每轮去噪步骤中可掩码多个词元,显著加速压缩过程。该方法提供可调的保留内容控制,有效保留关键推理上下文,实现高达80%的提示长度缩减。同时,在域内、域外及跨模型设置下,仍能维持或提升准确率。结果表明,DiffuMask是一种通用且可控的提示压缩框架,有助于提升大语言模型的上下文推理速度与可靠性。
原文摘要 · Abstract (English)
In-Context Learning and Chain-of-Thought prompting improve reasoning in large language models (LLMs). These typically come at the cost of longer, more expensive prompts that may contain redundant information. Prompt compression based on pruning offers a practical solution, yet existing methods rely on sequential token removal which is computationally intensive. We present DiffuMask, a diffusion-based framework integrating hierarchical shot-level and token-level pruning signals, that enables rapid and parallel prompt pruning via iterative mask prediction. DiffuMask substantially accelerates the compression process via masking multiple tokens in each denoising step. It offers tunable control over retained content, preserving essential reasoning context and achieving up to 80\% prompt length reduction. Meanwhile, it maintains or improves accuracy across in-domain, out-of-domain, and cross-model settings. Our results show that DiffuMask provides a generalizable and controllable framework for prompt compression, facilitating faster and more reliable in-context reasoning in LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。