arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.21952cs.ARcs.DBcs.DC
收藏

NasZip: 软件和硬件协同设计以加速基于DIMM的近数据处理的近似最近邻搜索

NasZip: Software and Hardware Co-Design to Accelerate Approximate Nearest Neighbor Search with DIMM-Based Near-Data Processing

Shanghai Jiao Tong University(上海交通大学);Shanghai AI Laboratory(上海人工智能实验室);Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);Lenovo Research(联想研究院)

Cheng Zou, Shuo Yang, Chen Nie, Yu Zou, Yu He, Chao Jiang, Limin Xiao, Weifeng Zhang, Zhezhi He

AI总结:

本文提出NasZip框架,通过结合近数据处理和基于统计的主成分分析的特征级早退技术,优化高维向量距离计算,从而在保持准确性的同时提升近似最近邻搜索的效率。

摘要:

随着大型语言模型(LLMs)的持续发展,检索增强生成(RAG)已成为扩展模型知识和减少幻觉的关键机制。RAG的核心是近似最近邻搜索(ANNS),它检索与给定查询最相似的数据库向量。然而,高维向量的距离计算本质上是内存受限的,导致检索性能受到主流平台如CPU和GPU上的I/O带宽的限制。尽管许多先前的早退(EE)技术试图通过只计算部分维度来减少内存访问,但部分距离收敛到早退阈值的速度太慢,最终限制了其性能提升。为了解决这些挑战,我们提出了NasZip,一个集成了近数据处理(NDP)和基于统计的主成分分析(PCA)的新型特征级早退技术的硬件-软件协同设计框架。NasZip不依赖于部分距离,而是结合了估计和修正参数,以准确近似全维度距离,从而在不牺牲准确性的情况下实现更早的早退。我们进一步引入了一种位级NDP-aware动态浮点方案,显著减少了向量数据的内存访问。在硬件方面,我们开发了一种数据感知的邻居列表映射策略,以减少邻居检索延迟和通道间通信开销,并辅以专用缓存,利用数据局部性提高预取效率。通过这些协同优化技术,NasZip在等精度下,相对于CPU基线和最先进的GPU实现分别实现了高达8.4倍和1.4倍的加速。与最先进的NDP ANNS加速器ANSMET相比,NasZip实现了1.69倍的性能提升。

英文摘要:

As large language models (LLMs) continue to advance, retrieval-augmented generation (RAG) has become the key mechanism for expanding model knowledge and reducing hallucinations. Central to RAG is approximate nearest neighbor search (ANNS), which retrieves database vectors most similar to a given query. However, distance calculation over high-dimensional vectors is inherently memory-bound, causing retrieval performance to be constrained by I/O bandwidth on mainstream platforms such as CPUs and GPUs. Although many prior early exiting (EE) techniques attempt to reduce memory accesses by only computing partial dimensions, the partial distance converges too slowly to the EE threshold, which ultimately limits their performance gains. To address these challenges, we propose NASZIP, a hardware-software co-designed framework that integrates near data processing (NDP) with a novel feature-level early exiting guided by statistics-based principal component analysis (PCA). Instead of relying solely on partial distances, NASZIP incorporates estimation and correction parameters to approximate full dimensional distances accurately, enabling earlier exiting without compromising accuracy. We further introduce a bit-level NDP-aware dynamic-float scheme that significantly reduces memory access for vector data. On the hardware side, we develop a data aware neighbor list mapping strategy that reduces neighbor retrieval latency and inter-channel communication overhead, complemented by a dedicated cache that exploits data locality and enhances prefetch efficiency. With these co-optimized techniques, NASZIP delivers speedups of up to $8.4\times$ / $1.4\times$ over CPU baseline and state-of-the-art GPU implementation at equal accuracy. Relative to the state-of-the-art NDP ANNS accelerator ANSMET, NASZIP achieves $1.69\times$ performance improvement.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑