FastQuery:面向私有大语言模型推理的高效通信嵌入表查询
FastQuery: Communication-efficient Embedding Table Query for Private LLM Inference
AI总结:
FastQuery通过通信感知量化与一热感知打包,优化私有嵌入表查询,显著降低延迟和通信开销。
摘要:
随着大语言模型(LLMs)的快速发展,用户查询可能包含敏感信息,由此引发的隐私问题日益凸显。基于同态加密(HE)的私有推理已被提出以保护用户查询隐私。然而,私有嵌入表查询必须被表述为基于HE的矩阵-向量乘法问题,并遭受巨大的计算和通信开销。我们观察到,这一开销主要源于忽视了以下两点:1)用户查询的一热(one-hot)特性;2)嵌入表对低位宽量化噪声的鲁棒性。因此,在本文中,我们提出了一种名为FastQuery的私有嵌入表查询优化框架。FastQuery采用通信感知的嵌入表量化算法和一热感知的密集打包算法,同时降低计算和通信成本。与先前的基于HE的框架(如Cheetah、Iron和Bumblebee)相比,FastQuery在LLAMA-7B和LLAMA-30B上分别实现了超过4.3倍、2.7倍、1.3倍的延迟降低,以及超过75.7倍、60.2倍、20.2倍的通信量减少。
英文摘要:
With the fast evolution of large language models (LLMs), privacy concerns with user queries arise as they may contain sensitive information. Private inference based on homomorphic encryption (HE) has been proposed to protect user query privacy. However, a private embedding table query has to be formulated as a HE-based matrix-vector multiplication problem and suffers from enormous computation and communication overhead. We observe the overhead mainly comes from the neglect of 1) the one-hot nature of user queries and 2) the robustness of the embedding table to low bit-width quantization noise. Hence, in this paper, we propose a private embedding table query optimization framework, dubbed FastQuery. FastQuery features a communication-aware embedding table quantization algorithm and a one-hot-aware dense packing algorithm to simultaneously reduce both the computation and communication costs. Compared to prior-art HE-based frameworks, e.g., Cheetah, Iron, and Bumblebee, FastQuery achieves more than $4.3\times$, $2.7\times$, $1.3\times$ latency reduction, respectively and more than $75.7\times$, $60.2\times$, $20.2\times$ communication reduction, respectively, on both LLAMA-7B and LLAMA-30B.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。