arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.17262cs.CL
收藏

D2LLM:用于语义搜索的分解与蒸馏大型语言模型

D2LLM: Decomposed and Distilled Large Language Models for Semantic Search

East China Normal University(华东师范大学);Ant Group(蚂蚁集团)

Zihan Liao, Hang Yu, Jianguo Li, Jun Wang, Wei Zhang

AI总结:

本文提出D2LLMs,将cross-encoder分解为高效的bi-encoder并结合注意力池化与交互模拟模块,通过对比、排序和特征模仿蒸馏LLM知识,在语义搜索任务中兼顾效率与准确性,全指标超越五个基线,NLI任务性能提升至少6.45%。

摘要:

语义搜索的关键挑战在于创建既能准确又能高效地为查询定位相关句子的模型。尽管BERT风格的 bi-encoders 凭借预计算嵌入在效率上表现优异,但它们在搜索任务中常常遗漏细微的语义差别。相反,采用 cross-encoder 设计的 GPT 风格 LLMs 能够捕捉这些细微差别,但计算成本高昂,阻碍了实时应用。本文提出了 D2LLMs——用于语义搜索的分解与蒸馏 LLMs——结合了两者的优势。我们将 cross-encoder 分解为一个高效的 bi-encoder,并集成了 Pooling by Multihead Attention 和一个 Interaction Emulation Module,实现了细致的理解与可预计算性。使用对比、排序和特征模仿技术将 LLM 的知识蒸馏到该模型中。实验表明,D2LLM 在三个任务的所有指标上均超越了五个领先基线,特别是将 NLI 任务性能提升了至少 6.45%。源代码可在 https://github.com/codefuse-ai/D2LLM 获取。

英文摘要:

The key challenge in semantic search is to create models that are both accurate and efficient in pinpointing relevant sentences for queries. While BERT-style bi-encoders excel in efficiency with pre-computed embeddings, they often miss subtle nuances in search tasks. Conversely, GPT-style LLMs with cross-encoder designs capture these nuances but are computationally intensive, hindering real-time applications. In this paper, we present D2LLMs-Decomposed and Distilled LLMs for semantic search-that combines the best of both worlds. We decompose a cross-encoder into an efficient bi-encoder integrated with Pooling by Multihead Attention and an Interaction Emulation Module, achieving nuanced understanding and pre-computability. Knowledge from the LLM is distilled into this model using contrastive, rank, and feature imitation techniques. Our experiments show that D2LLM surpasses five leading baselines in terms of all metrics across three tasks, particularly improving NLI task performance by at least 6.45%. The source code is available at https://github.com/codefuse-ai/D2LLM.

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

↑