arXiv:2410.04343cs.CL2024-10ICLR被引 64

通过优化推理计算分配,让长上下文大模型在知识问答中性能提升近60%。

Inference Scaling for Long-Context Retrieval Augmented Generation

  • 设计多策略组合的推理扩展方法,灵活分配生成与检索资源。
  • 最优配置下,推理算力每增加一倍,性能接近线性提升。
  • 可预测最佳推理参数,适用于有限算力下的高效部署场景。

推理算力的扩展释放了长上下文大语言模型在多种任务中的潜力。对于知识密集型任务,更多算力常被用于引入外部知识,但若无法有效利用这些知识,单纯扩展上下文未必提升性能。本文研究检索增强生成(RAG)中的推理扩展,探索除增加知识数量外的多种策略,包括上下文学习与迭代提示。这些策略提升了测试时计算的灵活性(如增加召回文档数或生成步数),从而增强模型获取并利用上下文信息的能力。我们提出两个核心问题:(1) 在最优配置下,RAG性能如何随推理算力扩展而提升?(2) 能否通过建模性能与推理参数的关系,预测给定算力预算下的最优分配?实验发现,当算力最优分配时,RAG性能随推理计算呈近乎线性增长,我们称之为RAG的推理扩展规律。基于此,我们构建了计算分配模型,可准确预测不同推理配置下的性能表现,并推荐最优参数。应用该策略,相比标准RAG,在基准数据集上实现最高达58.9%的性能提升。

原文摘要 · Abstract (English)

The scaling of inference computation has unlocked the potential of long-context large language models (LLMs) across diverse settings. For knowledge-intensive tasks, the increased compute is often allocated to incorporate more external knowledge. However, without effectively utilizing such knowledge, solely expanding context does not always enhance performance. In this work, we investigate inference scaling for retrieval augmented generation (RAG), exploring the combination of multiple strategies beyond simply increasing the quantity of knowledge, including in-context learning and iterative prompting. These strategies provide additional flexibility to scale test-time computation (e.g., by increasing retrieved documents or generation steps), thereby enhancing LLMs' ability to effectively acquire and utilize contextual information. We address two key questions: (1) How does RAG performance benefit from the scaling of inference computation when optimally configured? (2) Can we predict the optimal test-time compute allocation for a given budget by modeling the relationship between RAG performance and inference parameters? Our observations reveal that increasing inference computation leads to nearly linear gains in RAG performance when optimally allocated, a relationship we describe as the inference scaling laws for RAG. Building on this, we further develop the computation allocation model to estimate RAG performance across different inference configurations. The model predicts optimal inference parameters under various computation constraints, which align closely with the experimental results. By applying these optimal configurations, we demonstrate that scaling inference compute on long-context LLMs achieves up to 58.9% gains on benchmark datasets compared to standard RAG.

RAG推理扩展长上下文算力分配

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。