CMF β Cortiq Model Format
One file. No Python, no torch, no CUDA install, no C++ toolchain.
A .cmf carries the quantized weights, the tokenizer and the chat template
together, checks its own integrity, and memory-maps straight off disk. The
runtime is a small Rust core with no ML framework under it, running on CPU
everywhere and on GPU through wgpu β Vulkan, DX12, Metal β out of the box.
This repository is the format's front page. It holds the specification and the index of published models; it carries no weights of its own.
- Specification β
SPEC.md, the normative document - Source β github.com/infosave2007/cmf (Apache-2.0)
- Runtime β
cortiq-clion crates.io, and prebuilt binaries for six targets on the releases page
Run one
cargo install cortiq-cli # or take a prebuilt binary
hf download infosave/Nanbeige4.2-3Bcmf nanbeige42-3b-q4t.cmf --local-dir .
cortiq verify nanbeige42-3b-q4t.cmf # per-tensor hashes
cortiq run nanbeige42-3b-q4t.cmf --prompt "Write a haiku about memory-mapped files."
Converting a checkpoint is one command and no Python:
cortiq convert --model Qwen/Qwen3-0.6B --quant q8 --output qwen.cmf
What is actually in the file
A CMF file is an envelope, not a tarball: readers navigate through the header
and never guess at offsets. Unknown header fields are ignored, so the format
grows additively β a breaking change costs a feature bit or a version bump,
never a silent reinterpretation. A file written today stays readable, and
cortiq verify is the contract that says so.
Beside the weights it carries the things that are usually scattered across a repository or lost entirely: the tokenizer and chat template, per-tensor hashes, an optional Ed25519 signature, per-task masks that select an active subset of the shared weights, and a swarm of skills sharing one backbone β several specialists in one file, chosen at load time rather than downloaded separately.
Two things it does that other single-file formats do not:
Attention that stops growing with the context. Converting with --o1
replaces a layer's softmax attention with a streaming operator holding a
fixed-size state β a few exact anchor keys, an exact recent window, and a
landmark sketch of everything older, under one shared denominator. The
weights are byte-identical; the flag only records a hint in the header.
Generative models in the same container. The format is not
LLM-only. cortiq imagine renders images and cortiq animate renders video
with synchronized stereo audio, from .cmf files packed the same way, on the
same runtime.
Published models
| model | what it does | size |
|---|---|---|
| Nanbeige4.2-3B | looped transformer, 22 layers run twice | 2.36 GB |
| Bonsai-1.7B | 1-bit BitNet, phone-sized | 0.33 GB |
| Bonsai-8B | 1-bit ternary at 2 bits stored | 2.32 GB |
| Bonsai-27B | 1-bit, 40 tok/s on an RTX 4090 | 5.10 GB |
| KAT-Coder-V2.5 | 34.7B-A3B MoE for code | 12.65 GB |
| Kimi-Linear-48B-A3B | KDA linear attention, MoE | 17.75 GB |
| Qwen3.6-27B | dense, q4tp | 14.26 GB |
| Qwen3.6-35B-A3B | MoE, q4tp | 18.68 GB |
| Qwen3.6-35B-A3B-Escha | the same at two bits | 12.87 GB |
| DeepSeek-V4-Flash | 1T-A32B, split into parts | 455 GB |
| Lumina-Image-2.0 | text β image, 19 GB tree in 3.2 GB | 6.72 GB |
| MiniMax-H3 Turbo | text β video with sound, 4 steps | 71.05 GB |
Every one of them runs from the same binary: cortiq run for the text
models, cortiq imagine for Lumina, cortiq animate for MiniMax-H3.
Where it is honest
The format is settled at v2 and evolves additively. The crate APIs may still move before 1.0. Quality claims in the model cards are measured held-out numbers with the corpus named, not estimates β where a number was not measured, the card says so rather than guessing, and the container refuses to record a quality field without a measurement.