Paper 2026/2532

HERMES: High-Performance Private Decoding for Large Language Models

MohammadHossein Olyaiy, The University of British Columbia
Cora Shao, The University of British Columbia
Dingqing Yang, The University of British Columbia
Mohammad Shahrad, The University of British Columbia
Mieszko Lis, The University of British Columbia
Abstract

Privacy-preserving inference (PI) enables users to query large language models (LLMs) without revealing their prompts, but incurs substantial computation and communication overhead. Prior PI systems primarily optimize prefill and time to first token (TTFT). This suits applications that need only a single output token, yet most real-world use cases require multi-token responses. Such autoregressive workloads are dominated by time per output token (TPOT) instead. For the first time, we investigate generating full multi-token answers for real prompts under PI. We show that PI decode is hindered by two bottlenecks: (i) nonlinear kernels that require many interactive communication rounds, and (ii) attention protocols that underutilize ciphertext capacity and repeatedly re-encrypt or transmit the growing key and value (KV) cache. We present HERMES, a PI system optimized for LLM decoding. HERMES replaces high-round nonlinear protocols with compute- and bandwidth-intensive alternatives that require fewer communication rounds. It also introduces a novel matrix-multiplication protocol based on homomorphic encryption that keeps the KV cache encrypted on the server and uses grouped-query attention (GQA) to improve ciphertext utilization. On Llama 3.1 8B Instruct, across the network conditions and prompts used in our evaluation, HERMES lowers TPOT by up to 2.7× and total PI latency by up to 2.1×.

Metadata
Available format(s)
PDF
Category
Applications
Publication info
Preprint.
Keywords
Privacy-preserving computationPrivacy of MLPrivacy-preserving LLMs
Contact author(s)
mohamadol @ ece ubc ca
corashao @ ece ubc ca
dingqingy @ ece ubc ca
mshahrad @ ece ubc ca
mieszko @ ece ubc ca
History
2026-10-19: approved
2026-10-18: received
See all versions
Short URL
https://ia.cr/2026/2532
License
Creative Commons Attribution
CC BY

BibTeX

@misc{cryptoeprint:2026/2532,
      author = {MohammadHossein Olyaiy and Cora Shao and Dingqing Yang and Mohammad Shahrad and Mieszko Lis},
      title = {{HERMES}: High-Performance Private Decoding for Large Language Models},
      howpublished = {Cryptology {ePrint} Archive, Paper 2026/2532},
      year = {2026},
      url = {https://eprint.iacr.org/2026/2532}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.