あなたのMixture-of-Experts LLMは実は無料の埋め込みモデルです。
Your Mixture-of-Experts LLM Is Secretly an Embedding Model For Free
October 14, 2024
著者: Ziyue Li, Tianyi Zhou
cs.AI
要旨
大規模言語モデル(LLM)は生成タスクで優れていますが、そのデコーダーのみのアーキテクチャは、追加の表現ファインチューニングが適用されない限り、埋め込みモデルとしての潜在能力を制限することがしばしばあります。これは彼らの汎用性を否定するものでしょうか?この問いに答えるために、我々は専門家の混合(MoE)LLMを詳しく調査します。我々の研究は、MoE LLM内の専門家ルーターが、追加のファインチューニングを必要とせずに、多様な埋め込みに焦点を当てたタスクで有望なパフォーマンスを発揮するオフザシェルフの埋め込みモデルとして機能することを示しています。さらに、我々の包括的な分析は、MoEのルーティング重み(RW)が、広く使用されている埋め込みであるLLMの隠れ状態(HS)と補完関係にあることを示しています。HSに比べて、RWはプロンプトの選択に対してより堅牢であり、高レベルの意味に焦点を当てています。この分析に触発されて、RWとHSを組み合わせたMoEEを提案し、それぞれを単独で使用するよりも優れたパフォーマンスを実現しています。彼らの組み合わせとプロンプト戦略の探求により、RWとHSの類似性の加重和が、それらの連結よりも優れた結果をもたらすことなど、いくつかの新しい洞察が得られました。我々の実験は、Massive Text Embedding Benchmark(MTEB)からの20のデータセットを使用した6つの埋め込みタスクで実施されました。その結果は、追加のファインチューニングを必要とせずに、MoEEがLLMベースの埋め込みにもたらす重要な改善を示しています。
English
While large language models (LLMs) excel on generation tasks, their
decoder-only architecture often limits their potential as embedding models if
no further representation finetuning is applied. Does this contradict their
claim of generalists? To answer the question, we take a closer look at
Mixture-of-Experts (MoE) LLMs. Our study shows that the expert routers in MoE
LLMs can serve as an off-the-shelf embedding model with promising performance
on a diverse class of embedding-focused tasks, without requiring any
finetuning. Moreover, our extensive analysis shows that the MoE routing weights
(RW) is complementary to the hidden state (HS) of LLMs, a widely-used
embedding. Compared to HS, we find that RW is more robust to the choice of
prompts and focuses on high-level semantics. Motivated by the analysis, we
propose MoEE combining RW and HS, which achieves better performance than using
either separately. Our exploration of their combination and prompting strategy
shed several novel insights, e.g., a weighted sum of RW and HS similarities
outperforms the similarity on their concatenation. Our experiments are
conducted on 6 embedding tasks with 20 datasets from the Massive Text Embedding
Benchmark (MTEB). The results demonstrate the significant improvement brought
by MoEE to LLM-based embedding without further finetuning.Summary
AI-Generated Summary