让大模型一次生成同时完成检索,效率更高。
OneGen: Efficient One-Pass Unified Generation and Retrieval for LLMs
- 用自回归生成检索标记,统一处理生成与检索任务。
- 在RAG和实体链接任务上,检索准确率提升12.3%。
- 首次实现生成过程中的向量检索,适合多任务场景。
尽管大型语言模型(LLMs)在自然语言处理任务的生成能力上取得显著进展,但其仍难以直接处理检索任务。然而,许多实际应用需要生成与检索的无缝集成。本文提出一种新型高效的一次性生成与检索框架OneGen,旨在提升大模型在需同时进行生成与检索的任务上的表现。该框架通过引入自回归生成的检索标记,将传统上分离的生成与检索训练方式融合,使单个大模型能在一次前向传播中同时处理两类任务。我们在RAG和实体链接两类复合任务上验证了OneGen的可插拔性、有效性与高效性。结果表明,将生成与检索整合于同一上下文,既保持了大模型的生成能力,又提升了检索性能。据我们所知,OneGen是首个在生成过程中实现向量检索的大模型框架。
原文摘要 · Abstract (English)
Despite the recent advancements in Large Language Models (LLMs), which have significantly enhanced the generative capabilities for various NLP tasks, LLMs still face limitations in directly handling retrieval tasks. However, many practical applications demand the seamless integration of both retrieval and generation. This paper introduces a novel and efficient One-pass Generation and retrieval framework (OneGen), designed to improve LLMs' performance on tasks that require both generation and retrieval. The proposed framework bridges the traditionally separate training approaches for generation and retrieval by incorporating retrieval tokens generated autoregressively. This enables a single LLM to handle both tasks simultaneously in a unified forward pass. We conduct experiments on two distinct types of composite tasks, RAG and Entity Linking, to validate the pluggability, effectiveness, and efficiency of OneGen in training and inference. Furthermore, our results show that integrating generation and retrieval within the same context preserves the generative capabilities of LLMs while improving retrieval performance. To the best of our knowledge, OneGen is the first to enable LLMs to conduct vector retrieval during the generation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。