JUNO++: Optimizing ANNS and Enabling Efficient Sparse Attention in LLM via Ray Tracing Core
Approximate Nearest Neighbor Search (ANNS) is a fundamental technique in modern intelligent applications, including recommendation systems and vector databases. With the advent of large language models (LLMs), ANNS plays a critical role in enabling attention pruning mechanism that exploit the sparsity of attention, such as top-K attention and retrieval attention. As a result, the efficiency of ANNS has become increasingly crucial. In this article, we identify a key inefficiency in state-of-the art ANNS methods based on product quantization: the redundant computation and accumulation of pairwise distance with codebook. To address this, we propose JUNO++ , the system consists of (i) an end-to-end ANNS search pipeline based on ray-tracing core leveraging sparsity-aware algorithm and ii) an integration of the ray-tracing based ANNS search pipeline to the attention computation. For ANNS search pipeline, evaluation on four datasets indicate 2.2x to 8.5x search throughput improvement. For ANNS-powered sparse attention, JUNO++ achieves a 46% reduction in latency of \(q\times k^\top\) calculation comparing to the baseline with almost identical accuracy, which is not only a key component of retrieval-based sparse attention, but also the dominant component in long-context scenario, implying a considerable end-to-end improvement.
Authors
- Jingwen Leng (ORCID: https://orcid.org/0000-0002-5660-5493)
- Minyi Guo (ORCID: https://orcid.org/0000-0003-0034-2302)
- Yufei Ma (ORCID: https://orcid.org/0009-0002-5075-0099)
- Wentao Ni (ORCID: https://orcid.org/0009-0002-7355-0073)
- Chao Li (ORCID: https://orcid.org/0000-0001-6218-4659)
- Quan Chen (ORCID: https://orcid.org/0000-0001-5832-0347)
- Feng Zhang (ORCID: https://orcid.org/0000-0001-7178-0735)
- Yun Liang (ORCID: https://orcid.org/0000-0002-9076-7998)
- Zihan Liu (ORCID: https://orcid.org/0000-0002-0874-0682)
- Yu Feng (ORCID: https://orcid.org/0000-0002-2192-5737)
- Cong Guo (ORCID: https://orcid.org/0000-0002-4479-5525)
Institutions
- Shanghai Jiao Tong University (CN)
- Peking University (CN)
- ETC International (NL)
- China Academy of Information and Communications Technology (CN)
Publication Details
- Journal
- ACM Transactions on Architecture and Code Optimization
- Published
- 2025-09-18
- DOI
- https://doi.org/10.1145/3768585
- Primary Topic
- Advanced Image and Video Retrieval Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00