嵌入器的困境:LLM更优秀,但代价是什么?
研究论文 · 2026/08/22
本文通过控制成本的方式,对10个大型语言模型(LLM)和26个嵌入模型(参数从1.18亿到140亿)在37个任务上进行了比较,涵盖分类、语义文本相似度、聚类、配对分类和检索。总体而言,两种范式性能相当:最佳LLM(Gemini 3.1 Pro,77.6分)与最佳嵌入模型(77.2分)仅差0.4分。但它们的优势因任务而异:LLM在推理密集型检索上领先,嵌入模型在分类上领先,而在聚类、STS和配对分类上两者持平。然而,达到这种性能平价的成本高昂:LLM的成本比同等质量的嵌入模型高出最多1431倍(每次基准测试154美元 vs 0.11美元),且开源LLM在同一GPU上的处理速度慢2.5至736倍。推理令牌占LLM推理成本的28%至81%;在消融实验中,降低推理预算对大多数模型的检索质量保持或提升。帕累托前沿包含领先的嵌入模型和一个LLM(Gemini 3.1 Pro)。这些结果支持分工:使用嵌入模型进行相似度、分类和聚类,保留LLM用于推理密集型检索。代码、数据集和结果公开于 https://github.com/embeddings-benchmark/embedders-dilemma。
该研究提供了大规模、成本感知的LLM与嵌入模型对比,揭示了性能平价背后的巨大成本差异,为实际应用中的模型选择提供了明确指导,具有重要的实践价值。
Should you replace your text-embedding pipeline with a large language model? We answer this with a controlled, cost-aware comparison of ten LLMs across six families and 26 embedding models (118M to 14B parameters) on 37 tasks spanning classification, semantic textual similarity (STS), clustering, pair classification, and retrieval. In aggregate the two paradigms are effectively tied: the best LLM (Gemini 3.1 Pro, 77.6) and the best embedding model (77.2) differ by 0.4 points. Their strengths differ by task: LLMs lead on reasoning-heavy retrieval, embedding models lead on classification, and the two match on clustering, STS, and pair classification. Reaching that parity is expensive. An LLM costs up to 1,431x more than an embedding model of comparable quality (USD 154 vs. USD 0.11 per benchmark pass), and the open LLMs tested process tokens 2.5 to 736x more slowly on the same GPU. Reasoning tokens account for 28 to 81% of LLM inference cost; lower reasoning budgets preserve or improve retrieval quality for most models in our ablation. The Pareto frontier contains the leading embedding models and one LLM, Gemini 3.1 Pro. These results support a division of labour: use embedding models for similarity, classification, and clustering, and reserve LLMs for reasoning-intensive retrieval. Our code, datasets, and results are publicly available at https://github.com/embeddings-benchmark/embedders-dilemma.