Appendix: methodology and legal
This appendix describes how the results in this paper were measured, how the costs were calculated and how the targets were projected. It also states the license that covers Llama 3.1.
Speed of encrypted inference
Bel-0's 4.8 seconds to first token and 1.7 tokens per second generation speed are measured end-to-end, from sending the encrypted prompt to receiving each encrypted token. The model runs on 8× B200 GPUs at 128-bit security. Encrypting the prompt and decrypting the answer on the client add about 50 ms per request and are not included. This exclusion reflects the design of Bel-0: each token is selected on the server and fed back into the model in encrypted form, so generation never waits for the client to decrypt. The client only reads the tokens as they arrive and stops the request at the end of the answer. Both figures are means over five consecutive requests with 128-token prompts. This is the longest prompt the preview accepts, so the figures reflect its most demanding case.
Accuracy of encrypted inference
We measured accuracy on 1,000 prompts from our test set, covering chat, instruction following, code, math and other languages. Answers were generated with greedy decoding, up to 350 tokens per answer. This gave 304,061 tokens in total, all compared against a float64 plaintext reference. Bel-0 chose a token other than the reference's top choice only 85 times, or 0.028%. In every such case, the two candidates were at most 0.015 logits apart, with top logits around 31, so the model rated them as practically equal. An example below shows the same prompt answered by plaintext Llama 3.1 8B and Bel-0.
<|begin_of_text|>What does an LDL cholesterol of 4.9 mmol/L mean?
An LDL cholesterol level of 4.9 mmol/L is considered high. According to the American Heart Association, an LDL level of 4.9 mmol/L or higher is considered high risk for heart disease. You should discuss this with your doctor to determine the best course of action.<|eot_id|>
An LDL cholesterol level of 4.9 mmol/L is considered high. According to the American Heart Association, an LDL level of 4.9 mmol/L or higher is considered high risk for heart disease. You should discuss this with your doctor to determine the best course of action.<|eot_id|>
Costs of encrypted inference
The cost curves in Figure 9 and Figure 10 plot output tokens per dollar of total cost of ownership against interactivity, the generation speed that one user sees.
- Plaintext. Measured with vLLM 0.32.0 in BF16, decode only, for requests of 1,000 input and 128 output tokens. At each level of interactivity, the curve takes the best deployment: one or eight B200 GPUs in the cloud, or one RTX PRO 6000 on-premise (two for the 70B model).
- Cost of ownership. B200: $1.73 per GPU-hour (SemiAnalysis, Owning at Large Hyperscaler Volume). On-premise: a $16,000 RTX PRO 6000 and a $3,000 host, written off over three years, used four hours a day at $0.35 per kWh. This amounts to $4.62 per hour for one card and $8.55 for two.
- Bel-0. Measured on 1× and 8× B200 GPUs (the research preview configuration), at $1.73 per B200 GPU-hour. The leftmost Bel-0 datapoint is an estimate for eight users sharing one B200, derived from single-user benchmarks.
Bel-1 and Bel-2 Targets
The Bel-1 and Bel-2 figures are targets projected from Bel-0. Bel-1 is being designed from the ground up. We have selected the transformer architecture and layers for a 27B-parameter model and worked out how each layer will run under FHE. We have then estimated its cost from the algorithms and performance we measure today, such as our current speeds for bootstrapping and encrypted matrix multiplication. On top of that, we assume a further 2× from improvements to these algorithms by the end of 2027. Together, this gives the target of about 20× the interactivity of Bel-0, even though the model will be three times larger. Since Bel-1 will run on the same hardware, its tokens per dollar are expected to rise by the same factor.
Bel-2, a 70B model, targets 80× Bel-1's tokens per dollar on Fort, our hardware built for FHE. Fort is being developed as a GPU-class chip in which floating-point units are replaced by modular arithmetic units, and memory sized for FHE workloads. This cuts the bandwidth needed and reduces communication and cache spilling.
Encryption security
Bel-0's encryption parameters are set for 128-bit security, as measured by the lattice estimator, the standard tool behind the HomomorphicEncryption.org security guidelines. We ran the estimator's attacks against the actual ring dimensions and secret distributions in use, and capped the modulus, including its key-switching part, so that the cheapest known attack remains at the 128-bit level. The software refuses to generate keys or to encrypt above this cap.
Research preview key
The shared secret key in the research preview is generated from the following seed for all users.
seed=0x42ae88aa3615005df4e6e13b6ee36b685180ba848474f851cfbc9c760032a967 System prompt
Bel-0 uses a system prompt to ensure it knows that it is serving encrypted answers. You can find it here.
You are Bel-0, a helpful assistant cloud-hosted by the company Belfort. You run on Fully Homomorphic Encryption (FHE), so messages stay encrypted and Belfort cannot read them. This does not limit you: answer every message normally and only mention encryption if asked. Make sure to always respond succinctly to the user. Legal disclaimers
Bel-0 runs Meta's Llama 3.1 8B Instruct model under fully homomorphic encryption. Built with Llama. Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.