arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.02223cs.CLcs.AIcs.LG
收藏

EmbedLLM:学习大型语言模型的紧凑表示

EmbedLLM: Learning Compact Representations of Large Language Models

University of California, Berkeley(加州大学伯克利分校)

Richard Zhuang, Tianhao Wu, Zhaojin Wen, Andrew Li, Jiantao Jiao, Kannan Ramchandran

AI总结:

提出 EmbedLLM 框架,通过编码器-解码器方法学习大型语言模型的紧凑向量表示,在模型路由任务中提升准确率与延迟表现,并能零成本预测模型性能及捕获关键特征。

摘要:

鉴于如今 Huggingface 上有数十万个语言模型可用,高效地评估和利用这些模型于各种下游任务变得日益关键。许多现有方法反复学习大型语言模型(LLMs)的任务特定表示,这导致了时间和计算资源的低效。为解决此问题,我们提出了 EmbedLLM,这是一个旨在学习 LLMs 紧凑向量表示的框架,以促进涉及多个模型的下游应用,如模型路由。我们引入了一种编码器-解码器方法来学习此类嵌入,并提出了一个系统性框架以评估其有效性。实证结果表明,EmbedLLM 在模型路由的准确率和延迟方面均优于先前方法。此外,我们证明该方法能在不产生额外推理成本的情况下预测模型在多个基准上的表现。广泛的探测实验验证了所学习的嵌入能捕获关键模型特征,例如模型是否专精于编程任务,即使未在这些特征上显式训练。我们开源了数据集、代码和嵌入器以促进进一步研究和应用。

英文摘要:

With hundreds of thousands of language models available on Huggingface today, efficiently evaluating and utilizing these models across various downstream, tasks has become increasingly critical. Many existing methods repeatedly learn task-specific representations of Large Language Models (LLMs), which leads to inefficiencies in both time and computational resources. To address this, we propose EmbedLLM, a framework designed to learn compact vector representations, of LLMs that facilitate downstream applications involving many models, such as model routing. We introduce an encoder-decoder approach for learning such embeddings, along with a systematic framework to evaluate their effectiveness. Empirical results show that EmbedLLM outperforms prior methods in model routing both in accuracy and latency. Additionally, we demonstrate that our method can forecast a model's performance on multiple benchmarks, without incurring additional inference cost. Extensive probing experiments validate that the learned embeddings capture key model characteristics, e.g. whether the model is specialized for coding tasks, even without being explicitly trained on them. We open source our dataset, code and embedder to facilitate further research and application.

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

↑