arXiv:2505.15252cs.CRcs.LG2025-05ICML被引 1

用公开模型生成,私有模型验证,实现高效私有GPT推理

An Efficient Private GPT Never Autoregressively Decodes

  • 公开模型生成候选词,私有模型安全验证,避免全程私有解码
  • 实测速度提升2.1到6.0倍,隐私和生成质量不变
  • 适合需要高效率私有推理的系统部署场景

生成式预训练变换器(GPT)的广泛应用引发了客户端与服务器双方的隐私担忧。尽管可使用密码学原语实现安全推理以保护双方隐私,但会带来显著性能开销。为加速安全推理,本文提出一种公共解码与安全验证的方法:利用公共GPT模型生成一组候选token,再由私有模型进行安全验证以决定是否采纳。该方法效率取决于公共模型提出的token被接受的比例,通过两个方面提升:(1)针对密码学原语优化的私有采样协议;(2)通过知识蒸馏实现模型对齐。实验表明,在三组公私模型组合及不同网络条件下,相比标准解码,本方法实现2.1×~6.0×的速度提升,同时保持相同隐私级别与生成质量。

原文摘要 · Abstract (English)

The wide deployment of the generative pre-trained transformer (GPT) has raised privacy concerns for both clients and servers. While cryptographic primitives can be employed for secure GPT inference to protect the privacy of both parties, they introduce considerable performance overhead.To accelerate secure inference, this study proposes a public decoding and secure verification approach that utilizes public GPT models, motivated by the observation that securely decoding one and multiple tokens takes a similar latency. The client uses the public model to generate a set of tokens, which are then securely verified by the private model for acceptance. The efficiency of our approach depends on the acceptance ratio of tokens proposed by the public model, which we improve from two aspects: (1) a private sampling protocol optimized for cryptographic primitives and (2) model alignment using knowledge distillation. Our approach improves the efficiency of secure decoding while maintaining the same level of privacy and generation quality as standard secure decoding. Experiments demonstrate a $2.1\times \sim 6.0\times$ speedup compared to standard decoding across three pairs of public-private models and different network conditions.

隐私推理GPT加密计算高效生成

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