TY - GEN
T1 - Robust Implementation of Retrieval-Augmented Generation on Edge-based Computing-in-Memory Architectures
AU - Qin, Ruiyang
AU - Yan, Zheyu
AU - Zeng, Dewen
AU - Jia, Zhenge
AU - Liu, Dancheng
AU - Liu, Jianbo
AU - Abbasi, Ahmed
AU - Zheng, Zhi
AU - Cao, Ningyuan
AU - Ni, Kai
AU - Xiong, Jinjun
AU - Shi, Yiyu
N1 - Publisher Copyright:
© 2024 Copyright is held by the owner/author(s).
PY - 2025/4/9
Y1 - 2025/4/9
N2 - Large Language Models (LLMs) deployed on edge devices learn through fine-tuning and updating a certain portion of their parameters. Although such learning methods can be optimized to reduce resource utilization, the overall required resources remain a heavy burden on edge devices. Instead, Retrieval-Augmented Generation (RAG), a resource-efficient LLM learning method, can improve the quality of the LLM-generated content without updating model parameters. However, the RAG-based LLM may involve repetitive searches on the profile data in every user-LLM interaction. This search can lead to significant latency along with the accumulation of user data. Conventional efforts to decrease latency result in restricting the size of saved user data, thus reducing the scalability of RAG as user data continuously grows. It remains an open question: how to free RAG from the constraints of latency and scalability on edge devices? In this paper, we propose a novel framework to accelerate RAG via Computing-in-Memory (CiM) architectures. It accelerates matrix multiplications by performing in-situ computation inside the memory while avoiding the expensive data transfer between the computing unit and memory. Our framework, Robust CiM-backed RAG (RoCR), utilizing a novel contrastive learning-based training method and noise-aware training, can enable RAG to efficiently search profile data with CiM. To the best of our knowledge, this is the first work utilizing CiM to accelerate RAG.
AB - Large Language Models (LLMs) deployed on edge devices learn through fine-tuning and updating a certain portion of their parameters. Although such learning methods can be optimized to reduce resource utilization, the overall required resources remain a heavy burden on edge devices. Instead, Retrieval-Augmented Generation (RAG), a resource-efficient LLM learning method, can improve the quality of the LLM-generated content without updating model parameters. However, the RAG-based LLM may involve repetitive searches on the profile data in every user-LLM interaction. This search can lead to significant latency along with the accumulation of user data. Conventional efforts to decrease latency result in restricting the size of saved user data, thus reducing the scalability of RAG as user data continuously grows. It remains an open question: how to free RAG from the constraints of latency and scalability on edge devices? In this paper, we propose a novel framework to accelerate RAG via Computing-in-Memory (CiM) architectures. It accelerates matrix multiplications by performing in-situ computation inside the memory while avoiding the expensive data transfer between the computing unit and memory. Our framework, Robust CiM-backed RAG (RoCR), utilizing a novel contrastive learning-based training method and noise-aware training, can enable RAG to efficiently search profile data with CiM. To the best of our knowledge, this is the first work utilizing CiM to accelerate RAG.
UR - https://www.scopus.com/pages/publications/105003643654
U2 - 10.1145/3676536.3676674
DO - 10.1145/3676536.3676674
M3 - Conference contribution
AN - SCOPUS:105003643654
T3 - IEEE/ACM International Conference on Computer-Aided Design, Digest of Technical Papers, ICCAD
BT - Proceedings of the 43rd IEEE/ACM International Conference on Computer-Aided Design, ICCAD 2024
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 43rd International Conference on Computer-Aided Design, ICCAD 2024
Y2 - 27 October 2024 through 31 October 2024
ER -