arXiv:2503.07807cs.CLcs.AI2025-03被引 7

针对领域模型优化猜测解码,提升推理速度

Training Domain Draft Models for Speculative Decoding: Best Practices and Insights

  • 用知识蒸馏训练适配特定领域的轻量猜测模型
  • 离线蒸馏比在线蒸馏性能高11%至25%
  • 合成数据可达到历史查询数据80%以上效果

推测解码通过小型草稿模型预测大语言模型输出,有效加速推理。但在适配领域专用目标模型时,通用草稿模型的接受率因领域偏移显著下降。本文系统研究了知识蒸馏在训练领域草稿模型中的应用,对比了白盒与黑盒蒸馏方法,并在历史用户查询、精选领域数据及合成对齐数据等多种数据可访问性场景下评估其效果。跨函数调用、生物学和中文领域实验表明,离线蒸馏性能优于在线蒸馏11%至25%,白盒蒸馏优于黑盒蒸馏2%至10%,数据扩展趋势在各领域均成立。此外,合成数据可实现历史查询数据80%至93%的性能表现。研究为构建高效领域专用草稿模型提供了实用指导。

原文摘要 · Abstract (English)

Speculative decoding is an effective method for accelerating inference of large language models (LLMs) by employing a small draft model to predict the output of a target model. However, when adapting speculative decoding to domain-specific target models, the acceptance rate of the generic draft model drops significantly due to domain shift. In this work, we systematically investigate knowledge distillation techniques for training domain draft models to improve their speculation accuracy. We compare white-box and black-box distillation approaches and explore their effectiveness in various data accessibility scenarios, including historical user queries, curated domain data, and synthetically generated alignment data. Our experiments across Function Calling, Biology, and Chinese domains show that offline distillation consistently outperforms online distillation by 11% to 25%, white-box distillation surpasses black-box distillation by 2% to 10%, and data scaling trends hold across domains. Additionally, we find that synthetic data can effectively align draft models and achieve 80% to 93% of the performance of training on historical user queries. These findings provide practical guidelines for training domain-specific draft models to improve speculative decoding efficiency.

推测解码知识蒸馏领域适配大模型加速

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。