Comet:通过预测激活稀疏性加速大语言模型的隐私推理
Comet: Accelerating Private Inference for Large Language Model by Predicting Activation Sparsity
AI总结:
本文提出 Comet 隐私推理系统,通过预测 LLM 激活稀疏分布、跳过零值计算并采用低通信缓存重填策略,在四个模型上相比六种系统最高实现 2.63 倍加速和 2.64 倍通信削减。
摘要:
随着云平台上托管的大语言模型(LLM)越来越多地用于提供推理服务,有关敏感信息潜在泄露的隐私担忧正在加剧。安全多方计算(MPC)是保护 LLM 推理隐私的一种有前景的解决方案。然而,MPC 需要频繁的服务器间通信,导致较高的性能开销。受 LLM 中普遍存在的激活稀疏性(即在非线性激活函数之后大多数神经元未被激活)启发,我们提出了一个高效的隐私推理系统 Comet。该系统采用准确且快速的预测器来预测激活函数输出的稀疏分布。此外,我们引入了一种新的隐私推理协议。该协议利用预测稀疏分布的空间局部性,高效且安全地避免涉及零值的计算。虽然这种计算避免方法会影响 KV cache 条目的时空连续性,但我们通过一种低通信开销的缓存重填策略解决了这一挑战,该策略合并未命中请求并结合预取机制。最后,我们在四个常见 LLM 上评估 Comet,并将其与六个最先进的隐私推理系统进行比较。Comet 实现了 1.87 倍至 2.63 倍的加速,以及 1.94 倍至 2.64 倍的通信减少。
英文摘要:
With the growing use of large language models (LLMs) hosted on cloud platforms to offer inference services, privacy concerns about the potential leakage of sensitive information are escalating. Secure multi-party computation (MPC) is a promising solution to protect the privacy in LLM inference. However, MPC requires frequent inter-server communication, causing high performance overhead. Inspired by the prevalent activation sparsity of LLMs, where most neuron are not activated after non-linear activation functions, we propose an efficient private inference system, Comet. This system employs an accurate and fast predictor to predict the sparsity distribution of activation function output. Additionally, we introduce a new private inference protocol. It efficiently and securely avoids computations involving zero values by exploiting the spatial locality of the predicted sparse distribution. While this computation-avoidance approach impacts the spatiotemporal continuity of KV cache entries, we address this challenge with a low-communication overhead cache refilling strategy that merges miss requests and incorporates a prefetching mechanism. Finally, we evaluate Comet on four common LLMs and compare it with six state-of-the-art private inference systems. Comet achieves a 1.87x-2.63x speedup and a 1.94x-2.64x communication reduction.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。