一个模型同时完成生成、检索和压缩,推理效率提升三倍。
GRC: Unifying Reasoning-Driven Generation, Retrieval and Compression

- 用元隐状态统一生成、表征与压缩任务,单次前向传播完成
- 训练数据利用率提升3倍,推理延迟显著降低
- 适合需要长上下文和持续学习的智能体应用
当前文本嵌入与生成任务通常基于大语言模型分别训练,导致训练成本高、部署复杂。上下文压缩在需要长上下文与持续学习的推理驱动生成和智能体任务中尤为关键但极具挑战。本文提出GRC框架,通过元隐状态与统一的生成-表征-压缩训练范式,实现三个任务在一次前向传播中协同完成。模型具备模块化、乐高式灵活性,大幅降低检索增强生成(RAG)的部署成本,训练时数据利用率提升三倍,推理高效。该设计催生新嵌入范式:自推理隐状态嵌入;新生成范式:隐状态记忆增强生成,使用长度为O(1)的可更新键值缓存作为内部记忆。还引入混合分页注意力加速推理。在多个推理密集型检索基准、生成任务、文档压缩、延迟评估及RAG设置中验证了方法有效性,有望推动真正统一的推理驱动生成、嵌入与压缩模型发展。
原文摘要 · Abstract (English)
Text embedding and generative tasks are usually trained separately based on large language models (LLMs) nowadays. This causes a large amount of training cost and deployment effort. Context compression is also a challenging and pressing task, which is vital to reasoning-driven generation, and agentic tasks requiring long context and continual learning. In this paper, we explore how to unify reasoning-driven generation, reasoning-enhanced text representation and context compression tasks in one forward pass for LLMs. Through meta latent tokens and a unified generative, representative and compressive tuning approach, we propose a training framework named GRC that bridges the three tasks. The trained models can accomplish three objectives in a single forward pass while maintaining modular, LEGO-style flexibility during inference. This design greatly reduces the deployment effort for retrieval-augmented generation (RAG) and achieves efficient inference and three times data utilization during training. Furthermore, this framework design enables a new paradigm for text embedding: self-reason-latent embeds, and a new generation paradigm, latent memory-augmented generation, where compressed and internalized KV cache with O(1) length is used as the updatable memory. We also propose hybrid paged attention to speed up the inference of our models. Extensive experiments on reasoning-intensive retrieval benchmarks, generative tasks, document compression, latency evaluation, and RAG settings demonstrate the effectiveness of our method and may shed light on the truly unified model that can handle reasoning-driven generation, embedding and compression tasks seamlessly.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。