arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.16352cs.LGcs.AI
收藏

面向LLM推理的高效通信可验证注意力机制

Communication-Efficient Verifiable Attention for LLM Inference

Nanyang Technological University(南洋理工大学);Zero Gravity Labs(零重力实验室)

Ziqun Chen, Ming Wu, Michael Heinrich, Jason Zeng, Huiying Lan, Tianwei Zhang, Rui Tan

AI总结:

提出VeriAttn,通过将注意力计算卸载到GPU并由TEE验证,结合两阶段流水线和分区策略,显著降低TEE计算和通信开销,实现LLM推理加速。

摘要:

远程大型语言模型(LLM)服务的计算完整性可能存在问题。对于传统深度神经网络(DNN),现有的TEE屏蔽DNN分区(TSDP)方法使用可信执行环境(TEE)计算非线性组件,并验证卸载到不可信GPU的线性组件的完整性。然而,直接将TSDP应用于基于Transformer的LLM会导致大量的TEE计算和TEE-GPU通信开销。本文提出通信高效的TEE-GPU注意力机制(\textsc{VeriAttn}),用于加速可验证的LLM推理。\textsc{VeriAttn}将注意力的线性和非线性计算都卸载到GPU,而TEE执行验证。此外,对于预填充阶段,\textsc{VeriAttn}使用两级流水线来重叠数据移动、TEE前后处理和GPU计算。对于解码阶段,当键值缓存超过可用GPU内存时,\textsc{VeriAttn}将注意力在TEE和GPU之间分区,以减少重复的键值传输。在Intel TDX平台上的评估表明,对于6k令牌提示和10k令牌输出,\textsc{VeriAttn}在预填充和解码阶段分别比TSDP加速2.60-3.38倍和3.86-5.42倍。

英文摘要:

Computation integrity of remote large language model (LLM) serving can be questionable. For conventional deep neural networks (DNNs), the existing TEE-shielded DNN partitioning (TSDP) approach uses Trusted Execution Environment (TEE) to compute non-linear components and verify the integrity of linear components offloaded to an untrusted GPU. However, directly applying TSDP to Transformer-based LLMs incurs significant TEE computation and TEE-GPU communication overhead. This paper presents Communication-efficient TEE-GPU Attention (\textsc{VeriAttn}) for accelerating verifiable LLM inference. \textsc{VeriAttn} offloads both linear and non-linear computations of attention to the GPU, while TEE performs verification. Moreover, for prefill, \textsc{VeriAttn} uses a two-level pipeline to overlap data movement, TEE pre-/post-processing, and GPU computation. For decoding, when the key-value cache exceeds available GPU memory, \textsc{VeriAttn} partitions attention across TEE and GPU to reduce repeated key-value transfers. Evaluation on an Intel TDX platform shows that \textsc{VeriAttn} achieves 2.60-3.38$\times$ and 3.86-5.42$\times$ acceleration over TSDP for 6k-token prompts and 10k-token outputs during prefill and decoding, respectively.

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

↑