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

多层级最优传输用于语言模型的通用跨分词器知识蒸馏

Multi-Level Optimal Transport for Universal Cross-Tokenizer Knowledge Distillation on Language Models

University of Science and Technology of China(中国科学技术大学);Zhejiang University(浙江大学);Tencent YouTu Lab(腾讯优图实验室);Zhejiang University of Technology(浙江工业大学)

Xiao Cui, Mo Zhu, Yulei Qin, Liang Xie, Wengang Zhou, Houqiang Li

AI总结:

提出多层级最优传输(MultiLevelOT)方法,在词元和序列级别对齐教师与学生模型的logit分布,实现无需相同分词器的通用知识蒸馏,在多项任务上超越现有方法。

摘要:

知识蒸馏(KD)已成为压缩大型语言模型(LLMs)的流行技术。现有的KD方法受限于教师模型和学生模型需要相同的分词器(即词汇表),这限制了它们在处理不同架构家族的语言模型时的通用性。在本文中,我们引入了多层级最优传输(MultiLevelOT),这是一种新颖的方法,推进了最优传输在通用跨分词器知识蒸馏中的应用。我们的方法在词元级别和序列级别上,使用不同的成本矩阵对齐教师和学生模型的logit分布,从而消除了维度或逐词元对应的需求。在词元级别,MultiLevelOT通过联合优化序列中的所有词元来整合全局和局部信息,以增强鲁棒性。在序列级别,我们通过Sinkhorn距离高效捕获logits的复杂分布结构,该距离近似于用于散度度量的Wasserstein距离。在抽取式问答、生成式问答和摘要等任务上的大量实验表明,MultiLevelOT在各种设置下均优于最先进的跨分词器KD方法。我们的方法对跨模型家族、架构和参数规模的不同学生和教师模型具有鲁棒性。代码和模型可在https://github.com/2018cx/Multi-Level-OT获取。

英文摘要:

Knowledge distillation (KD) has become a prevalent technique for compressing large language models (LLMs). Existing KD methods are constrained by the need for identical tokenizers (i.e., vocabularies) between teacher and student models, limiting their versatility in handling LLMs of different architecture families. In this paper, we introduce the Multi-Level Optimal Transport (MultiLevelOT), a novel approach that advances the optimal transport for universal cross-tokenizer knowledge distillation. Our method aligns the logit distributions of the teacher and the student at both token and sequence levels using diverse cost matrices, eliminating the need for dimensional or token-by-token correspondence. At the token level, MultiLevelOT integrates both global and local information by jointly optimizing all tokens within a sequence to enhance robustness. At the sequence level, we efficiently capture complex distribution structures of logits via the Sinkhorn distance, which approximates the Wasserstein distance for divergence measures. Extensive experiments on tasks such as extractive QA, generative QA, and summarization demonstrate that the MultiLevelOT outperforms state-of-the-art cross-tokenizer KD methods under various settings. Our approach is robust to different student and teacher models across model families, architectures, and parameter sizes. Codes and models are available at https://github.com/2018cx/Multi-Level-OT.

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

↑