arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.04783cs.CRcs.AR
收藏

基于GPU的TFHE高精度非线性层加速用于加密LLM推理

GPU Acceleration of TFHE-Based High-Precision Nonlinear Layers for Encrypted LLM Inference

Peking University(北京大学);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);Xiamen University(厦门大学);Nanjing University(南京大学);Ant Group(蚂蚁集团)

Guoci Chen, Xiurui Pan, Qiao Li, Bo Mao, Congming Gao, Chengying Huan, Mingzhe Zhang, Jie Zhang

AI总结:

本文提出TIGER框架,通过GPU优化的WoP-PBS方法和数值算法,实现高精度加密LLM非线性层计算,提升GPU效率,实现GELU、Softmax和LayerNorm的加速效果。

摘要:

部署大型语言模型(LLM)作为云服务会引发隐私问题,因为推理可能泄露敏感数据。全同态加密(FHE)允许在加密数据上进行计算,但当前FHE方法在高效和精确的非线性函数评估上存在困难。具体而言,CKKS方法需要高次多项式近似,当目标精度增加时成本较高。替代方案是TFHE的可编程重启(PBS)方法,它通过提供精确的查找表评估优于CKKS。但其缺乏高精度的LLM非线性层实现,并且未充分利用GPU资源。我们提出了TIGER,这是首个用于高精度TFHE非线性LLM层评估的GPU加速框架。TIGER提供:(1)结合数值算法的GPU优化WoP-PBS方法,以超越非线性函数的原生查找表精度限制;(2)高精度且高效的非线性层实现,使加密推理变得实用;(3)基于批处理的设计,利用输入间并行性以提升GPU效率。TIGER在GELU、Softmax和LayerNorm上分别实现了7.17倍、16.68倍和17.05倍的CPU基线加速效果。

英文摘要:

Deploying large language models (LLMs) as cloud services raises privacy concerns as inference may leak sensitive data. Fully Homomorphic Encryption (FHE) allows computation on encrypted data, but current FHE methods struggle with efficient and precise nonlinear function evaluation. Specifically, CKKS-based approaches require high-degree polynomial approximations, which are costly when target precision increases. Alternatively, TFHE's Programmable Bootstrapping (PBS) outperforms CKKS by offering exact lookup-table evaluation. But it lacks high-precision implementations of LLM nonlinear layers and underutilizes GPU resources. We propose \emph{TIGER}, the first GPU-accelerated framework for high-precision TFHE-based nonlinear LLM layer evaluation. TIGER offers: (1) GPU-optimized WoP-PBS method combined with numerical algorithms to surpass native lookup-table precision limits on nonlinear functions; (2) high-precision and efficient implementations of key nonlinear layers, enabling practical encrypted inference; (3) batch-driven design exploiting inter-input parallelism to boost GPU efficiency. TIGER achieves 7.17$\times$, 16.68$\times$, and 17.05$\times$ speedups over a CPU baseline for GELU, Softmax, and LayerNorm, respectively.

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

↑