Skip to content

Odin: An Open-Source End-to-End FHE Implementation for Privacy-Preserving Llama 3 8B InferenceAn Open-Source End-to-End FHE Implementation for Privacy-Preserving Llama 3 8B Inference

arXiv: Alignment, Deception & Oversight· arXiv:2609.12378· Yuhang Fan, Yusi Chen, Kanyu Ye, Zhuoran Ji·Indexed by this site · 2026-10-01· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The paper proposes ODIN, which uses feature-major ordering packing and joint error-budget search to perform end-to-end CKKS inference on Llama-3-8B with 128 tokens on a single H100, with a server-side time of 366.4 s, a 4.51× speedup relative to the THOR baseline.

Threat modelThe client holds the prompt and the CKKS secret key; the server holds plaintext weights, performs Llama-3 inference on ciphertexts, and returns the result ciphertext. Honest-but-curious server; under RLWE, protects the prompt and its intermediate states. Does not defend against malicious deviation from the protocol, side channels, denial of service, or access-pattern leakage, nor does it protect model weights. Architecture, weights, sequence length, cryptographic parameters, and runtime are treated as public.

Questions
Cloud LLM inference requires users to hand prompts to the service provider, exposing personal or internal information. Pure FHE can avoid decrypting inputs, but CKKS packing determines the number of ciphertexts, linear layer overhead, and layout conversions between layers, and encoding and conversion costs accumulate as scale increases.
Methods
ODIN uses feature-major ordering as the interface for residuals and inter-layer hidden states. Linear projections and attention use a brief intra-operator layout, and it reuses the weight-diagonal encoding of wide projections. In attention, the scores of QK^T can be fed directly to Softmax, and the probabilities can be fed directly to PV. Nonlinearities use minimax polynomials over intervals, and the error budgets of RMSNorm, Softmax, and SiLU are jointly allocated through full-model error injection.
Experiments and results
The authors report: with Llama-3-8B weights and a 128-token input, ODIN sequentially computes all 32 layers on a single H100 80 GB, with server-side end-to-end time of 366.4 s and peak memory of 58.9 GiB; under the same settings, THOR's online evaluation is 1651.9 s, a 4.51× speedup. In THOR's single-layer profiling, linear computation accounts for 75.6%, of which weight packing and encoding are the main part.
Limitations and future work
The authors state that the cross-layer interface can later be extended to more models and input sizes, with continued joint optimization of packing, nonlinear precision, and bootstrapping scheduling. The experiments reported in the main text cover Llama-3-8B, 128-token, a single H100, and interval calibration and injection-based PPL search on WikiText-2 and C4; the coefficient-encoding path is not included in the subsequent evaluation.
Experimental setupMeta-Llama-3-8B · WikiText-2、C4 · server-side end-to-end FHE evaluation time、peak device memory et al.
Evaluated models
Meta-Llama-3-8B
Benchmarks
WikiText-2C4
Metrics
server-side end-to-end FHE evaluation timepeak device memoryPPLΔPPL_inj
AI summaryOdin is the first open-source end-to-end GPU CKKS implementation capable of completing Llama-3-8B inference under encryption. It unifies residual connections and layer interfaces through a feature-major cross-layer layout and creates temporary intra-operator layouts for linear projections and attention, reducing redundant plaintext encoding of weights; in attention, QK^T scores can be directly consumed by Softmax, and PV directly consumes probabilities, avoiding intermediate re-packing; nonlinear operations use minimax polynomial approximations with input range control and joint error allocation. On a single NVIDIA H100 80 GB GPU, evaluating all 32 layers with a 128-token input takes 366.4 s with a peak memory of 58.9 GiB, which is 4.51× faster than THOR's 1651.9 s.

Odin is the first open-source end-to-end GPU CKKS implementation capable of completing Llama-3-8B inference under encryption. It unifies residual connections and layer interfaces through a feature-major cross-layer layout and creates temporary intra-operator layouts for linear projections and attention, reducing redundant plaintext encoding of weights; in attention, QK^T scores can be directly consumed by Softmax, and PV directly consumes probabilities, avoiding intermediate re-packing; nonlinear operations use minimax polynomial approximations with input range control and joint error allocation. On a single NVIDIA H100 80 GB GPU, evaluating all 32 layers with a 128-token input takes 366.4 s with a peak memory of 58.9 GiB, which is 4.51× faster than THOR's 1651.9 s.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Cloud Llama inference leaks prompts; ODIN uses co-design of CKKS packing and execution for end-to-end FHE inference.

    Cloud Llama inference hands prompts to the service provider, causing privacy leakage, while existing FHE schemes at Llama-3 scale are hampered by weight encoding and layout conversions.

    • Scenario and importance: The authors argue that Transformers are often deployed in the cloud, and users must send prompts that may contain personal, medical, commercial, or internal information to the service provider, who can directly see the inference input. Protecting user privacy while preserving cloud model access is called by the authors the central problem of private LLM inference.
    • Limitations of existing methods: The authors state that MPC or hybrid protocols (Iron, PUMA, BOLT, BumbleBee) can support larger models but require client or multi-server multi-round interaction and transmission of large amounts of intermediate data, and security also depends on parties not colluding. Pure FHE lets the server compute directly on ciphertexts, but packing determines the number of ciphertexts, linear layer overhead, and representation conversions among linear layers, attention, and nonlinearities; as models and sequences grow, inefficient layouts cause encoding, computation, and conversion costs to accumulate. After adapting the THOR-style layout to Llama-3-8B, the authors observe that online encoding of large amounts of plaintext weights becomes the main bottleneck in linear computation.
    • Core observation: The packing scheme determines whether weight diagonals can be reused across input ciphertexts and whether intermediate repacking is needed between QK^T, Softmax, and PV. The approximation interval and allowed error jointly determine the minimax polynomial degree and multiplication depth, and need to be jointly allocated by model quality rather than using the same conservative precision for each operator.
    • System proposed in the paper: The authors propose ODIN, which co-designs ciphertext packing and model execution for Llama. Odin uses a feature-major cross-layer layout to unify residual connections and layer interfaces, and constructs short-lived intra-operator layouts for linear projections and attention; nonlinearities are approximated by minimax polynomials over intervals under a maximum approximation error constraint, and input range control with model-quality-guided joint error allocation is used to reduce polynomial degree and multiplication depth. The authors state that, to their knowledge, this is the first open-source, GPU-accelerated CKKS end-to-end implementation on Llama-3.
    • Threat model:
      • Goal: Protect the prompt and its derived intermediate states under the RLWE assumption; the client does not participate in server-side homomorphic evaluation beyond submitting inputs and receiving results.
      • Knowledge and roles: The client holds the prompt and the CKKS private key, performs tokenization, embedding lookup, and input encryption locally, and sends the encrypted input along with evaluation keys to the server. The server holds the plaintext model weights. Model architecture and weights, sequence length, cryptographic parameters, and runtime are treated as public information.
      • Capability boundary: The server is assumed to be honest-but-curious, following the inference protocol, but may use input ciphertexts, evaluation keys, intermediate ciphertexts, and observable public information to infer client inputs.
      • Out of scope: Does not defend against malicious servers that deviate from the protocol, side channels, denial of service, or access pattern leakage, nor does it protect the server's model weights. Client-side preprocessing and encryption are not counted in FHE evaluation time.
  2. What related research exists?

    Related work is divided into MPC/hybrid protocols, pure FHE Transformers, and nonlinear approximation with outlier handling.
    • Interactive MPC and hybrid protocols
      • Iron (Hao et al., paper citation [8]) — uses compact HE packing for secure matrix multiplication and designs dedicated protocols for Softmax, GELU, and LayerNorm.
      • PUMA (paper citation [6]) — extends two-party secure inference to LLaMA-7B with high-precision GeLU and Softmax approximations, as well as secure Embedding and LayerNorm.
      • BOLT (paper citation [11]) and BumbleBee (paper citation [9]) — the former co-optimizes secure matrix multiplication and nonlinear computation; the latter designs low-communication matrix multiplication and activation function protocols for large Transformers. The authors state these systems protect client inputs and server models, but the online phase still requires continuous two-party communication.
    • Pure FHE Transformer inference
      • NEXUS (paper citation [15]) — proposes several homomorphic matrix operations and nonlinear approximations; the authors note that the combination of its different packing formats and their conversion costs are not included in the end-to-end execution path.
      • THOR (paper citation [10]) — uses diagonal-major encoding and compact ciphertext packing to perform end-to-end FHE inference on BERT-base on a single GPU. The authors adapt it to Llama-3 and use it as a profiling baseline.
      • MOAI (paper citation [16]) — reduces layout conversions and rotations by coordinating packing formats across modules. The authors use it to illustrate the importance of layout compatibility: projections maintain column packing, QK^T produces diagonal packing, Softmax preserves that representation, and multiplication with column-packed V then restores column packing.
      • Scaling up Privacy-Preserving ML (Park et al., paper citation [12]) — extends CKKS inference to Llama-2-7B and uses the distinction between public tokens and encrypted tokens to support longer inputs; linear projections use coefficient encoding, while remaining operations preserve slot encoding. The authors state that EasyFHE does not yet provide a complete execution path for these representation conversions, so they treat coefficient encoding as an alternative design point and only compare THOR and Odin, both in the slot domain, in subsequent evaluations.
    • Nonlinear circuits and range control
      • Cho et al. (paper citation [4]) — proposes a fast homomorphic Softmax based on the Softmax multiplicative iterative formula. ODIN uses it as the basic computational framework for homomorphic Softmax.
      • Park et al. (paper citation [12]) combined with Xiao et al.'s attention sink (paper citation [14]) and QuaRot (Ashkboos et al., paper citation [1]) — the authors state that, to their knowledge, this is work that simultaneously handles attention sinks along the token dimension and dimension outliers along the feature dimension in FHE Llama. ODIN adopts this FHE adaptation as the model preprocessing baseline and fuses the QuaRot transform into the public weights offline. Park et al. also observed through plaintext error simulation that a 12-bit error budget does not degrade PPL relative to their FP16 baseline; ODIN uses this as a reproducible starting point τ_0 = 2^{-12}.
      • Bae et al. (paper citation [2]) — organizes coefficient-encoded RLWE/MLWE ciphertexts into matrix equations, reducing wide plaintext–ciphertext matrix multiplications to a small number of plaintext matrix multiplications.
    • Baselines and data: The performance baseline is the authors' constructed THOR-style Llama-3 packing; nonlinear intervals are compared on WikiText-2 and C4, and approximation intervals are initialized with a calibration set. The authors position this work as: after the THOR-style adaptation exposes the weight encoding bottleneck, using packing reusable across layers and nonlinear error allocated by full-model quality to form a server-side FHE execution path for all Transformer layers of Llama-3.
  3. How does the paper address this problem?

    Odin fixes the feature-major ordering layer interface, reuses weight diagonals, and uses injected search to allocate nonlinearity errors.

    ODIN splits the server-side FHE execution of Llama-3 into two lines: using Odin packing to reduce repetitive weight encoding for wide projections and re-packing within attention; and using minimax polynomials over calibration intervals, with error budgets allocated by full-model injection testing.

    Problem setup and CKKS partition

    • Execution partition: The server holds plaintext weights, activations remain encrypted. Q/K/V/O and gate/up/down are plaintext–ciphertext matrix multiplications; QK^T and PV are two ciphertext multiplications. RMSNorm, Softmax, and SiLU must be converted into CKKS-executable polynomials or iterative circuits. Client-side tokenization, embedding, and encryption are not counted in FHE time.
    • Slot encoding: For x ∈ R^D, A ∈ R^{D×D}, the k-th cyclic diagonal D_k(A)[i] = A[i, (i+k) mod D], and matrix–vector multiplication is written as sum over diagonal-wise multiplication and rotation. BSGS is an evaluation strategy that reuses partial rotations on a given layout, not an independent packing scheme.
    • Approximation objective: For f on interval I, the uniform absolute error E_d(f; I) is the minimum over polynomials of degree at most d of the maximum absolute deviation between the polynomial and f. Given a maximum allowed error τ, take the smallest degree satisfying that error. The intervals and τ are used by the Remez algorithm to generate near-minimax polynomials. The authors avoid comparison-based piecewise functions and directly approximate each scalar sub-function on the calibration intervals; Softmax then places these polynomials into an iterative doubling method.

    Odin packing

    • Cross-layer interface: The feature-major layout is fixed as the hidden-state interface for residual connections and cross-layer passing; linear projections and attention use short-lived intra-operator layouts. The structured weight representation allows the encoded weight diagonals to be reused across multiple input ciphertexts, reducing redundant plaintext encoding in Llama-3's wide projections.
    • Reasons for adapting relative to THOR: The authors state that their THOR-style page-diagonal representation binds a plaintext weight to a specific input page, output group, real or imaginary part, and rotation copy, and reuse is possible only if all these physical layout attributes are identical. Scaling to 4096-dimensional hidden states and 14336-dimensional FFN produces 425,984 plaintext weight objects per layer. Odin organizes plaintext weights by physical weight pages and logical diagonals, allowing encoded results to be reused across token-shard inputs.
    • Attention data flow: QK^T produces score representations that Softmax can directly consume; Softmax retains this representation for output probabilities; PV directly consumes these probabilities, avoiding intermediate re-packing between Softmax and PV. The authors state that this constitutes a C–Δ attention layout. Section 4 defines the layout and linear computation principles; Sections 5.3 and 5.4 describe the runtime implementation of Odin packing and the assembly of a single-layer computation graph from operator conventions.

    Range control and polynomials

    • Preprocessing: Apply QuaRot to the public Llama-3 weights and fuse the Hadamard transforms before the O and down projections into adjacent weights so they do not add online homomorphic operations. The transformed model is used for interval measurement, polynomial generation, and FHE linear computation. The idea of the attention-sink prefix comes from Park et al. and Xiao et al.: the prefix is independent of user queries and can be treated as a public static cache with precomputed key-value states; the authors state that they adopt this FHE adaptation as a preprocessing baseline.
    • Intervals: The approximation intervals for each nonlinear input in each layer are obtained by multiplying the observed extreme values by an expansion factor, which is 1.2 in the current configuration. SiLU uses a symmetric interval based on the maximum absolute value; since RMSNorm's inverse square root input is positive, a positive interval is used. The Softmax interval is described separately in its implementation. The authors state that this safety margin reduces the risk of out-of-bound values but increases the polynomial degree for a given error target; Section 5.1 also adds out-of-bound checks. On WikiText-2 and C4, the median of the p99 magnitude ratios across the 32-layer operator positions is 1.0, and the authors state there is no overall scale shift between the two general-purpose corpora, so they initialize intervals with calibration sets but do not guarantee that all inference inputs fall within the intervals.
    • Softmax: Use the multiplicative identity from Cho et al. Let m be the row maximum, z = x − m ∈ [−M, 0], k = ⌈log_2 M − log_2 ln n⌉. The implementation replaces M in the identity with the calibrated statistical maximum Û and interval length M̂; as long as Û covers the row maximum score, shift invariance gives Softmax(ẑ) = Softmax(x). Most layers share Û and k within a layer; positions with wider distributions (e.g., Layer 31) use per-head Û and take k = max_h k_h so that the number of iterations in the same SIMD batch is identical. The main track stores all scores and performs exponentiation, slot-wise multiplication, and squaring; the auxiliary track stores only per-row reduced values and performs inverse square root on a small number of active slots, with bootstrapping confined to compact auxiliary-track ciphertexts. The inverse square root is not approximated directly over the theoretical interval [1/n, n] but by measuring the actual range of s^{(j)} per layer and per round, multiplying by a safety factor, and then generating the polynomial. The inverse square roots of j1/j2 remain 12-bit and are not subject to tolerance relaxation. Algorithm 1 gives the complete process with public statistical shift.

    Error budget and scheduling

    • Search space: The authors do not select continuous budgets per layer for the four nonlinear functions; instead, operators of the same type share an output perturbation budget across layers, reducing the search to four coupled variables: two RMSNorms, Softmax, and SiLU. Injection positions are the outputs of RMSNorm rsqrt, Softmax ex, and SiLU across all 32 layers.
    • Proxy criterion: M̃_τ independently injects e ∼ U[−τ, τ] at each approximation position, and M_0 is a reference model using exact nonlinear functions. ΔPPL_inj(τ) = PPL(M̃_τ) − PPL(M_0), and the search criterion is ΔPPL_inj(τ) ≤ δ_PPL. The authors state that the injection only compares relative sensitivity, does not replicate the deterministic residual of a given Remez polynomial, and does not guarantee the PPLs are the same; therefore, model quality must be evaluated separately after the final polynomial is generated.
    • Two-stage search: First, let the four operator types share τ_c lying within different δ_PPL values to find the largest common tolerance satisfying the injection criterion. Then, according to Algorithm 2, with priority order π = [SiLU, RMSNorm2, RMSNorm1, Softmax], place each operator onto its conditional upper bound. The authors give the reason: SiLU is in the FFN gating branch of width 14336, and reducing its degree may simultaneously reduce the limbs of the nonlinear evaluation and the subsequent wide linear layer; in a single-operator pilot, with intervals unchanged, increasing SiLU tolerance from 2^{-12} to 3.82×10^{-3} reduces the sum of the 32-layer SiLU polynomial degrees from 2048 to 998. Reducing the RMSNorm degree does not necessarily change the bootstrap positions in the current execution graph.
    • Polynomial formation and bootstrapping: For layer l operator i, take the smallest degree that satisfies the maximum absolute error no greater than τ_i in Table 4 on interval I_{i,l}, then use Remez to generate the near-minimax polynomial; the degree cannot be derived directly from the target error, so beyond Remez, the candidate degree is incrementally increased and the maximum absolute error is checked at extremal points. Section 5.4.2 schedules bootstrap positions based on the limb budget. Bootstrap positions are jointly determined by the level requirements of the entire execution chain and operator depth; reducing the degree of RMSNorm or Softmax does not necessarily reduce the number of bootstraps. The assembly outputs include transformed weights, measured input intervals, polynomial coefficients, and bootstrap positions.
  4. What experiments did the paper conduct?

    On a single H100 with Llama-3-8B, 128 tokens: ODIN 366.4 s, 58.9 GiB, which is 4.51× relative to THOR's 1651.9 s.

    Experimental Setup

    • Hardware and software: AMD Ryzen 9 9950X, 128 GB host memory, one NVIDIA H100 80 GB GPU. The underlying CKKS and GPU kernels come from the open-source EasyFHE; model conversion and experiment drivers are in Python, PyTorch handles tensor preparation and reference evaluation, and the Odin packer calls dedicated GPU kernels.
    • Model and input: Actual Llama-3-8B (Meta-Llama-3-8B) weights, 128-token input, sequential evaluation of all 32 Transformer layers. Client-side preprocessing and encryption are not counted in FHE evaluation time.
    • Baseline: THOR online FHE evaluation on the same model, same input, same CKKS parameters, and same hardware. Single-layer and linear-operator profiling uses the authors' THOR-style Llama-3 adaptation, targeting Layer 16, 128 tokens, with the median of three runs.
    • Nonlinear data and metrics: Interval comparisons use WikiText-2 and C4. The injection test metric is ΔPPL_inj, with thresholds including 0.001, 0.005, 0.010, 0.050. The starting precision is τ_0 = 2^{-12}. After polynomial generation, the authors require verification again with full operator outputs and model perplexity; the attached text is truncated at the polynomial degree search and does not show the final PPL table.
    • Performance metrics: Server-side end-to-end FHE evaluation time, peak device memory, and time by module and by operator (packing/encoding, rotation, multiplication, merging, rescale). The paper does not give the CKKS ring dimension, level, or scaling factor values in the attached visible text.
    • Replication: Table 1 and Table 2 are medians of three runs. The number of repetitions for the end-to-end 366.4 s and 1651.9 s is not separately stated in the corresponding abstract sentences.

    Main Results

    The abstract gives the end-to-end comparison; Table 1 and Table 2 are the Layer 16 time breakdown under the THOR baseline, not a module-by-module end-to-end table of ODIN versus THOR. ODIN's per-module times are not fully preserved in the later evaluation section of the attached text; the table below lists only the numbers locatable in the text.

    Swipe horizontally to read the table

    SettingTimeMemory or shareSource
    ODIN, Llama-3-8B, 128 tokens, single H100, 32-layer server-side end-to-end366.4 speak 58.9 GiBAbstract
    THOR, same model, input, CKKS parameters, and hardware, online FHE1651.9 sauthors report 4.51×Abstract
    THOR packing, Layer 16, 128 tokens, single-layer total (median of three)59.24 slinear 44.80 s, 75.6%Table 1
    THOR, plaintext–ciphertext and ciphertext–ciphertext linear total44.10 sweight packing/encoding 28.02 s, 63.5% of that timeTable 2
    • Authors' interpretation: Linear computation is the main cost of this THOR baseline; weight packing and encoding is the main bottleneck of the linear path, with encoding alone accounting for 38.6% of linear computation time (17.03 s encoding, plus 10.99 s packing). Plaintext–ciphertext projections total 38.02 s, and QK^T plus PV total 6.78 s (Table 1).
    • End-to-end: The authors report a 4.51× speedup of ODIN over THOR's online evaluation under the same model, input, CKKS parameters, and hardware, running all 32 layers sequentially on a single H100 80 GB.
    • Single-layer module times in Table 1 (THOR, median of three): RMSNorm1 and RMSNorm2 each 0.05 s; QKV 5.44 s, QK^T 4.83 s, Softmax 4.82 s, PV 1.95 s, O projection 5.39 s; in the FFN, gate 11.69 s, up 8.00 s, SiLU 0.40 s, down 7.50 s; nonlinear operators total 5.32 s; bootstrapping, RoPE, layout conversion, and unattributed runtime 9.12 s.

    Operator-Level Breakdown of the Encoding Bottleneck

    • What was measured: Table 2, in a separate operator-level profiling, breaks down the two types of linear computation of Llama-3-8B under THOR packing, with the median of three runs. Columns include weight packing/encoding, auxiliary encoding, rotation, multiplication, merging, rescale.
    • Results: Plaintext–ciphertext subtotal 36.76 s, of which weight packing/encoding 28.02 s, rotation 0.70 s, multiplication 3.40 s, merging 3.71 s, rescale 0.94 s. Breakdown: Q 3.70 s (packing/encoding 2.91 s), K+V 1.53 s (1.23 s), O 4.88 s (2.47 s), FFN 26.55 s (21.34 s). Ciphertext–ciphertext subtotal 7.34 s: QK^T 4.94 s (rotation 3.88 s), PV 2.40 s (rotation 1.64 s); the weight packing/encoding column for both is “–”, and auxiliary encoding is 0.48 s and 0.37 s, respectively. All linear computation totals 44.10 s.
    • Authors' interpretation: The authors state that this bottleneck comes from a mismatch between the reuse granularity of the THOR-style weight representation and Llama-3's wide projections; with 425,984 plaintext weight objects per layer, pre-encoding incurs storage and residency costs, while on-demand generation repeatedly packs and encodes at runtime.

    Error Injection Search

    • Common tolerance: In Table 3, 32 layers share τ_c. At δ_PPL = 0.001, τ_c = 2.258×10^{-3} (9.25× relative to 2^{-12}), with measured ΔPPL_inj = −0.00161; at 0.005, 2.354×10^{-3} (9.64×, ΔPPL_inj = 0.00455); at 0.010, 2.403×10^{-3} (9.84×, 0.00798); at 0.050, 2.838×10^{-3} (11.62×, 0.04732). The authors state that under the current experimental protocol, the 12-bit reference configuration is conservative for bounded perturbations. The measured increment in the δ_PPL = 0.001 row is negative.
    • Joint budget: Table 4, at δ_PPL = 0.001 and common starting point τ_c = 2.258×10^{-3}, places SiLU, RMSNorm2, RMSNorm1, and Softmax successively at conditional upper bounds: the rsqrt outputs of RMSNorm1 and RMSNorm2 are both 9.881×10^{-3} (40.47× relative to 2^{-12}), the ex output of Softmax is 3.093×10^{-3} (12.67×), and the SiLU output is 1.993×10^{-2} (81.65×). The authors state these are candidate budgets, and the PPL of the corresponding Remez polynomials must be measured separately after generation.
    • SiLU pilot: With the interval unchanged and the tolerance relaxed from 2^{-12} to 3.82×10^{-3}, the sum of SiLU polynomial degrees across 32 layers drops from 2048 to 998, and subsequent FFN linear layers can use fewer limbs under the current scheduling. The authors therefore list SiLU as the highest-priority target in the current error budget.

    Other Ablations and Analyses

    • WikiText-2 and C4: at the corresponding operator positions across 32 layers, the median ratio of p99 magnitudes for C4/WikiText-2 is 1.0; the authors state that some layer–operator positions still deviate.
    • The approximation interval expansion factor is currently configured as 1.2; the paper does not give per-layer interval endpoints in the visible tables.
    • Single-operator SiLU pilot: degree sum 2048 → 998 (tolerance 2^{-12} → 3.82×10^{-3}, interval unchanged).
    • Coefficient encoding (the projection paths of Bae et al., Park et al.) is discussed by the authors as an alternative, but subsequent evaluation is restricted to the slot domain of THOR and Odin; the paper does not report end-to-end time for coefficient encoding on this implementation.
    • The authors state that reducing RMSNorm or Softmax degrees does not necessarily reduce the number of bootstraps; the attached text gives no comparison table of bootstrap counts.
    • Correctness, final model quality, and ODIN's per-module performance are evaluated in Section 6; apart from the 366.4 s, 58.9 GiB, and 4.51× in the abstract, the attached converted text does not preserve the remaining table numbers of Section 6, and those cells are left blank.
  5. What are some points that can be further explored?

    The authors plan to extend the cross-layer interface to more models and input sizes, and to continue jointly optimizing packing, precision, and bootstrapping.

    Limitations and future directions noted by the authors

    • Applicability of the cross-layer interface: In the conclusion, the authors state that the packing scheme of FHE LLMs determines not only the number of operations in a single matrix multiplication but also whether weight encoding, inter-operator representations, and layer scheduling form a complete execution path. Future work can extend this cross-layer interface to more models and input sizes and further jointly optimize packing, nonlinear precision, and bootstrapping scheduling (Conclusion).
    • Injection proxy is not final quality: The authors state in the methods that the injected perturbation is only a sensitivity proxy and does not guarantee that the corresponding Remez polynomial produces the same PPL; after polynomial generation, model quality must be evaluated separately (Section 5.2). This is a limitation of the search criterion, not an interpretation of the experimental results in Section 6.
    • Intervals do not cover all inputs: The authors state that using a calibration set to initialize the approximation intervals does not guarantee that all inference inputs remain within the interval; therefore, Section 5.1 adds a safety margin and out-of-bound checks (Section 3.2.1, Section 5.1).
    • Degree and bootstrapping do not automatically decrease together: The authors state that lowering the polynomial degree of RMSNorm or Softmax does not necessarily reduce the number of bootstraps because the bootstrap positions are jointly determined by the level requirements of the entire execution chain (Section 3.2.3).
    • Theoretical optimum is hard to find: The authors state that inter-layer errors interact, and there is no directly solvable analytical relationship between model quality and error budget, making it difficult to obtain a theoretically optimal configuration; they retain per-layer intervals but let operators of the same type share a budget (Section 5.2).
    • Conditional upper bound depends on search order: The authors state that the conditional upper bounds of operators cannot be measured independently and then directly summed; the error allocation results of per-operator search also depend on the priority order π (Section 5.2.3).

    Experimental coverage

    • The end-to-end performance numbers correspond to Meta-Llama-3-8B weights, 128-token input, all 32 layers, and a single NVIDIA H100 80 GB; the comparison is THOR's online FHE evaluation under the same model, input, CKKS parameters, and hardware (Abstract, Section 6.1).
    • The THOR bottleneck analysis is the median of three runs at Layer 16, 128 tokens, with an additional independent linear-operator-level analysis (Table 1, Table 2, Section 3.4).
    • Nonlinear interval comparisons use WikiText-2 and C4; the approximation interval expansion factor is stated as 1.2; the QuaRot transformation is offline-fused into the public weights (Section 3.2.1, Section 5.1).
    • The error search compares the injected PPL of four nonlinear classes on the 32-layer model, with a common tolerance corresponding to four δ_PPL values, and the joint budget table corresponds to δ_PPL = 0.001 (Table 3, Table 4). On the Softmax auxiliary track, the inverse square roots of j1/j2 remain 12-bit and are not subject to tolerance relaxation.
    • Subsequent numerical evaluation is limited by the authors to slot-domain THOR and Odin; coefficient encoding and SlotToCoeffs/CoeffsToSlots are discussed as alternatives, and the authors state that EasyFHE does not yet provide a complete execution path for these representation conversions (Section 3.3.1). The paper does not report the number of repetitions for the end-to-end 366.4 s figure, nor does it give the final decrypted PPL in the abstract.
  6. Summarize the main content of the paper

    ODIN completes CKKS inference of Llama-3-8B on a single H100 using reusable feature-major packing and a joint error budget.

    ODIN is a server-side CKKS inference system for Llama: the client encrypts the prompt, and a honest-but-curious server computes Llama-3 over ciphertexts with plaintext weights, returning only the result ciphertext.

    • Problem: Cloud services see prompts directly. MPC-style systems require multiple rounds of communication and assume parties do not collude. The cost of pure FHE depends on packing: it determines the number of ciphertexts, how weights are encoded, and whether layouts must be converted between linear layers, attention, and nonlinearities. After the authors extend the THOR-style layout to Llama-3-8B, online weight encoding for wide projections becomes the main bottleneck.
    • Method: Cross-layer hidden states are fixed to feature-major order, so residuals and layer interfaces are consistent; linear projections and attention use only short-lived intra-operator layouts, and the encoded weight diagonals can be reused across multiple input ciphertexts. In attention, QK^T scores go directly into Softmax, and probabilities go directly into PV. RMSNorm, SiLU, and Softmax use minimax polynomials over a calibration interval with expansion factor 1.2; Softmax retains the doubling iteration and uses a statistical maximum for shifting. Starting from a uniform error of 2^{-12}, sensitivity is compared with full-model bounded injection, and candidate budgets are then allocated in the order SiLU, RMSNorm2, RMSNorm1, Softmax. QuaRot is fused offline into the public weights.
    • Results: On Llama-3-8B, 128 tokens, a single H100 80 GB, 32-layer server-side end-to-end evaluation is 366.4 s, with peak device memory 58.9 GiB. Under the same model, input, CKKS parameters, and hardware, THOR online evaluation is 1651.9 s, and the authors report a 4.51× speedup. THOR's Layer 16 single-layer median is 59.24 s, of which linear computation is 44.80 s (75.6%); in operator-level profiling, weight packing/encoding is 28.02 s, accounting for 63.5% of the linear time of 44.10 s. Injection tests at δ_PPL = 0.001 place the common tolerance at 2.258×10^{-3} (9.25× 2^{-12}); joint search further places SiLU at 1.993×10^{-2}.
    • Authors' conclusion: The authors argue that FHE LLM performance depends not only on individual homomorphic operators but also on whether packing is compatible across the entire computation path, and on whether weight encoding, inter-operator representations, and layer scheduling form a complete execution path. The authors plan to extend this cross-layer interface to more models and input sizes, and to continue jointly optimizing packing, nonlinear precision, and bootstrapping scheduling. The authors state that, to their knowledge, this is the first open-source GPU-accelerated CKKS end-to-end implementation on Llama-3.
Read originalarxiv.org