arXiv:2412.15246cs.CLcs.AI2024-12被引 52

用新型内存加速器提升大模型检索效率,让回答更准更快。

Accelerating Retrieval-Augmented Generation

  • 设计新型近内存加速器IKS,实现精确向量搜索提速
  • 在512GB向量库上比CPU快13.4-27.9倍,推理时间降1.7-26.3倍
  • 适合需要高精度检索的智能问答、知识增强应用

为解决大语言模型幻觉问题并提升准确性,检索增强生成(RAG)通过从外部知识源(如网络)获取信息来增强模型。本文分析多种RAG执行流程,揭示检索与生成阶段的复杂互动。研究表明,尽管精确检索成本较高,但其可向生成模型传递更少但更准确的文档列表,在保持端到端精度的前提下反而降低推理时间。为此,本文设计了智能知识存储器(IKS),一种支持横向扩展的近内存加速架构,采用新型主机与近内存加速器间的缓存一致性接口。IKS在512GB向量数据库上相较英特尔萨珀尔瑞普斯CPU实现13.4-27.9倍的精确最近邻搜索加速,使典型RAG应用的端到端推理时间降低1.7-26.3倍。IKS本质上是内存扩展器,其内部DRAM可拆分用于其他服务,避免昂贵的内存资源闲置。

原文摘要 · Abstract (English)

An evolving solution to address hallucination and enhance accuracy in large language models (LLMs) is Retrieval-Augmented Generation (RAG), which involves augmenting LLMs with information retrieved from an external knowledge source, such as the web. This paper profiles several RAG execution pipelines and demystifies the complex interplay between their retrieval and generation phases. We demonstrate that while exact retrieval schemes are expensive, they can reduce inference time compared to approximate retrieval variants because an exact retrieval model can send a smaller but more accurate list of documents to the generative model while maintaining the same end-to-end accuracy. This observation motivates the acceleration of the exact nearest neighbor search for RAG. In this work, we design Intelligent Knowledge Store (IKS), a type-2 CXL device that implements a scale-out near-memory acceleration architecture with a novel cache-coherent interface between the host CPU and near-memory accelerators. IKS offers 13.4-27.9x faster exact nearest neighbor search over a 512GB vector database compared with executing the search on Intel Sapphire Rapids CPUs. This higher search performance translates to 1.7-26.3x lower end-to-end inference time for representative RAG applications. IKS is inherently a memory expander; its internal DRAM can be disaggregated and used for other applications running on the server to prevent DRAM, which is the most expensive component in today's servers, from being stranded.

检索增强向量搜索近内存计算大模型优化

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