Dual-Space Knowledge Distillation for Large Language Models

要約

知識蒸留 (KD) は、大規模言語モデル (LLM) の知識をより小さなモデルに転送することで圧縮する有望なソリューションとして知られています。
このプロセス中、ホワイトボックス KD メソッドは通常、2 つのモデルの出力分布間の距離を最小限に抑え、より多くの知識を伝達できるようにします。
ただし、現在のホワイトボックス KD フレームワークでは、出力分布は、独自の予測ヘッドを使用した 2 つのモデルのそれぞれの出力空間からのものです。
私たちは、空間の不一致により、表現レベルと分布レベルの両方で教師モデルと学生モデルの類似性が低くなるだろうと主張します。
さらに、この不一致は、現在の LLM によくある、異なる語彙を持つモデル間の KD プロセスの妨げにもなります。
これらの問題に対処するために、KD の 2 つのモデルの出力空間を統合する二重空間知識蒸留 (DSKD) フレームワークを提案します。
DSKD に基づいて、異なる語彙を持つ 2 つのモデルの表現を自動的に調整できるクロスモデル アテンション メカニズムをさらに開発します。
したがって、私たちのフレームワークは、現在のフレームワークのように、KD のさまざまな距離関数 (KL 発散など) と互換性があるだけでなく、語彙に関係なく、任意の 2 つの LLM 間の KD もサポートします。
タスクに依存しない命令追従ベンチマークの実験では、DSKD がさまざまな距離関数を備えた現在のホワイトボックス KD フレームワークを大幅に上回り、さまざまな語彙を備えた LLM に対する既存の KD 手法も上回ることが示されました。

要約(オリジナル)

Knowledge distillation (KD) is known as a promising solution to compress large language models (LLMs) via transferring their knowledge to smaller models. During this process, white-box KD methods usually minimize the distance between the output distributions of the two models so that more knowledge can be transferred. However, in the current white-box KD framework, the output distributions are from the respective output spaces of the two models, using their own prediction heads. We argue that the space discrepancy will lead to low similarity between the teacher model and the student model on both representation and distribution levels. Furthermore, this discrepancy also hinders the KD process between models with different vocabularies, which is common for current LLMs. To address these issues, we propose a dual-space knowledge distillation (DSKD) framework that unifies the output spaces of the two models for KD. On the basis of DSKD, we further develop a cross-model attention mechanism, which can automatically align the representations of the two models with different vocabularies. Thus, our framework is not only compatible with various distance functions for KD (e.g., KL divergence) like the current framework, but also supports KD between any two LLMs regardless of their vocabularies. Experiments on task-agnostic instruction-following benchmarks show that DSKD significantly outperforms the current white-box KD framework with various distance functions, and also surpasses existing KD methods for LLMs with different vocabularies.

arxiv情報

著者 Songming Zhang,Xue Zhang,Zengkui Sun,Yufeng Chen,Jinan Xu
発行日 2024-10-01 16:45:12+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL パーマリンク