arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.22056cs.CL
收藏

双空间知识蒸馏与关键-查询匹配用于具有词汇不匹配的大型语言模型

Dual-Space Knowledge Distillation with Key-Query Matching for Large Language Models with Vocabulary Mismatch

University of Cambridge, Department of Engineering(剑桥大学工程系);Toshiba Europe Limited(东芝欧洲有限公司)

Stella Eva Tsiapali, Cong-Thanh Do, Kate Knill

AI总结:

本文研究了针对具有词汇不匹配的大型语言模型的双空间知识蒸馏与关键-查询匹配方法,通过分析注意力机制揭示其优缺点,并提出基于生成对抗学习的新方法以解决关键-查询分布不匹配问题。

摘要:

大型语言模型(LLMs)在语言任务上实现了最先进的(SOTA)性能,但因其规模和资源需求而昂贵。知识蒸馏(KD)通过训练较小的学生模型模仿较大的教师模型来解决这一问题,从而在不显著损失性能的情况下提高效率。双空间知识蒸馏与跨模型注意力(DSKD-CMA)已成为在具有不同分词器的LLM之间进行KD的SOTA方法,但其内部机制仍然大多不透明。在本文中,我们通过手动标记对齐探测和热图可视化系统地分析DSKD-CMA的注意力机制,揭示其优缺点。在此基础上,我们引入了一种基于生成对抗(GA)学习的新方法DSKD-CMA-GA,以解决由不同模型计算出的关键-查询分布不匹配问题。实验显示在文本生成质量上获得了适度但一致的ROUGE-L提升,特别是在分布外数据上(平均+0.37),缩小了跨分词器KD与同分词器KD之间的差距。

英文摘要:

Large language models (LLMs) achieve state-of-the-art (SOTA) performance across language tasks, but are costly to deploy due to their size and resource demands. Knowledge Distillation (KD) addresses this by training smaller Student models to mimic larger Teacher models, improving efficiency without significant performance loss. Dual-Space Knowledge Distillation with Cross-Model Attention (DSKD-CMA) has emerged as a SOTA method for KD between LLMs with distinct tokenizers, yet its internal workings remain largely opaque. In this work, we systematically analyse the attention mechanism of DSKD-CMA through manual token alignment probing and heatmap visualisations, revealing both strengths and limitations. Building on this, we introduce a novel method, DSKD-CMA-GA, based on Generative Adversarial (GA) learning, to address the mismatched distributions between the keys and queries computed from distinct models. Experiments show modest but consistent ROUGE-L gains in text generation quality, particularly on out-of-distribution data (+0.37 on average), narrowing the gap between cross- and same-tokenizer KD.

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

↑