用小模型跨家族压缩长提示,无需训练即可提速
Cross-Family Speculative Prefill: Training-Free Long-Context Compression with Small Draft Models
- 用不同家族的小模型估算重要词元,实现无训练压缩
- 压缩后性能保留90%~100%,部分任务还因去噪提升准确率
- 适合多模型异构的智能体系统,显著降低首字延迟
提示长度是智能体大模型工作负载中的主要瓶颈,重复推理和多调用循环带来巨大预填充开销。近期的推测性预填充研究证明,基于注意力的词元重要性估计可实现无训练提示压缩,但该方法假设存在与目标模型共享分词器的小型同族草稿模型。实际中,智能体流程常使用无小型同族草稿模型的模型。本文研究跨家族推测性预填充,即使用一个模型族的轻量级草稿模型为另一族的目标模型进行提示压缩。在相同推测性预填充机制下,我们评估了包括Qwen、LLaMA和DeepSeek在内的多种跨家族组合。在广泛任务中,发现基于注意力的词元重要性估计在不同模型家族间仍可靠迁移,尽管存在架构和分词器差异。跨模型提示压缩基本保持90%~100%的完整提示基线性能,部分情况下因去噪效应略有准确率提升,同时显著降低首次生成时间(TTFT)。结果表明,推测性预填充主要依赖任务先验和语义结构,可作为通用提示压缩基础。这对智能体系统具有重要意义,其中重复长上下文推理与异构模型堆栈使跨模型压缩既必要又可行。
原文摘要 · Abstract (English)
Prompt length is a major bottleneck in agentic large language model (LLM) workloads, where repeated inference steps and multi-call loops incur substantial prefill cost. Recent work on speculative prefill demonstrates that attention-based token importance estimation can enable training-free prompt compression, but this assumes the existence of a draft model that shares the same tokenizer as the target model. In practice, however, agentic pipelines frequently employ models without any smaller in-family draft model. In this work, we study cross-family speculative prefill, where a lightweight draft model from one model family is used to perform prompt compression for a target model from a different family. Using the same speculative prefill mechanism as prior work, we evaluate a range of cross-family draft-target combinations, including Qwen, LLaMA, and DeepSeek models. Across a broad diversity of tasks, we find that attention-based token importance estimation transfers reliably across different model families despite differences in model architectures and tokenizers between draft and target models. Cross-model prompt compression largely retains 90~100% of full-prompt baseline performance and, in some cases, slightly improves accuracy due to denoising effects, while delivering substantial reductions in time to first token (TTFT). These results suggest that speculative prefill depends mainly on task priors and semantic structure, thus serving as a generalizable prompt compression primitive. We discuss the implications of our findings for agentic systems, where repeated long-context inference and heterogeneous model stacks make cross-model prompt compression both necessary and practical.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。