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

Llama2Vec: 无监督适应大型语言模型用于密集检索

Llama2Vec: Unsupervised Adaptation of Large Language Models for Dense Retrieval

Beijing University of Posts and Telecommunications(北京邮电大学);Beijing Academy of Artificial Intelligence(北京人工智能研究院);University of Science and Technology of China(中国科学技术大学);The Hong Kong Polytechnic University(香港理工大学)

Zheng Liu, Chaofan Li, Shitao Xiao, Yingxia Shao, Defu Lian

AI总结:

Llama2Vec通过无监督适应LLM提升密集检索性能,实现新的最先进结果。

摘要:

密集检索需要判别嵌入来表示查询与文档之间的语义关系。鉴于LLM在语义理解上的强大能力,它可能受益于使用大型语言模型(LLMs)。然而,LLMs是通过自回归学习的,其工作机制与将整个文本表示为一个判别嵌入完全不同。因此,研究如何正确适应LLMs以使其能够有效初始化为密集检索的骨干编码器至关重要。在本文中,我们提出了一种新的方法,称为Llama2Vec,用于其密集检索应用中的无监督适应。Llama2Vec包含两个预设任务:EBAE(基于嵌入的自编码)和EBAR(基于嵌入的自回归),其中LLM被提示根据其文本嵌入来重建输入句子并预测下一句。Llama2Vec简单、轻量但效果显著。它被用于在维基百科语料库上适应LLaMA-2-7B。通过适度的适应步骤,它显著提高了模型在多种密集检索基准上的微调性能。值得注意的是,它在流行的基准上实现了新的最先进性能,例如MSMARCO上的段落和文档检索,以及BEIR上的零样本检索。模型和源代码将公开发布以促进未来研究。我们的模型可在https://github.com/FlagOpen/FlagEmbedding上获得。

英文摘要:

Dense retrieval calls for discriminative embeddings to represent the semantic relationship between query and document. It may benefit from the using of large language models (LLMs), given LLMs' strong capability on semantic understanding. However, the LLMs are learned by auto-regression, whose working mechanism is completely different from representing whole text as one discriminative embedding. Thus, it is imperative to study how to adapt LLMs properly so that they can be effectively initialized as the backbone encoder for dense retrieval. In this paper, we propose a novel approach, called Llama2Vec, which performs unsupervised adaptation of LLM for its dense retrieval application. Llama2Vec consists of two pretext tasks: EBAE (Embedding-Based Auto-Encoding) and EBAR (Embedding-Based Auto-Regression), where the LLM is prompted to reconstruct the input sentence and predict the next sentence based on its text embeddings. Llama2Vec is simple, lightweight, but highly effective. It is used to adapt LLaMA-2-7B on the Wikipedia corpus. With a moderate steps of adaptation, it substantially improves the model's fine-tuned performances on a variety of dense retrieval benchmarks. Notably, it results in the new state-of-the-art performances on popular benchmarks, such as passage and document retrieval on MSMARCO, and zero-shot retrieval on BEIR. The model and source code will be made publicly available to facilitate the future research. Our model is available at https://github.com/FlagOpen/FlagEmbedding.

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

↑