Runner v1.24.0
One file that runs AI models on your machine, and shows its work.
Runner loads an AI model file and answers with it, on your own computer. Written from scratch in plain C, nothing to install underneath it, on ordinary processors, NVIDIA graphics cards and Apple Silicon. Your apps and coding agents talk to it through the OpenAI and Anthropic APIs.
It answers the questions other engines leave to trial and error: will this model fit, what did shrinking it cost, and what exactly did it say. From 1.0 its interfaces are held to a versioning policy.
Real commands, real output. The numbers are on this page with their dates: fit, shrinking cost, receipts.
--kv k8v4, full agreement with the full-size cache on three modelsTry it
Sixty seconds to a served model
Download the binary and its checksum file, verify, fetch a model, serve. The checksum line is not decoration: this project's whole culture is receipts, and it starts at the download.
The model below, granite-4.1-3b at Q8_0, is the smallest that passes the project's fidelity gate against its own BF16 parent. Alternatives and the reasoning are in the manual's model choices.
curl -LO https://github.com/Joakimpalm-Zen/xyntetik-runner/releases/latest/download/runner-macos-arm64
curl -LO https://github.com/Joakimpalm-Zen/xyntetik-runner/releases/latest/download/SHA256SUMS
shasum -a 256 --check --ignore-missing SHA256SUMS
chmod +x runner-macos-arm64 && mv runner-macos-arm64 runner
curl -L -o model.gguf https://huggingface.co/ibm-granite/granite-4.1-3b-GGUF/resolve/main/granite-4.1-3b-Q8_0.gguf
./runner -m model.gguf --serve
curl localhost:8080/v1/chat/completions \
-d '{"messages":[{"role":"user","content":"Say hello in one sentence."}]}'
The asset is runner-linux-x86_64, built on Ubuntu 24.04 with a GLIBC 2.38 ceiling that the release workflow checks (since 1.6.1; the 1.6.0 asset required GLIBC 2.43). Check it with sha256sum -c --ignore-missing SHA256SUMS.
runner-windows-x86_64.exe, with a notification-area controller.
The binaries are not yet notarized. A curl download runs as shown; a browser download gets quarantined by Gatekeeper. Clear it with xattr -d com.apple.quarantine runner or right-click and Open once.
make builds the release binary with no dependencies beyond a C compiler; CUDA and Metal kernels are embedded at build time. Build and platforms.
A Dockerfile ships in the repository. Container image.
Runner is at v1.24.0, and every machine it has not met yet is an invitation. An unusual GGUF, a coding agent, an NVIDIA or Apple setup, or a model family not in the support matrix: the result is wanted, success or failure alike. Open an issue with runner --version, runner --info caps, the model's exact filename and the load log. Independent reproductions of the determinism claims are credited in the docs, as the first one already is.
Will it fit
Know whether a model fits before you download it.
Finding out that a model does not fit usually means downloading 20 GB and watching it crash. The answer is already written in the first few megabytes of the file. Runner reads just that part and tells you, with the arithmetic.
curl -r 0-16777215 -L -o head.gguf \
https://huggingface.co/ORG/REPO/resolve/main/MODEL.gguf
./runner -m head.gguf --info fit -c 16384
On an RTX 3070, with the 1.0.1 release, it named the same split the loader then used in 70 of 72 cases and was one layer cautious in the other two (six models, two context sizes, four cache formats, 2026-10-03). 1.16.0 extends it past that set: on hybrid models, on DeepSeek-V2's latent-attention cache, on a file that declares a NextN/MTP block and where a load turns the KV ring on, it now predicts the loader's own split. --info caps says what the machine can run and --info doctor loads a model, probes it and reports. How the verdict is computed
Not sure which file to try? ./runner recommend lists the supported files that fit this machine, largest first, each with its measured fidelity line or marked unmeasured, offline. Details
Runner: Derive
Make your own file, measured.
The usual way to shrink a model squeezes every part by the same rule, and the file is rarely measured against the original afterwards. runner derive measures which parts can take the squeeze, makes the file, measures how far it drifted from the publisher's model, and writes the numbers into the file's card. The card leads with what the file is not for and its weakest number, then whether it passes the bar.
--target-size plans the file from a ladder of types (--high and --low, a --mid rung, or a whole --ladder), demoting one group of tensors at a time where it adds the least error per byte saved. A tensor the importance matrix does not cover, such as output or token_embd, is held at the top rung and named in the record. --imatrix calibrates rounding for q3_k, q4_0, q4_k, q5_k, q6_k, q5_1 and iq4_nl using ggml's type-specific weighted writers. The five added formats match pinned ggml bytes on a real tensor slice and deterministic boundary rows: inputs and reference build.
A 17.1 GB Qwen3-30B-A3B file came from one command. Against Qwen's float32 model over the same 2,000 positions it reads 0.0290 mean KLD and 99.01% margin-qualified top-1; Qwen's official Q4_K_M, 1.45 GB larger, reads 0.0909 and 94.80% and fails the bar. Our hand-built selective file is still slightly closer on mean KLD (p 0.02) and 0.88 GB larger; on margin-qualified top-1 the two tie. All three were measured on one text, the project's gold corpus. The record · Options
# hf:DIR is a local download of Qwen/Qwen3-30B-A3B (huggingface-cli download Qwen/Qwen3-30B-A3B --local-dir Qwen3-30B-A3B)
./runner derive -m Qwen3-30B-A3B-Q8_0.gguf -o out.gguf \
--target-size 17106040320 --high q4_0 --low q3_k \
--match _exps --imatrix Qwen_Qwen3-30B-A3B.imatrix \
--reference hf:./Qwen3-30B-A3B --reference-arg --upcast-at-use
--type-plan, --prune-experts, --remove-sublayer) still run on their own: plan formats and limits. A three-rule plan wrote an 8.99 GB Mellum 2.1 file that passes the bar (0.0293, 98.74%) where the publisher's Q4_K_M fails it.More context, less memory
Fit more context in the same memory.
While a model reads a long document it keeps notes on every word so far, and on a long context those notes can take more memory than you have left. Runner can write the notes smaller. It keeps 8 bits for the half that decides where to look, which measurement showed is the half that matters, and shrinks the other half to 4 bits.
./runner -m model.gguf --serve -c 32768 --kv k8v4
./runner -m model.gguf --serve -c 32768 --kv q8 # the gentler setting, about half
--kv k8v4 stores the cache in about 41% of the usual bytes. On Qwen3.5-4B, Muse-Glimmer-30B and Qwen3.8-27B it agreed with the full-size cache on 100% of clear-cut tokens over 500 positions each. What each setting costs, model by model
--kv f32 goes the other way: twice the f16 cache's memory, nothing rounded. It is a measurement instrument, not a default, on the CPU and CUDA; Metal refuses it. On gemma-4-26B-A4B's bf16 conversion, raw text read a mean KL of 0.428 against the publisher's float32 model with the f16 cache and 0.0055 with f32: the distance was the cache's rounding, not the weights.
| while loaded and idle, 8 GB Apple M1 | Runner | llama-server b10639 |
|---|---|---|
| wired (unevictable) memory | +8 MB | +3,819 MB |
| CPU wakeups per second | 0.5 | 161 |
| CPU time per idle minute | ~0.00 s | 0.2 to 0.3 s |
| give the memory back | POST /unload, 360 MB to 24 MB | kill the process |
| 128 GB Apple Silicon Mac, gpt-oss-120b (63 GB), 2026-09-01 | Runner 0.4.4 | llama-server 010be968 |
|---|---|---|
| wired memory while loaded and idle | +35 MB | +60.8 GB |
after /unload | RSS 229 MB | no unload |
granite-4.1-3b Q8_0 at c=4096, stock defaults, engines run sequentially, four-state lifecycle. Reproduce with scripts/idle_coexistence.py. Full 120B table and method: docs/idle-coexistence-120b-m5max-2026-09-01.md.
Designed to stay on
What a resident server does while it serves nothing
Benchmarks rarely show it, so it was measured. llama-server wires the whole model into unified memory, holds it until the process dies, and its idle loop ticks at about 160 Hz. Runner keeps weights as evictable zero-copy mappings the OS can reclaim when another app needs the RAM, wakes about once every two seconds, and hands everything back on /unload or automatically with --ttl.
What that costs is the first answer after the memory has been taken back, which waits for the model to be read in again: about 3 s for the 3.6 GB model on the 8 GB Apple M1, about 10 s for the 63 GB model. Runner is built to be left running all day next to your actual work.
On a discrete GPU (RTX 3070) the footprint gap disappears, both engines hold about 4 GB of VRAM loaded, and the remaining differences are idle discipline and lifecycle control: /unload returned all 4 GB of VRAM; llama-server has no unload.
Also in the box
Everything else the one file does.
A shared GPU stops being first-come, first-crash
Runner processes on the same GPU share a VRAM registry. A refused load names every live holder by PID, model, bytes and uptime; --wait-for-vram turns the refusal into a bounded queue; records left by dead processes are reaped. A GPU becomes something you can schedule rather than something you hope fits.
Ask what fits before loading anything
--info caps needs no model file and returns one JSON document with live RAM and VRAM, backend and GPU limits, admitted quant types and architectures, placement modes and model-count limits. --info fit answers the same question for a specific file from its GGUF header, the first few megabytes, so a ranged read decides whether the rest of the download is worth starting. On a discrete GPU it computes the loader's own layer split for each KV cache format and judges RAM by what stays on the host: on an RTX 3070 it named the loader's exact layer count in 70 of 72 cases and one layer fewer in the other two. For Gemma 4 E-series it separates the row-gathered per-layer embedding table from the resident hot set; allow extra RAM for touched rows and runtime scratch.
See what is already cached
runner cached lists files downloaded by -hf or --pull, with sizes and freshly computed SHA-256 digests, offline. Hashing reads every cached byte; --sizes-only skips that work for a quick list, and --json gives structured output. Incomplete multipart sets are identified. This inventory is separate from runner recommend's advice and the server's /v1/models list. Reference and hashing cost.
A TLS front for a proof of concept
The tested Caddy and Compose recipe requires a bearer API key over HTTPS while Runner stays bound to loopback. Its fixture test checks rejected unauthenticated requests, successful authenticated completions and the listening socket. TLS and authentication stay in the proxy.
Decisions you can gate
choice_logprobs records each JSON-schema branch as legal alternatives, a posterior renormalized over them, the probed probability mass, and how much of the model's probability the legal branches held, so a choice the schema forced on a model that wanted none of them reads as one. confirm_below turns that into one answer per turn: the lowest posterior a chosen branch had, and whether it fell below your threshold. Served Llama-3.2-3B with three tools picked get_weather at 0.92 for a weather question and at 0.78 when send_email was wanted, and asked for confirmation at 0.9. One versioned contract, docs/decision-record.md.
Long agent turns stay on track
A reasoning budget closes an over-long reasoning turn with a short sentence in the model's own voice, so the answer keeps its whole budget; the loop guard closes a reasoning turn that has started repeating; a tool call cut short says which values the closer wrote rather than the model. Each is a serving control, named in the response telemetry when it fired.
Suspend, resume, fork
With --sessions DIR a generation can stop after a set number of tokens, be written to a session image, and resume later exactly where it stopped, or fork from the same point under a new seed. The image names the model, the binary and the constraint it ran under.
One report to attach
runner --info doctor loads the model, runs one short probe and prints one JSON report: version, placement, template, sampler, memory, timings, and findings each with a next step. It holds no prompt or reply text unless you ask for it. --info caps, --info fit and --info tools answer the narrower questions as JSON.
Smaller caches, longer contexts
KV caches in f16, q8, fp4 or the split k8v4 (K at q8_0, V at fp4, about 41% of f16), and f32 as an instrument. The 4-bit cost is not symmetric, so it is measured per model against the f16 cache and published: k8v4 reads a mean KLD of 0.002 to 0.004 with 100% margin-qualified top-1 on Qwen3.5-4B, Muse-Glimmer-30B and Qwen3.8-27B, and 0.04 on Qwen2.5-1.5B, where fp4 for both sides reads 2.00. A ring for sliding-window layers keeps only the rows the window can reach, output-identical, taking gemma-3-4b at 32k from 4,563 MB to 800 MB of cache; by default (--kv-ring auto) it turns on when the weights and the flat cache do not fit.
Models fetched and checked
-hf owner/repo[:TAG] downloads a GGUF from the Hugging Face Hub, verifies it against the Hub's SHA-256 record before it loads, and refuses a repository whose file list would write outside the cache. --pull does the same download and check without loading the model, and prints the path for a script.
Model surgery, with provenance
--rewrite with per-tensor type plans, --prune-experts for stacked MoE layouts, --merge-lora with a provenance record, --context-surgery to compile a YaRN target into a native GGUF, and --remove-sublayer to physically drop a block's attention or FFN and declare the absence in the header. Each rewrite is deterministic and reparsed before success.
Speculative decoding from four draft sources
A draft model, an n-gram lookup, the model's own MTP head where a single-block export carries one (--draft mtp, token-identical, measured 1.31x on code on a Threadripper; the gain depends on the machine, and both measurements are published), and context-grounded drafts that need no weights at all. On CUDA with every layer on the device, two measured cases draft without a flag: a server request with draft_hints (the lookup, 2.86x on an in-context edit) and --json output on Qwen3.5-4B (its NextN head, 1.13x on a tool call). Prose stays plain decoding.
RUNNER_GRAMMAR_FF=1 drafts grammar-pinned tokens under JSON constraints with the plain path's token IDs and bytes. It stays opt-in: the measured cost depends on the schema. Class and measurements.
Structured output as a sampler guarantee
--json emits one valid JSON object. JSON-Schema, Responses text.format and tool parameter schemas compile to a streaming conformance validator covering objects, arrays, enums, unions, numeric bounds, string lengths and anchored patterns. A oneOf or anyOf of objects told apart by a required const, as Pydantic and OpenAPI write a discriminated union, compiles with each object's own properties. Unsupported or ambiguous constraints fail at compile time rather than being silently weakened.
What it promises
Six promises, each one tested.
Runner deliberately rides llama.cpp's formats rather than competing with them: GGUF in, llama.cpp-convention adapter files in and out. An adapter Runner trains scores identically, 1.000 on its held-out eval, when served by stock llama.cpp, and community F16 adapters load straight back. Both measured, not assumed. What it adds on top are promises the ecosystem does not make.
Determinism as a hard promise
The same executable and inputs reproduce the same sampled tokens across runs and thread counts. Training reproduces the same adapter file sha256. Both are gated in CI. Independent rebuilds are explicitly outside the byte-identity claim, because compilers and ISA libm differ, and the full boundary is one page: docs/determinism-scope.md.
Scope as a promise
Supported architectures are named. Unknown ones are refused by name rather than run on a guess. Every backend claim is tied to an executable gate and pinned model evidence, and a hardware switch has a correctness contract: CPU/GPU identity belongs to a SHA-256-pinned model and execution path, and faster kernels that reassociate sums pass tolerance gates rather than inherit correctness from the backend's name.
Evidence as an artifact
Every table names its method and its date. Experiments that were built, measured and rejected are kept as documents so they are not attempted twice. A published file whose number did not reproduce stays published with the measured status at the top of its card.
Concurrency without crosstalk
Parallel slots decode in one batched step, and on CUDA and Metal that step is gated to match decoding each request alone, byte for byte, including steps with more requests than one microbatch holds. The gate grew to eleven sequences after a 16-slot server in the lab showed what happens without it.
Records a reviewer can check
A served turn is a receipt; receipts chain; runner attest pack gathers them with the model signature and the measured envelope into one evidence pack that runner attest check-pack verifies offline. Receipts and the audit demo.
--verify replays served tool calls, turns cut by a stop sequence, turns under a reasoning budget or the loop guard, and turns the server cut on a cancel or a timeout. A record written before those fields stays UNVERIFIABLE and names the one it lacks; scripted replies and the reasoning channel's own sampling cannot be replayed. Opt-in Metal tiled generations name their arithmetic in the receipt. Without a replayable decode schedule, the verifier reports UNVERIFIABLE instead of attempting solo replay.
Compatibility as a promise
From 1.0 the command line, the exit codes, the HTTP API, the record formats and the model files that load stay compatible across 1.x. What is bound to the exact build, and what is not covered, is written down beside it. What 1.x keeps.
Runner 1.0
What 1.x keeps, and what it does not.
A 1.0 is a promise about interfaces, not about speed. Runner follows semantic versioning from 1.0.0: what this list keeps changes only at 2.0, and a flag that has to go is deprecated with a warning for the rest of 1.x first. The full policy is one page: docs/versioning.md.
Every flag runner --help documents and its meaning; the exit codes, including the --verify verdicts; the HTTP endpoints and request fields, with response fields only added, never renamed; every record format by its schema_version, so a 1.0 receipt still verifies under a later 1.x build; every architecture and quantization format that loads today; the Python and TypeScript client APIs.
Replay agreement, session images and measured envelopes belong to the exact binary that produced them. That was never a cross-version promise, and the envelope gate matches the version exactly so it cannot become one by accident.
Generated tokens can change between releases when a kernel or sampler is fixed, and the CHANGELOG says so. Speed figures, the support matrix and certification verdicts follow the evidence. RUNNER_* switches and log text are not interfaces; the JSON outputs are.
The latest 1.x release is supported; there are no backports. Security reports go through SECURITY.md.
Support matrix
Named, gated, and refused by name outside the list.
runner --info caps publishes the architecture IDs the current binary admits. The full per-family notes, with the measured evidence behind each row, are in the manual's support matrix. Summary as of v1.24.0:
CPU (x86 AVX2/FMA, ARM NEON), CUDA (driver API, embedded PTX), Metal (embedded shaders, unified memory). Linux x86_64, macOS arm64, Windows x86_64 release binaries.
30 labels: llama, mistral, mistral3, smollm, stablelm, qwen2, qwen3, qwen35 and qwen35moe (Gated DeltaNet hybrids), clef, qwen4exp (experimental; placement/context and reference limits in the manual), qwen3moe, deepseek2 (multi-head latent attention), gemma3, gemma4 (dense, MoE, E-series, native tool protocol), phi3, gpt-oss, apertus, afmoe, muse-glimmer, granite, granitehybrid and nemotron_h (Mamba-2 hybrids), nemotron_h_moe, lfm2, lfm2moe, mellum, spark2_5, k2-horizon and flint. Admission is layout-specific: an unsupported tensor arrangement is refused even when the architecture ID is listed.
GGUF v2/v3, mmap host weights, standard multi-part sets. k-quants and legacy quants, MXFP4, NVFP4 with its per-tensor scale companion, the IQ1 to IQ4 codebook families. CUDA serves all of them, NVFP4 with the export's per-tensor scale companion applied in the kernel and the IQ1 to IQ3 codebook types with device twins of the CPU decoders; Metal serves the IQ1 to IQ3 families with its own kernels too, and only NVFP4 stays on the CPU there. A backend without the kernel refuses loudly, naming the tensor and type.
OpenAI Chat Completions, Responses, legacy completions, embeddings and rerank, Anthropic Messages, /v1/decide, SSE streaming, parallel slots, model swap and unload, prefix reuse, reasoning budgets and the loop guard, Prometheus /metrics, native tool protocols for gemma4, granite4, Apertus, Harmony, atem, Muse recipients, Qwen's JSON calls and the function-XML families (Ornith, Granite 4.2, Qwen 3.8, Qwen3-Coder), each rendered from the publisher's template and checked token for token. A GGUF's own sampling defaults are used when it carries them.
LoRA through the quantized base with runner train, for dense models, the Qwen3.5 and Clef hybrids, and attention-only adapters on sparse-MoE models. With --train-gpu a step on a 7B model takes about ten seconds on a consumer NVIDIA GPU, 90 s on the CPU beside it, within rounding of a CPU run rather than its bytes. Adapters served with --lora on the CPU, CUDA and Metal; --info adapter says whether a model can take one before you train; runner train --dpo trains from preference pairs against the frozen base. runner train --full trains every dense projection of an F32 file into a new variant, on the CPU, and refuses what it does not cover yet (the GPU, DPO, checkpoints, recurrent layers, MoE expert banks); trained in float and then quantized to Q8_0, it scored the same on its one saturated task as training through a Q8_0 copy, so that route was dropped.
Replay-verifiable transcripts; Ed25519- or ML-DSA-44-signed, chained receipts with a one-exit-code verifier; evidence packs that gather receipts, the model signature and the measured envelope for offline review; OpenSSF Model Signing verification of the loaded GGUF by the key method; session images that suspend, resume and fork a generation.
macOS menu bar and Windows notification-area controller. Release binaries for Linux, macOS and Windows with a SHA256SUMS file, and a container image on GHCR.
Vulkan; TLS, auth and remote bind (loopback only, by design); remote or streamed GGUF parts; qwen2moe and kimi; pure Mamba and Jamba; MTP drafting on Metal, on a partial CUDA split or with more than one predictor block; OMS certificate and keyless signature methods; full GBNF; image and document inputs; hosted tools; a response store that outlives the process; parallel tool calls on the Responses and Messages surfaces.
Model list
One list of model files, each with when it last passed
Runner keeps loading every model the support matrix admits. The files it validates are one list, at the top of the support roster: each is one greedy prompt compared byte for byte against a pinned output on the device the file names, with the Runner version and date it last passed, and every file's envelope and record; the README's section says what the check is. Nothing is re-tested on a schedule: validation runs happen in the project's larger validation runs and when a change needs one. A mark says the file reproduced a pinned answer on that device and nothing about the quality of its answers.
Coding agents
Client compatibility is a dated observation, not an inference from an API name.
Current endpoint choices, tool/context limits, tested workflow instructions, and the scope of installed-client evidence are in the coding-agent guide. Library smoke tests run with pinned SDK dependencies; their success does not certify every newer client or model task.
# ~/.codex/config.toml
model = "runner"
model_provider = "runner"
[model_providers.runner]
name = "Xyntetik Runner"
base_url = "http://127.0.0.1:8080/v1"
wire_api = "responses"
env_key = "RUNNER_API_KEY"
export RUNNER_API_KEY=none
./runner -m model.gguf --serve -c 16384
codex "list the files here"
Codex's system prompt and tools consume roughly 10k input tokens before the user request, so use at least a 16k context. A Responses request is kept only when it asks with store:true, in memory and gone with the process; Codex sends its history each turn.
src/gguf.c GGUF metadata and tensor-table parser
src/tokenizer.c SPM/BPE tokenization and family pre-tokenizers
src/quants.c scalar, AVX2/FMA, and NEON quantized dot kernels
src/model.c tensor admission, weight wiring, and forward pass
src/sample.c sampling filters and token selection
src/jsonmode.c incremental JSON-prefix validation
src/schema.c JSON-Schema compiler and streaming validator
src/schema_tools.c native tool-call grammars for each model family
src/template.c chat templates, thinking channels, and tool syntax
src/engine.c prompt feeding, prefix cache, constrained sampling, speculative decode
src/quantize.c requantization and stacked-MoE expert pruning
src/cuda.c CUDA driver backend; kernels.cu becomes embedded PTX
src/metal.m Metal backend; kernels.metal is embedded at build time
src/server.c loopback HTTP server, slots, routing, and lifecycle
src/vramreg.c cross-process VRAM ownership and bounded waiting
src/ed25519.c signing subset of TweetNaCl (receipts)
How it is built
Readable in an afternoon.
Host weights stay quantized in the mapped GGUF and are dequantized while computing. CUDA copies selected weights and compute buffers to VRAM; Metal wraps the mapped weights in unified memory. The load log and --info caps are the sizing sources for an exact model and machine.
The complete map, the command-line reference and the compatibility evidence are in the manual; release history with each version's measurements is in the changelog.