Bel-0 is the world's first end-to-end encrypted LLM
Bel-0 is the world's first LLM that computes entirely on encrypted data, available for anyone to try. Data is encrypted on the user's device before it leaves and stays encrypted while the model works on it. Only the user can decrypt the final answer. FHE makes this possible by letting the model compute directly on ciphertext, so the server never sees the prompt, the model's activations, or the answer.
Bel-0 runs Llama 3.1 8B Instruct, Meta's widely used open-weight language model, with 8 billion parameters and 32 transformer layers, entirely on encrypted data. Each request passes through four steps (Figure 6).
tokens
8B
token One token
at a time
only here Never
sees the
answer
- The user encrypts the prompt locally. The user's client first tokenizes the prompt, splitting it into the small pieces of words that the model processes. It then encrypts these tokens with a secret key that the server never sees. The result is ciphertext, which the client sends to the server.
- The server runs the model on ciphertexts. Bel-0 receives only this ciphertext and runs every layer of Llama 3.1 8B directly on it, including attention, the feed-forward layers and the normalization steps. The scores for the next token, called logits, stay encrypted. The next token is sampled from them homomorphically, fed back into the transformer and returned to the user in step 3.
- The server returns the encrypted tokens. The sampled tokens are produced in encrypted form and sent back to the client, so the server never learns what it generated.
- The user decrypts the answer. The user's client decrypts the tokens with the secret key and turns them back into text. Since the key never leaves the client, no one else can read the answer.
With the data encrypted end to end, the confidentiality of a request does not depend on the cloud provider or the hardware the model runs on: even an attacker with full access to the server would see only ciphertexts.