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 themodels: 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
- Dashboard
- CLI
- Open the Tinfoil Dashboard
- Go to Tinfoil Containers > Models
- Enter the Hugging Face repo in
owner/modelform - Use the auto-filled commit, or paste a specific commit SHA
- Add an HF token if the repo is gated or private
- Click Prepare weights
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 inmpk 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
Reproducing a pack
Yourtinfoil-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:
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
mpk value:
Example vLLM config
tinfoil-config.yml
Updating weights
- Dashboard
- CLI
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.Manage wrap jobs
Every prepared model is tracked as a wrap job, addressed by its host and job ID. From the CLI:tinfoil-config.yml on that host references the artifact. Update or remove
the deployment first.
