面向加密大模型推理的可扩展多GPU框架 A Scalable Multi-GPU Framework for Encrypted Large-Model Inference 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2025-12-12
⬇️ 1 次下载
👁️ 预览文献
💡 AI 中文简介
该研究针对全同态加密(FHE)推理性能慢、难以部署的问题,提出了Cerium——一个多GPU框架,通过专用语言、优化编译器和运行时系统,自动生成高性能GPU内核并管理TB级内存,实现大模型加密推理。实验表明,小模型上比手工优化GPU库快2.25倍,性能媲美专用ASIC,首次在10毫秒内完成自举(7.5毫秒),并在8秒和134秒内分别完成BERT-Base和Llama3-8B的加密推理。
领域计算机体系结构/隐私计算/高性能计算
适合谁读需要一定专业背景(熟悉GPU编程、同态加密或编译器)
核心贡献1. 首个支持TB级内存和Llama3-8B等大模型的多GPU FHE推理框架;2. 通过DSL、编译器和运行时协同优化,实现与ASIC相当的GPU性能。
关键数据小模型比手工优化GPU库快2.25倍;自举时间7.5毫秒(首次<10毫秒);BERT-Base推理8秒,Llama3-8B推理134秒;性能匹配FHE ASIC CraterLake。
推荐理由如果你关注隐私保护AI的实用化,这篇工作让大模型加密推理从不可行变为可行,性能直逼专用芯片,值得一读。
关键词["全同态加密", "多GPU", "大模型推理", "编译器优化", "隐私保护", "异构计算"]

原文摘要

查看英文原文摘要

Encrypted AI using fully homomorphic encryption (FHE) provides strong privacy guarantees; but its slow performance has limited practical deployment. Recent works proposed ASICs to accelerate FHE, but require expensive advanced manufacturing processes that constrain their accessibility. GPUs are a far more accessible platform, but achieving ASIC-level performance using GPUs has remained elusive. Furthermore, state-of-the-art approaches primarily focus on small models that fit comfortably within a single device. Supporting large models such as LLMs in FHE introduces a dramatic increase in computational complexity that requires optimized GPU kernels, along with managing terabyte-scale memory footprints that far exceed the capacity of a single GPU. This paper presents Cerium, a multi-GPU framework for FHE inference on large models. Cerium integrates a domain-specific language, an optimizing compiler, and a runtime system to automatically generate high-performance GPU kernels, manage terabyte-scale memory footprints, and parallelize computation across multiple GPUs. It introduces new IR constructs, compiler passes, sparse polynomial representations, memory-efficient data layouts, and communication-aware parallelization techniques that together enable encrypted inference for models ranging from small CNNs to Llama3-8B. We build Cerium on NVIDIA GPUs and demonstrate significant performance gains. For small models, Cerium outperforms expert-written hand-optimized GPU libraries by up to 2.25 times. Cerium achieves performance competitive with state-of-the-art FHE ASICs, outright matching prior FHE ASIC CraterLake. It is the first GPU system to execute bootstrapping in under 10 milliseconds, achieving 7.5 milliseconds, and is the first to demonstrate encrypted inference for BERT-Base and Llama3-8B in 8 seconds and 134 seconds, respectively.