Skip to main content

Overview

The Models tab prepares Hugging Face model weights for use inside a Tinfoil Container. It does not deploy an inference server by itself. Instead, it creates a verified model-weight artifact and gives you the models: block to add to tinfoil-config.yml. Use this when you are deploying a GPU inference container, such as vLLM, and want the model weights to be pinned and verified separately from the Docker image.
Your Docker image still needs to contain the inference server runtime. The Models tab prepares the weights that the runtime will load.

Why this exists

Enclave attestation proves what code and configuration were present when the enclave booted. Model weights are usually loaded from disk after boot, so they need their own integrity commitment. Tinfoil uses Modelwrap to turn a pinned Hugging Face commit into a read-only model package with a dm-verity root hash. The enclave config commits to that root hash, and dm-verity verifies each disk read while the inference server loads the model. For the full technical explanation, read How Tinfoil Proves Exactly What Model Is Running.

Prepare weights

  1. Open the Tinfoil Dashboard
  2. Go to Tinfoil Containers > Models
  3. Enter the Hugging Face repo in owner/model form
  4. Use the auto-filled commit, or paste a specific commit SHA
  5. Add an HF token if the repo is gated or private
  6. Click Prepare weights
Large models can take several minutes to wrap. When the job finishes, copy the generated models: block into your config repo.

Add the model block

The generated block looks like this:
tinfoil-config.yml
The mpk value is generated by Tinfoil and includes the model root hash, verity offset, and verity UUID. Keep it exactly as generated.

Pack schemas

The root hash in mpk depends only on two inputs: the pinned Hugging Face revision and a numbered pack schema. Each schema is a frozen specification of the file layout and exact filesystem toolchain used to build the dm-verity EROFS image. Schema 1 is the original derivation; schema 2 uses a newer, multithreaded filesystem toolchain. The dm-verity parameters never change between schemas: a schema changes how bytes are arranged, never how they are verified. The modelwrap repository’s SPEC.md is the authoritative registry of schema definitions. The optional schema field records which pack schema was used to build the pinned mpk. When omitted, it defaults to schema 1, so existing configs remain valid. Set it only for packs built with schema 2 or later. The wrap API accepts an optional schema parameter, and each wrap job reports the schema it used:
tinfoil-config.yml
A config that declares schema: 2 (or higher) requires cvm-version 0.12.0 or later. Earlier CVM images reject unknown config fields at boot.

Reproducing a pack

Your tinfoil-config.yml is a public verification recipe. Anyone can rebuild a pack from the pinned revision and declared schema with the open-source modelwrap tool:
and compare the resulting root hash against the config’s mpk value, the same identity the enclave proves at runtime through remote attestation. The schema number makes that reproduction exact and self-contained, including for historical packs: old schemas remain buildable indefinitely.
Runtime verification does not depend on the schema field. The enclave verifies every disk read against the pinned root hash regardless; the field exists so packs stay reproducible by third parties and tooling.

Point your server at the mounted model

At boot, Tinfoil verifies the model artifact and mounts it read-only under /tinfoil/mpk. In your inference server command, use:
tinfoil-config.yml
The path uses only the root hash portion of the mpk value:

Example vLLM config

tinfoil-config.yml
After editing the config, commit it and trigger the Tinfoil Release workflow with a new version. Wait for both phases to complete, then deploy or update from the All Containers tab.

Updating weights

To update a model, prepare the new Hugging Face commit from the Models tab, replace the repo and mpk values in tinfoil-config.yml, then release a new version via the Tinfoil Release workflow.
Keep each deployment pinned to a specific Hugging Face commit. Avoid relying on a moving default branch for production workloads.

Manage wrap jobs

Every prepared model is tracked as a wrap job, addressed by its host and job ID. From the CLI:
Deleting a wrap job also removes the model artifact and download cache from the host once no other wrap job references the same pinned revision. Deletion is refused while the job is still running, or while any deployment’s tinfoil-config.yml on that host references the artifact. Update or remove the deployment first.