arXiv:2512.11269cs.CRcs.AI2025-12被引 9

用GPU实现加密大模型推理,速度逼近专用芯片。

A Scalable Multi-GPU Framework for Encrypted Large-Model Inference

  • 设计多GPU框架自动优化加密计算与内存管理。
  • 首次实现Llama3-8B加密推理仅需134秒,密钥刷新快至7.5毫秒。
  • 适合需要隐私保护的大模型部署者,如金融医疗领域。

使用全同态加密(FHE)的加密AI能提供强隐私保障,但其性能瓶颈限制了实际应用。已有研究通过专用集成电路(ASIC)加速FHE,但制造成本高昂且难以普及。相比之下,GPU更易获取,但要在GPU上达到ASIC级性能仍具挑战。现有方法多集中于小模型,而支持大模型如大语言模型(LLM)的加密推理带来计算复杂度剧增,需优化GPU内核并处理超出单卡容量的千兆字节级内存。本文提出Cerium,一种面向大模型的多GPU FHE推理框架。Cerium整合领域特定语言、优化编译器与运行时系统,自动生成高性能GPU内核,管理千兆字节级内存,跨多张GPU并行计算。其引入新型中间表示、编译器优化阶段、稀疏多项式表示、内存高效数据布局及通信感知并行策略,使加密推理可扩展至从小型CNN到Llama3-8B的模型。基于NVIDIA GPU构建,实验显示:对小模型,性能优于人工优化库最高达2.25倍;性能媲美先进FHE ASIC,甚至超越先前的CraterLake ASIC。首次实现密钥刷新时间低于10毫秒(达7.5毫秒),并首次在8秒内完成BERT-Base加密推理,134秒内完成Llama3-8B推理。

原文摘要 · Abstract (English)

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.

加密推理多GPUFHE大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。