D2LLM: Decomposed and Distilled Large Language Models for Semantic Search

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Liao, Zihan, Yu, Hang, Li, Jianguo, Wang, Jun, Zhang, Wei
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866913403581235200
author Liao, Zihan
Yu, Hang
Li, Jianguo
Wang, Jun
Zhang, Wei
author_facet Liao, Zihan
Yu, Hang
Li, Jianguo
Wang, Jun
Zhang, Wei
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2406_17262
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle D2LLM: Decomposed and Distilled Large Language Models for Semantic Search
Liao, Zihan
Yu, Hang
Li, Jianguo
Wang, Jun
Zhang, Wei
Computation and Language
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.
title D2LLM: Decomposed and Distilled Large Language Models for Semantic Search
topic Computation and Language
url https://arxiv.org/abs/2406.17262