# Perseus: A Full-Stack System for Homomorphic Model Inference

DevFeed: [Perseus: A Full-Stack System for Homomorphic Model Inference](<https://devfeed.tech/articles/perseus-a-full-stack-system-for-homomorphic-model-inference-116153.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.04488>)

Author: Alessandro Zirilli, Davide Marincione, Evgenios M. Kornaropoulos, Giuseppe Ateniese, Emanuele Rodol\\\`a

Published: 2026-11-04T05:00:00Z

Content type: release

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [FHE](<https://devfeed.tech/topics/fhe.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [LLM optimization](<https://devfeed.tech/topics/llm-optimization.md>), [Advanced AI workflows](<https://devfeed.tech/topics/advanced-ai-workflows.md>)

Tags: [backend](<https://devfeed.tech/tags/backend.md>), [bootstrap](<https://devfeed.tech/tags/bootstrap.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [decoding](<https://devfeed.tech/tags/decoding.md>), [encrypted](<https://devfeed.tech/tags/encrypted.md>), [faster](<https://devfeed.tech/tags/faster.md>), [fhe](<https://devfeed.tech/tags/fhe.md>), [full-stack](<https://devfeed.tech/tags/full-stack.md>), [gpt](<https://devfeed.tech/tags/gpt.md>), [homomorphic-encryption](<https://devfeed.tech/tags/homomorphic-encryption.md>), [large-language-models-llms](<https://devfeed.tech/tags/large-language-models-llms.md>), [latency](<https://devfeed.tech/tags/latency.md>), [library](<https://devfeed.tech/tags/library.md>), [model-inference](<https://devfeed.tech/tags/model-inference.md>), [models](<https://devfeed.tech/tags/models.md>), [open](<https://devfeed.tech/tags/open.md>), [optimizations](<https://devfeed.tech/tags/optimizations.md>), [packing](<https://devfeed.tech/tags/packing.md>), [private](<https://devfeed.tech/tags/private.md>), [python](<https://devfeed.tech/tags/python.md>), [token](<https://devfeed.tech/tags/token.md>)

## AI overview

Perseus is an open Python library for end-to-end model inference on fully homomorphically encrypted data. It combines in-kernel regeneration of key-switching keys, a complex Cachemir packing variant, and a bootstrap placer that accounts for packing and magnitude. The abstract reports state-of-the-art latency across multiple models and modalities, with accuracy and perplexity within 3% of plaintext models; for single-token Llama-3-8B decoding, it reports 3.96x higher speed than other implementations. The work also launches a public encrypted GPT-2 speedrun. These performance claims are those reported in the supplied abstract.

## Source excerpt

arXiv:2611.04488v1 Announce Type: new Abstract: Large Language Models (LLMs) have made it exceptionally convenient for users to send their private data to model providers, which process them in plaintext. Fully Homomorphic Encryption (FHE) promises to secure remote inference by computing directly on encrypted data, yet it has remained prohibitively slow. The effort to make it practical remains fragmented, with most existing frameworks being closed-source, which keeps progress from compounding. We present Perseus, a free and open Python software library that supports the full stack of encrypted model inference, from the cryptographic backend and data packing, to encrypted nonlinearities and end-to-end model execution. Perseus ships with built-in novel optimizations, one at each level of the stack: in-kernel regeneration of key-switching keys at the (i) backend level, a complex variant of Cachemir packing at the (ii) data level, and a state-of-the-art bootstrap placer that is both packing- and magnitude-aware at the (iii) model level. Perseus achieves state-of-the-art latency across multiple models and modalities, within $3\%$ of the plaintext models' accuracy and perplexity. Remarkably, it is $3.96\times$ faster at single-token decoding than any other implementation on Llama-3-8B. We initiate, for the first time, a public speedrun on encrypted GPT-2, so that progress can compound.