ChatPaper.aiChatPaper

Il tuo modello LLM Mixture-of-Experts è segretamente un modello di embedding gratuito.

Your Mixture-of-Experts LLM Is Secretly an Embedding Model For Free

October 14, 2024
Autori: Ziyue Li, Tianyi Zhou
cs.AI

Abstract

Mentre i grandi modelli linguistici (LLM) eccellono nelle attività di generazione, la loro architettura basata solo sul decoder spesso limita il loro potenziale come modelli di embedding se non viene applicato alcun ulteriore raffinamento della rappresentazione. Questo contraddice la loro pretesa di essere generalisti? Per rispondere a questa domanda, esaminiamo più da vicino i modelli linguistici a Mischia di Esperti (MoE). Il nostro studio mostra che i router degli esperti nei LLM MoE possono fungere da modelli di embedding pronti all'uso con prestazioni promettenti su una variegata classe di compiti focalizzati sull'embedding, senza richiedere alcun raffinamento ulteriore. Inoltre, la nostra approfondita analisi dimostra che i pesi di routing MoE sono complementari allo stato nascosto (HS) dei LLM, un embedding ampiamente utilizzato. Rispetto a HS, scopriamo che i pesi di routing sono più robusti nella scelta delle prompt e si concentrano su semantica di alto livello. Motivati dall'analisi, proponiamo MoEE che combina i pesi di routing e lo stato nascosto, ottenendo prestazioni migliori rispetto all'utilizzo separato di ognuno. La nostra esplorazione della loro combinazione e della strategia di prompt ha portato a diverse nuove intuizioni, ad esempio, una somma pesata delle similarità tra pesi di routing e stato nascosto supera la similarità della loro concatenazione. I nostri esperimenti sono stati condotti su 6 compiti di embedding con 20 set di dati provenienti dal Massive Text Embedding Benchmark (MTEB). I risultati dimostrano il significativo miglioramento apportato da MoEE all'embedding basato su LLM senza ulteriori raffinamenti.
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.
PDF522November 16, 2024