Paper 2025/1184 Original: eprint.iacr.org/2025/1184 ↗

zkGPT: An Efficient Non-interactive Zero-knowledge Proof Framework for LLM Inference

Wenjie Qu
Yijun Sun
Xuanming Liu
Tao Lu
Yanpei Guo
Kai Chen
Jiaheng Zhang
Abstract

Large Language Models (LLMs) are widely employed for their ability to generate human-like text. However, service providers may deploy smaller models to reduce costs, potentially deceiving users. Zero-Knowledge Proofs (ZKPs) offer a solution by allowing providers to prove LLM inference without compromising the privacy of model parameters. Existing solutions either do not support LLM architectures or suffer from significant inefficiency and tremendous overhead. To address this issue, this paper introduces several new techniques. We propose new methods to efficiently prove linear and non-linear layers in LLMs, reducing computation overhead by orders of magnitude. To further enhance efficiency, we propose constraint fusion to reduce the overhead of proving non-linear layers and circuit squeeze to improve parallelism. We implement our efficient protocol, specifically tailored for popular LLM architectures like GPT-2, and deploy optimizations to enhance performance. Experiments show that our scheme can prove GPT-2 inference in less than 25 seconds. Compared with state-of-the-art systems such as Hao et al. (USENIX Security'24) and ZKML (Eurosys'24), our work achieves nearly $279\times$ and $185\times$ speedup, respectively.

Metadata
Available format(s)
PDF
Category
Cryptographic protocols
Publication info
Preprint.
History
2025-08-27: last updated
2025-06-24: published
Short URL
https://ia.cr/2025/1184
License
https://creativecommons.org/licenses/by-nc/4.0/

BibTeX

@misc{cryptoeprint:2025/1184,
      author = {Wenjie Qu and Yijun Sun and Xuanming Liu and Tao Lu and Yanpei Guo and Kai Chen and Jiaheng Zhang},
      title = {zkGPT: An Efficient Non-interactive Zero-knowledge Proof Framework for LLM Inference},
      howpublished = {Cryptology {ePrint} Archive, Paper 2025/1184},
      year = {2025},
      url = {https://eprint.iacr.org/2025/1184}
}
Note: In order to protect the privacy of readers, this archive does not use cookies or embedded third party content.