无需相同分词器,跨模型家族也能高效压缩大模型。
Multi-Level Optimal Transport for Universal Cross-Tokenizer Knowledge Distillation on Language Models
- 用多层级最优传输对齐教师与学生模型的输出分布。
- 在抽取式问答等任务上超越现有跨分词器方法表现。
- 适合不同架构、参数量的大模型间知识迁移场景。
知识蒸馏(KD)已成为压缩大型语言模型(LLM)的主流技术。现有方法受限于师生模型需使用相同分词器(即词汇表),难以适应不同架构家族的LLM。本文提出多层级最优传输(MultiLevelOT),一种推进通用跨分词器知识蒸馏的新方法。该方法通过多样化的代价矩阵,在词元和序列两个层级上对齐教师与学生模型的logit分布,无需维度或逐词对应。在词元层面,通过联合优化序列内所有词元,融合全局与局部信息以增强鲁棒性;在序列层面,利用Sinkhorn距离高效捕捉logit分布的复杂结构,近似计算Wasserstein距离作为差异度量。在抽取式问答、生成式问答和摘要任务上的大量实验表明,MultiLevelOT在多种设置下均优于当前最佳的跨分词器知识蒸馏方法。该方法对不同模型家族、架构和参数规模的师生模型均表现出强鲁棒性。代码与模型已开源:https://github.com/2018cx/Multi-Level-OT。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。