arXiv:2509.18886cs.PFcs.AR2025-09被引 16

首次验证CPU与GPU可信执行环境在大模型推理中的性能与成本表现

Confidential LLM Inference: Performance and Cost Across CPU and GPU TEEs

  • 在CPU和GPU的可信环境内运行Llama2全系列模型推理
  • CPU TEE延迟增益低于20%,吞吐损失低于10%,AMX加速有效降低开销
  • 揭示了不同硬件环境下安全、性能与成本的权衡,适合隐私敏感场景

大型语言模型(LLMs)正越来越多部署于云与高性能计算融合基础设施。由于其处理敏感输入并基于高成本专有数据集微调,隐私敏感领域如医疗、金融对其安全性要求更高,阻碍了应用落地。本文研究该问题,提出使用可信执行环境(TEEs)实现端到端的保密大模型推理。我们在完全基于CPU和GPU TEE的环境中评估这些计算密集型任务的可行性。在CPU端,深入测试了完整Llama2推理流水线(7B、13B、70B)在Intel TDX与SGX中的表现,并借助高级矩阵扩展(AMX)加速。共得出12项洞察:在多种数据类型、批大小与输入长度下,CPU TEE带来的吞吐损失低于10%,延迟增加不超过20%,且AMX可进一步降低开销。在NVIDIA H100 Confidential Compute GPU上运行推理,观察到4-8%的吞吐惩罚,且随着批大小和输入规模增长而减弱。通过对比性能、成本与安全权衡,证明在某些场景下CPU TEE比GPU TEE更具成本效益或安全性。据我们所知,本工作是首个全面展示现代TEE在CPU与GPU上支持保密大模型(cLLMs)性能与实用性的研究。

原文摘要 · Abstract (English)

Large Language Models (LLMs) are increasingly deployed on converged Cloud and High-Performance Computing (HPC) infrastructure. However, as LLMs handle confidential inputs and are fine-tuned on costly, proprietary datasets, their heightened security requirements slow adoption in privacy-sensitive sectors such as healthcare and finance. We investigate methods to address this gap and propose Trusted Execution Environments (TEEs) as a solution for securing end-to-end LLM inference. We validate their practicality by evaluating these compute-intensive workloads entirely within CPU and GPU TEEs. On the CPU side, we conduct an in-depth study running full Llama2 inference pipelines (7B, 13B, 70B) inside Intel's TDX and SGX, accelerated by Advanced Matrix Extensions (AMX). We derive 12 insights, including that across various data types, batch sizes, and input lengths, CPU TEEs impose under 10% throughput and 20% latency overheads, further reduced by AMX. We run LLM inference on NVIDIA H100 Confidential Compute GPUs, contextualizing our CPU findings and observing throughput penalties of 4-8% that diminish as batch and input sizes grow. By comparing performance, cost, and security trade-offs, we show how CPU TEEs can be more cost-effective or secure than their GPU counterparts. To our knowledge, our work is the first to comprehensively demonstrate the performance and practicality of modern TEEs across both CPUs and GPUs for enabling confidential LLMs (cLLMs).

大模型安全可信执行环境隐私计算性能评估

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