Lune

ACL2024Top-tier venue

Llama2Vec: Unsupervised Adaptation of Large Language Models for Dense Retrieval

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

Abstract

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 .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

9 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • LoRA: Low-Rank Adaptation of Large Language Models cites Language Models are Few-Shot Learners
  • Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
  • Query-Aware Flow Diffusion for Graph-Based RAG with Retrieval Guarantees cites PathRAG: Pruning Graph-based Retrieval Augmented Generation with Relational Paths
  • Query-Aware Flow Diffusion for Graph-Based RAG with Retrieval Guarantees cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
  • PathRAG: Pruning Graph-based Retrieval Augmented Generation with Relational Paths cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
  • Language Models are Few-Shot Learners cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
  • ReAlign: Optimizing the Visual Document Retriever with Reasoning-Guided Fine-Grained Alignment cites LoRA: Low-Rank Adaptation of Large Language Models
  • ReAlign: Optimizing the Visual Document Retriever with Reasoning-Guided Fine-Grained Alignment cites Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval
  • Finetuned Language Models are Zero-Shot Learners cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers9

  1. PathRAG: Pruning Graph-based Retrieval Augmented Generation with Relational PathsBoyu Chen, Zirui Guo, Zidan Yang, Yuluo Chen et al.AAAI 2026 · 45 citations
  2. Multi-Vector Index Compression in Any ModalityHanxiang Qin, Alexander Martin, Rohan Jha, Chunsheng Zuo et al.SIGIR 2026 · 11 citations
  3. Query-Aware Flow Diffusion for Graph-Based RAG with Retrieval GuaranteesZhuoping Zhou, Davoud Ataee Tarzanagh, Sima Didari, Wenjun Hu et al.ICLR 2026 · 6 citations
  4. ReAlign: Optimizing the Visual Document Retriever with Reasoning-Guided Fine-Grained AlignmentHao Yang, Yifan Ji, Zhipeng Xu, Zhenghao Liu et al.SIGIR 2026 · 4 citations
  5. Learning to Compress: Unlocking the Potential of Large Language Models for Text RepresentationYeqin Zhang, Yizheng Zhao, Chen Hu, Binxing Jiao et al.AAAI 2026 · 2 citations

Builds on15

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
  3. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  4. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 citations
  5. Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text RetrievalLee Xiong, Chenyan Xiong, Ye Li, Kwok-Fung Tang et al.ICLR 2021 · 1,547 citations

Related papers

  1. PromptReps: Prompting Large Language Models to Generate Dense and Sparse Representations for Zero-Shot Document RetrievalShengyao Zhuang, Xueguang Ma, Bevan Koopman, Jimmy Lin et al.EMNLP 2024 · 26 citations
  2. Leveraging LLMs for Unsupervised Dense Retriever RankingEkaterina Khramtsova, Shengyao Zhuang, Mahsa Baktashmotlagh, Guido ZucconSIGIR 2024 · 21 citations
  3. LexMAE: Lexicon-Bottlenecked Pretraining for Large-Scale RetrievalTao Shen, Xiubo Geng, Chongyang Tao, Can Xu et al.ICLR 2023 · 14 citations
  4. SimLM: Pre-training with Representation Bottleneck for Dense Passage RetrievalLiang Wang, Nan Yang, Xiaolong Huang, Binxing Jiao et al.ACL 2023 · 41 citations
  5. Search-Adaptor: Embedding Customization for Information RetrievalJinsung Yoon, Yanfei Chen, Sercan Ö. Arik, Tomas PfisterACL 2024
Dusk over the sea between two cliffs drawn in fine vertical lines