让推理加速模型快速适配新任务,省时省力还更准。
Efficiently Aligning Draft Models via Parameter- and Data-Efficient Adaptation
- 拆分共享与专属模块,只更新小部分参数即可适配新模型。
- 用目标模型重生成训练数据,使推测解码平均接受长度提升30%以上。
- 只选关键数据训练,效率高,适合资源有限的场景使用。
推测解码能加速大语言模型推理,但当目标模型经过特定领域微调后,性能会下降。直接为每个目标模型重新训练草稿模型成本高昂且低效。为此,我们提出一种参数和数据高效框架——高效草稿适配(EDA)。EDA包含三项创新:(1) 解耦架构,通过共享与专属组件分别建模通用和目标特定输出分布,仅需更新轻量级专属组件即可实现参数高效适配;(2) 数据再生策略,利用微调后的目标模型重生成训练数据,提升训练与推测解码的一致性,显著提高平均接受长度;(3) 样本选择机制,优先选取高价值数据进行高效适配。实验表明,EDA在微调模型上有效恢复推测性能,平均接受长度优于全量重训,同时训练成本大幅降低。代码已开源:https://github.com/Lyn-Lucy/Efficient-Draft-Adaptation。
原文摘要 · Abstract (English)
Speculative decoding accelerates LLM inference but suffers from performance degradation when target models are fine-tuned for specific domains. A naive solution is to retrain draft models for every target model, which is costly and inefficient. To address this, we introduce a parameter- and data-efficient framework named Efficient Draft Adaptation, abbreviated as EDA, for efficiently adapting draft models. EDA introduces three innovations: (1) a decoupled architecture that utilizes shared and private components to model the shared and target-specific output distributions separately, enabling parameter-efficient adaptation by updating only the lightweight private component;(2) a data regeneration strategy that utilizes the fine-tuned target model to regenerate training data, thereby improving the alignment between training and speculative decoding, leading to higher average acceptance length;(3) a sample selection mechanism that prioritizes high-value data for efficient adaptation. Our experiments show that EDA effectively restores speculative performance on fine-tuned models, achieving superior average acceptance lengths with significantly reduced training costs compared to full retraining. Code is available at https://github.com/Lyn-Lucy/Efficient-Draft-Adaptation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。