Smelt

The model compiler and native runtime for Apple Silicon.

Smelt turns checkpoints — chat models, voices, whole multi-stage systems — into sealed programs, verified bit-exact against the original model.

View on GitHub See a model configured

Pure Swift 6 + Metal · one self-contained process · packages run offline, forever.

zsh
$ smelt run qwen35-0.8b.smeltpkg --prompt "hello" $ smelt run qwen3-tts-0.6b.smeltpkg --prompt "hello" > hello.pcm $ smelt run skintokens.smeltpkg --input giraffe.glb --output rigged.glb $ smelt agent create triage --model qwen35-0.8b.smeltpkg --system "review this diff" $ smelt agent run triage.agent "find the regression" models, voices, systems, and agent policy — one compiler, one runtime
~300tok/sQwen 3.5 0.8B decode
83msfirst audio, Qwen3-TTS
47.9tok/s27B binary-weight decode
0bytesdiff vs the reference auto-rig
measured on an M2 Max at the production build config

A model is one Swift file

This is SkinTokens, VAST-AI Research's open auto-rigger — a shape encoder, a skinning VAE, and a Qwen-trunk generator, 595M parameters. The whole configuration is data: typed ports, nine graph stages, and the package's command-line contract.

What the file declares

The graph — glb.decode through sequence.generate to glb.encode — and the flags on the command line above. smelt build compiles it with the pinned checkpoint into one sealed package; smelt run executes whatever graph a package declares.

The deterministic reference rig is byte-identical run over run, SHA-pinned in CI. Read the whole definition.

1Swift file defines the module
9declared graph stages
672checkpoint tensors pinned
Sources/SmeltModels/SkinTokens.swift
func skinTokensArticulation() -> SmeltCAMIR { let glb = IR.TypeRef("artifact", attributes: ["media-type": "model/gltf-binary"]) let mesh = bareType("triangle-mesh") // … a typed ref per intermediate let run = SmeltPackageRunContract( export: "transform", input: .init(flag: "input", mediaTypes: ["model/gltf-binary"]), output: .init(flag: "output", mediaTypes: ["model/gltf-binary"]), options: [ .init(flag: "beam-count", value: .positiveInteger, defaultValue: "10"), ]) let nodes: [IR.GraphNode] = [ nativeNode("glb.decode", inputs: [port("input", glb)], outputs: [port("mesh", mesh)]), nativeNode("sequence.generate", inputs: [port("encoding", meshEncoding)], outputs: [port("generation", generation)], annotations: [annot("sidecar", "language-trunk")]), // … surface.sample, mesh.encode, condition.encode, // skin.neighbors, skin.decode, skin.transfer, glb.encode ] return SmeltCAMIR( module: .init(id: "skintokens_articulation"), run: run /*, exports, sources, … */) }

What's different

COMPILER

It compiles the whole system.

Engines load a weights file and run one architecture. Smelt compiles the model — every encoder, autoregressive loop, decoder, and procedural stage — into a program that carries its weights, Metal kernels, graph, and run contract in one .smeltpkg. Text, speech, and 3D rigging are the same kind of artifact.

CORRECTNESS

Bit-exact, gated in CI.

Every numeric-touching change runs parity gates — wav == reference, codes == generated, rig output SHA-pinned. Most of the big speedups landed bit-identical by construction. Correctness is the headline claim here, and it's checkable from the repo.

NATIVE

A program, resident or embedded.

Run a package as a process, keep it resident behind OpenAI-compatible /v1, or take SmeltRuntime and SmeltServe as SwiftPM dependencies. Pure Swift and Metal top to bottom; installed packages work offline, forever.