mirror of
https://github.com/ashhart/TensorFold.git
synced 2026-12-03 02:56:31 +08:00
docs: move README sections into docs/, short human README
Move ZIG-PREVIEW.md and RELEASE-NOTES-1.0.0.md into docs/ and fix every inbound link. RUNBOOK.md stays at the root: zig/build/release_version.zig embeds it by path. Split the long README into docs/supported-models.md, docs/run-guide.md and the existing docs/living-weights.md, and merge the agent workflow and build notes into CONTRIBUTING.md. The README keeps the quick start, a docs list and the contributors.
This commit is contained in:
@@ -8,7 +8,7 @@ Inspect `atc board --json` and check the issue before starting work.
|
||||
Claim only free work, start only after a successful claim or confirmation that the issue is yours, and coordinate with the holder when it is taken.
|
||||
Use ATC 0.7.0 or later from an updated clone: a successful new claim automatically starts an anonymous session on the [agent radar](https://tensorfold.dev/atc).
|
||||
Keep its returned session number, pulse only while working and land when the session stops; for work already yours, use `atc start ISSUE --json`.
|
||||
Follow the [README workflow](README.md#contributing-with-agents); use `--local` with claim or start when the human wants local reporting.
|
||||
Follow the [contributing workflow](CONTRIBUTING.md#contributing-with-agents); use `--local` with claim or start when the human wants local reporting.
|
||||
Show a GitHub name with `--github-name` only when the human opts in.
|
||||
|
||||
Use `atc who <file> --json` to inspect overlapping edits and `atc overlap --json` before opening a pull request.
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
# What's new in TensorFold
|
||||
|
||||
Each release's page on GitHub has its notes and measurements. See [the 1.0.0 release notes](RELEASE-NOTES-1.0.0.md) for the native binary's supported models and migration details.
|
||||
Each release's page on GitHub has its notes and measurements. See [the 1.0.0 release notes](docs/release-notes-1.0.0.md) for the native binary's supported models and migration details.
|
||||
|
||||
## Unreleased
|
||||
|
||||
@@ -2877,7 +2877,7 @@ Known issues, with fixes in testing:
|
||||
- Native release archives target macOS arm64 and Linux aarch64 for the GB10, with the executable and bundled license notices. CUDA deployment still needs its qualified kernel assets and NVIDIA driver; paired Metal serving needs the documented transport setup.
|
||||
- CUDA GB10 qualification is greedy. Sampled requests do not yet honor the seed, `top_k: 0` fails on that path, and health/metrics do not yet report CUDA device and pinned-memory usage. Those fixes are planned for 1.0.1.
|
||||
- Qwen3.8-27B is excluded: drafted/plain equality passes, but its paired served decode and cold-prefill measurements remain slower than Python 0.6.6. Bonsai, Gemma 4, Qwen3.6 and DeepSeek-V4 remain ports for 1.0.x, subject to their model gates.
|
||||
- Contributor credits: all 145 public contributors are listed in [RELEASE-NOTES-1.0.0.md](RELEASE-NOTES-1.0.0.md).
|
||||
- Contributor credits: all 145 public contributors are listed in [the 1.0.0 release notes](docs/release-notes-1.0.0.md).
|
||||
|
||||
Earlier entries document the Python release line.
|
||||
|
||||
|
||||
+46
-8
@@ -7,25 +7,59 @@ Open an issue before a new model family, backend or arithmetic change so we can
|
||||
|
||||
## Coordinate before editing
|
||||
|
||||
TensorFold uses [ATC](https://github.com/ashhart/ATC) to coordinate contributors and coding agents; check the [agent radar](https://tensorfold.dev/atc) before choosing an issue.
|
||||
Follow the [README workflow](README.md#contributing-with-agents) to check, claim, publish your session, pulse while working and land when you finish.
|
||||
With ATC 0.7.0 or later, a successful new claim automatically starts an anonymous public session; keep its returned session number and avoid starting a second one.
|
||||
Showing a GitHub name is an explicit opt-in with `--github-name`; `--local` keeps a new session on your machine.
|
||||
TensorFold uses [ATC](https://github.com/ashhart/ATC) (Agent Traffic Control) to coordinate contributors and coding agents, so they can avoid duplicate work and conflicting changes.
|
||||
Check the [live agent radar](https://tensorfold.dev/atc) before choosing an issue.
|
||||
If an issue is taken, offer to pair, split or review instead of opening a competing implementation.
|
||||
Run `atc overlap --json` before opening a pull request and resolve conflicts with overlapping work.
|
||||
Agents must also read the [ATC contributor instructions](docs/atc/SKILL.md).
|
||||
Building with a coding agent? Have it load the [contributor skill](docs/recipes/SKILL.md) before it writes any code.
|
||||
|
||||
### Contributing with agents
|
||||
|
||||
Install or upgrade ATC to 0.9.4 or later, then run from an updated TensorFold clone:
|
||||
|
||||
```sh
|
||||
npm install -g github:ashhart/ATC
|
||||
atc check ISSUE --json
|
||||
atc claim ISSUE --json
|
||||
```
|
||||
|
||||
Replace `ISSUE` with the issue number and claim only after a complete check says the work is free.
|
||||
TensorFold enables automatic public check-ins: with ATC 0.7.0 or later, a successful new claim starts an anonymous session on the radar and returns its `session` number.
|
||||
Keep that number instead of starting a duplicate session.
|
||||
For work already yours, start a session with `atc start ISSUE --json`.
|
||||
Add `--github-name` to `claim` or `start` only if you want your verified GitHub name shown; showing it is an explicit opt-in. `--local` keeps a new session on your machine.
|
||||
The board shows the issue, activity state and last check-in; GitHub still associates the verification comment with its author.
|
||||
Check that `publication` is `public`; `unavailable` means the public update failed even if the local claim or session succeeded.
|
||||
|
||||
Pulse only while the agent is working, before its five-minute check-in expires:
|
||||
|
||||
```sh
|
||||
atc pulse ISSUE SESSION working --json
|
||||
atc who path/to/file --json
|
||||
atc overlap --json
|
||||
atc land ISSUE SESSION --json
|
||||
atc release ISSUE --json
|
||||
```
|
||||
|
||||
Use `reviewing` or `blocked` when appropriate, and land the session when it stops.
|
||||
Run `atc overlap --json` before opening a pull request and resolve conflicts with overlapping work.
|
||||
Before opening a pull request, have the agent run the [pull request skill](docs/pr/SKILL.md); agents that support skills can install it as `tensorfold-pull-request`.
|
||||
|
||||
## Build and host tests
|
||||
|
||||
Use the exact Zig version in `.zig-version`, currently 0.17.0.
|
||||
Metal builds need Xcode's macOS SDK and Metal toolchain.
|
||||
Metal builds need Xcode's macOS SDK and Metal toolchain: the `.metal` sources need Xcode's Metal compiler. Install full Xcode and its
|
||||
Metal Toolchain component (`xcodebuild -downloadComponent MetalToolchain`); the Command Line Tools alone fail every kernel compile with
|
||||
`unable to find utility "metal"`.
|
||||
|
||||
```sh
|
||||
zig build native -Dcpu=apple_m1 -Dversion=1.0.0
|
||||
zig build test test-golden -Dcpu=apple_m1
|
||||
```
|
||||
|
||||
`native` writes `zig-out/native/bin/tensorfold-native`.
|
||||
`native` writes `zig-out/native/bin/tensorfold-native`, the server.
|
||||
Structured output and required tool calls need the release archive's `lib/` or `zig build grammar -Dxgrammar=DIR`; prepare DIR with `git clone --branch v0.2.8 --recurse-submodules https://github.com/mlc-ai/xgrammar` (use the native build's same `--prefix` for grammar).
|
||||
To build one stripped server for one GPU (`zig build -Dgpu=spark -Dnvcc=...`, about 69% smaller than the four-target server), see [Build a server for one GPU](RUNBOOK.md#build-a-server-for-one-gpu).
|
||||
The `apple_m1` CPU target keeps the macOS binary compatible with M1 through M5.
|
||||
`test` runs unit tests; on macOS it also runs available Metal device checks, including GLM MLA and KDA checks.
|
||||
Run the full suite on an isolated machine when the local GPU is serving a model.
|
||||
@@ -62,6 +96,7 @@ The HIP backend uses the same shared core and serving contracts. Device qualific
|
||||
checkpoint, compiler, runtime and architecture; a host build does not establish those receipts.
|
||||
|
||||
Linux release builds use the CUDA backend and qualified GPU kernel assets.
|
||||
Release archives include the native executable, runtime assets and license notices.
|
||||
[Packaging](packaging/README.md) lists the flat fatbin set and optional captured CUDA files required by `dist`.
|
||||
Compile success alone does not qualify a GPU or checkpoint.
|
||||
|
||||
@@ -89,6 +124,8 @@ A documented one-step tie policy applies only to the same two contenders with bo
|
||||
|
||||
## Performance receipts
|
||||
|
||||
For cache-aware performance receipts, see [observed cache benchmark evidence](docs/cache-benchmarks.md).
|
||||
The clients retain server usage and output fingerprints, and verify cold/reused states rather than inferring them.
|
||||
Measure before and after on the same machine, using the same checkpoint, public prompt IDs and settings.
|
||||
Name the commit/version, GPU, OS, checkpoint revision, runtime libraries and request parameters.
|
||||
Record pass, fail and skip counts and explain any unrun platform or feature.
|
||||
@@ -135,6 +172,7 @@ Before pushing, run `python3 tools/pr_check.py --base origin/main --pr NUMBER` t
|
||||
Attach the baseline count and identify inherited findings instead of claiming a nonzero checker exit is clean.
|
||||
Write tests that demonstrate a real failure and its correction; keep the failing receipt when changing arithmetic or lifecycle behavior.
|
||||
Run the host suite and the device/model checks for every affected platform.
|
||||
Coding agents should also load [docs/recipes/SKILL.md](docs/recipes/SKILL.md); agents that support skills can install it as `tensorfold-contributor`.
|
||||
We review a candidate, preserve its authorship and run the release gates before landing it.
|
||||
|
||||
## Public identity and privacy
|
||||
@@ -151,5 +189,5 @@ A clean diff or a passing test suite does not replace that review.
|
||||
Include the native version, model revision, GPU/OS, exact command, startup error and a public request that reproduces the problem.
|
||||
A token mismatch report should include both drafted and plain token hashes at the same settings.
|
||||
|
||||
TensorFold is Apache-2.0; a contribution follows that license.
|
||||
TensorFold is Apache-2.0; a contribution follows that license. See [LICENSE](LICENSE), [NOTICE](NOTICE) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
||||
Model weights keep their own licenses, and the archive retains the project's required third-party notices.
|
||||
|
||||
@@ -1,51 +1,24 @@
|
||||
<p align="center">
|
||||
<a href="https://buymeacoffee.com/ashhart">Buy Ash a coffee</a> ·
|
||||
<a href="https://x.com/tensorfold_dev">@tensorfold_dev on X</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<img src="assets/tensorfold-logo.png" alt="TensorFold logo" width="160">
|
||||
</p>
|
||||
|
||||
# TensorFold
|
||||
|
||||
TensorFold serves language models from a Zig binary on Apple Silicon and NVIDIA GPUs.
|
||||
The engine reads checkpoints, tokenizes requests and runs Metal or CUDA kernels directly.
|
||||
Serving needs no Python or MLX installation.
|
||||
|
||||
Building with a coding agent? Have it load the [contributor skill](docs/recipes/SKILL.md) before it writes any code.
|
||||
|
||||
## Contributing with agents
|
||||
|
||||
Please use [Agent Traffic Control](https://github.com/ashhart/ATC) before editing TensorFold so contributors and agents can avoid duplicate work and conflicting changes.
|
||||
Check the [live agent radar](https://tensorfold.dev/atc) before choosing an issue and follow [CONTRIBUTING.md](CONTRIBUTING.md) and the [ATC contributor instructions](docs/atc/SKILL.md).
|
||||
|
||||
Install or upgrade ATC to 0.9.4 or later, then run from an updated TensorFold clone:
|
||||
|
||||
```sh
|
||||
npm install -g github:ashhart/ATC
|
||||
atc check ISSUE --json
|
||||
atc claim ISSUE --json
|
||||
```
|
||||
|
||||
Replace `ISSUE` with the issue number and claim only after a complete check says the work is free.
|
||||
TensorFold enables automatic public check-ins: a successful new claim starts an anonymous session on the radar and returns its `session` number.
|
||||
Keep that number instead of starting a duplicate session.
|
||||
For work already yours, start a session with `atc start ISSUE --json`.
|
||||
Add `--github-name` to `claim` or `start` only if you want your verified GitHub name shown; `--local` keeps a new session on your machine.
|
||||
The board shows the issue, activity state and last check-in; GitHub still associates the verification comment with its author.
|
||||
Check that `publication` is `public`; `unavailable` means the public update failed even if the local claim or session succeeded.
|
||||
|
||||
Pulse only while the agent is working, before its five-minute check-in expires:
|
||||
|
||||
```sh
|
||||
atc pulse ISSUE SESSION working --json
|
||||
atc who path/to/file --json
|
||||
atc overlap --json
|
||||
atc land ISSUE SESSION --json
|
||||
atc release ISSUE --json
|
||||
```
|
||||
|
||||
Use `reviewing` or `blocked` when appropriate, land the session when it stops, and resolve overlaps before opening a pull request.
|
||||
Before opening a pull request, have the agent run the [pull request skill](docs/pr/SKILL.md); agents that support skills can install it as `tensorfold-pull-request`.
|
||||
Building with a coding agent? Have it load the [contributor skill](docs/recipes/SKILL.md) and follow [CONTRIBUTING.md](CONTRIBUTING.md#contributing-with-agents).
|
||||
|
||||
## Quick start
|
||||
|
||||
Start with Qwen3.5-2B, the small 4-bit checkpoint checked on Metal and a GB10. The commands below download its
|
||||
pinned revision, then serve it as `local-model`. Model weights have their own licenses.
|
||||
Reviewing or benchmarking TensorFold? [Evaluating TensorFold](docs/evaluating.md) covers pinning, signature checks,
|
||||
a container and the tests that need no GPU.
|
||||
Start with Qwen3.5-2B, a small 4-bit checkpoint. The commands below download its pinned revision, then serve it as
|
||||
`local-model`. Model weights have their own licenses.
|
||||
|
||||
### Mac with Apple Silicon
|
||||
|
||||
@@ -59,10 +32,8 @@ tensorfold serve mlx-community/Qwen3.5-2B-MLX-4bit --name local-model --context
|
||||
|
||||
### Linux with an NVIDIA GPU
|
||||
|
||||
Use the release archive for your CPU: `linux-aarch64` on a GB10, `linux-x86_64` on an x86_64 host.
|
||||
It needs glibc 2.28 or newer and NVIDIA driver R580 or newer (CUDA 13.0), providing `libcuda.so.1`. Keep the archive's directories together.
|
||||
Its kernels are built with CUDA 13, so TensorFold refuses an older driver at startup; `nvidia-smi` shows the installed one.
|
||||
See the [CUDA runbook](RUNBOOK.md#linux-and-cuda) for runtime libraries and supported GPUs.
|
||||
Needs glibc 2.28 or newer and NVIDIA driver R580 or newer (CUDA 13.0). The [run guide](docs/run-guide.md#platform-setup)
|
||||
lists the archive's requirements; Windows has [its own guide](docs/WINDOWS.md).
|
||||
|
||||
```sh
|
||||
V=1.2.9
|
||||
@@ -92,343 +63,21 @@ curl -fsS http://127.0.0.1:8080/v1/chat/completions \
|
||||
```
|
||||
|
||||
The API also serves completions, Responses and Anthropic Messages. `/v1/models` lists the served name.
|
||||
On Windows with an NVIDIA GPU, follow [the native Windows build guide](docs/WINDOWS.md).
|
||||
Use `tensorfold --help`, `tensorfold capabilities --json` and `tensorfold serve REPO --help` to inspect your binary.
|
||||
You can also serve a complete local checkpoint directory or an existing Hugging Face cache.
|
||||
|
||||
`tensorfold web [ARGS...]` opens TensorFold Web, a small local web app for picking, running and chatting with models.
|
||||
If it needs installing, an interactive release binary offers to install its matching version with `uv` after you say yes.
|
||||
See [the web launcher](docs/web.md) for manual installation and unattended use.
|
||||
## Docs
|
||||
|
||||
`--parallel N` caps active requests at N; extra requests wait for a free slot.
|
||||
Omitting the flag uses `--parallel auto`, which asks for up to eight streams as memory and the engine allow.
|
||||
An explicit number is refused if the engine cannot fit that many streams.
|
||||
Read the engine's startup capacity line, such as `8 streams at once` on CUDA, for the count it accepted.
|
||||
With API authentication off, `/health` reports `live.connections` as active plus waiting requests and
|
||||
`live.waiting` as the queued count. For example, 8 connections with 4 waiting means 4 active requests.
|
||||
Completing or cancelling an active request frees its slot; cancelling a waiting request removes it from the queue.
|
||||
|
||||
## Mac app
|
||||
|
||||
The [TensorFold desktop workspace](app/README.md) bundles the local engine, model downloads, hardware recommendations, live generation metrics, coding workers and document editing.
|
||||
Download the Apple-silicon [beta 9 DMG](https://github.com/ashhart/TensorFold/releases/tag/v1.0.0-beta.9), or build from [`app/`](app/README.md).
|
||||
The desktop app launches the bundled `tensorfold-native` executable directly.
|
||||
Mobile clients in `app/mobile/` remain preview software.
|
||||
|
||||
## TensorFold Starlight (enterprise)
|
||||
|
||||
[TensorFold Starlight](https://github.com/ashhart/tf-starlight) gives an organisation one governed OpenAI- and Anthropic-compatible endpoint for a fleet of TensorFold engines on Macs, Linux GPU servers and Windows machines.
|
||||
It signs people in through the organisation's identity provider (OIDC or SAML, with SCIM provisioning), decides who may use which model and where it runs, places and supervises models on nodes, and accounts for every token.
|
||||
It runs fully offline, or brokers approved frontier providers under the same identity, policy and budgets; [the install guide](https://github.com/ashhart/tf-starlight/blob/main/docs/install.md) covers Docker, Kubernetes and Linux services.
|
||||
Starlight lives in its own repository, [ashhart/tf-starlight](https://github.com/ashhart/tf-starlight): it pins the TensorFold release it is tested with and checks every flag its nodes pass to `tensorfold serve` against that release in CI.
|
||||
Starlight is new: the gates that still need real GPU clusters or identity-provider tenants are listed in [its qualification notes](https://github.com/ashhart/tf-starlight/blob/main/docs/qualification.md).
|
||||
|
||||
## Living Weights (experimental)
|
||||
|
||||
Living Weights teaches a running model new facts in its own weights. Start a Nemotron 3.5 Lightning server with
|
||||
`--slide` and tell it something: each fact that passes the lesson's checks is written into the checkpoint folder's
|
||||
files. It is experimental: related facts can disturb each other, recall drops past a few dozen facts and with thinking
|
||||
on, and learned facts cost some decode speed on a Mac. [Known issues](docs/known-issues.md#living-weights---slide)
|
||||
has the details.
|
||||
|
||||
```sh
|
||||
tensorfold pull TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit
|
||||
hub="${HF_HUB_CACHE:-${HF_HOME:-$HOME/.cache/huggingface}/hub}/models--TensorFold--NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit"
|
||||
src="$hub/snapshots/$(cat "$hub/refs/main")"
|
||||
mkdir -p ~/models && cp -RL "$src" ~/models/nemotron-living # always teach a copy
|
||||
(umask 077; openssl rand -hex 24 > ~/models/slide-key) # --slide starts only with a key
|
||||
tensorfold serve ~/models/nemotron-living --slide --api-key-file ~/models/slide-key
|
||||
```
|
||||
|
||||
Leave that server running and send a lesson from another terminal:
|
||||
|
||||
```sh
|
||||
curl -N http://127.0.0.1:8080/v1/slide/learn -H "Authorization: Bearer $(cat ~/models/slide-key)" \
|
||||
-H 'Content-Type: application/json' -d '{"text": "I like blue."}'
|
||||
```
|
||||
|
||||
Send it a document instead and it finds the facts in it and learns them one by one. Open
|
||||
`http://127.0.0.1:8080/slide` to watch in 3D: the facts, the neurons each one took in the model's layers, the shard
|
||||
files that hold them, and the lesson running now.
|
||||
|
||||
Learning runs on Apple-silicon Macs and on an NVIDIA GB10 (DGX Spark), and a folder that learned on one serves on the
|
||||
other. On an APFS volume, `cp -cRL` makes a clone that shares the original's data until lessons change it. It rewrites the folder's files:
|
||||
before the first lesson the server keeps the originals in a hidden snapshot, and
|
||||
`tensorfold slide rollback ~/models/nemotron-living` puts them back, undoing every lesson. The
|
||||
[Living Weights guide](docs/living-weights.md) covers the key, teaching files and web pages, omp's `/learn` command,
|
||||
the 3D view, undoing lessons, and what to expect.
|
||||
|
||||
<a id="qualified-models"></a>
|
||||
|
||||
## Pick a model
|
||||
|
||||
These are the native release's serving paths. A recipe may also describe the older Python 0.6.6 engine;
|
||||
use its native section and the current [changes](CHANGELOG.md) together.
|
||||
Hardware below records the documented scope, not an unmeasured minimum. Context, parallel requests, prompt caches
|
||||
and drafters need memory beyond the weights. `tensorfold info REPO` reports the checkpoint's memory floor.
|
||||
Where no RAM capacity is published, inspect that floor before serving a large checkpoint.
|
||||
CUDA release images include sm_80, sm_86, sm_120 and sm_121. The A100 (sm_80) has kernel-check evidence
|
||||
([#846](https://github.com/ashhart/TensorFold/pull/846)), but no served checkpoint on record, so it is not model-qualified.
|
||||
Nemotron and dense Qwen have NVFP4/FP8 fallback code for sm_80 to sm_89 (#901, #1470); no such model run on sm_80 to sm_89 is recorded.
|
||||
|
||||
Run a table command after installation. On a Linux archive installation, use the `tensorfold` shell function from Quick start.
|
||||
`REPO@revision` pins a pull; serve the repository name without the revision after pulling it.
|
||||
Conversions are explicitly marked: their upstream weights need the linked conversion before native serving.
|
||||
|
||||
| Model / format | Download | Machine and memory scope | Native recipe / limits |
|
||||
| --- | --- | --- | --- |
|
||||
| dots.mocr, BF16 OCR | Use the local `dots-studio/dots.mocr` checkpoint. | Native HIP; AMD R9700 (`gfx1201`) checked, one GPU. | [Native OCR recipe](docs/recipes/dots-mocr-hip.md); full model-card demo matches HF tokens. Native CUDA serves text prompts only ([CUDA recipe](docs/recipes/dots-mocr-cuda.md)). No video, MTP head, or Metal qualification. |
|
||||
| Qwen3.5-2B, MLX 4-bit | `tensorfold pull mlx-community/Qwen3.5-2B-MLX-4bit@93760be4f1f69842a46bc13dbdc0f19e291392a3` | One Mac (M5 Max checked), or one GB10; no RAM minimum published. | [2B](docs/recipes/qwen3.5-2b-native.md); [CUDA release checks](CHANGELOG.md#110). Text only. |
|
||||
| Qwen3.8-27B, MLX 4-bit | `tensorfold pull TensorFold/Qwen3.8-27B-MLX-4bit`<br>`tensorfold pull z-lab/Qwen3.8-27B-DFlash2` | One Mac (M5 Max/M3 Ultra), or one GB10; a 32 GB Mac needs `iogpu.wired_limit_mb` raised (the startup refusal names the value). | [27B](docs/recipes/qwen3.8-27b.md). Serve drafts with the pulled DFlash2 by itself; `--drafter none` serves without it. |
|
||||
| Nemotron 3.5 Lightning 30B-A3B, MLX 4-bit | `tensorfold pull TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit` | One Mac (M1-M5), or one GB10; also checked on RTX 3090 / RTX PRO 6000. | [Lightning](docs/recipes/nemotron-3.5.md). Includes MTP. |
|
||||
| Lightning, mixed oQ4 / oQ6 / oQ8 | `tensorfold pull TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-oQ4`<br>`tensorfold pull TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-oQ6`<br>`tensorfold pull TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-oQ8` | One M3 Ultra checked. | [Width and MTP instructions](docs/recipes/nemotron-3.5.md#run). Metal only; copy the 4-bit checkpoint's MTP head to draft. |
|
||||
| Lightning, NVIDIA NVFP4 | `tensorfold pull nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-NVFP4` | One GB10 checked. Non-cluster fallback code exists for sm_80 to sm_89; no NVFP4/FP8 serving run is recorded on sm_80. | [Lightning](docs/recipes/nemotron-3.5.md); [CUDA changes](CHANGELOG.md#110). |
|
||||
| Nemotron 3.5 Super VL 120B-A12B, NVFP4 | `tensorfold pull nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4@82d93699acd3be9e4617c53360fe5b3f5dbeb1b3` | One or two GB10s; weights 70.8 GiB, 73.2 GiB with vision on one. | [One/two-GB10 commands](docs/recipes/nemotron-3.5-super-vl.md). Add `--vision` for images. |
|
||||
| Nemotron 3.5 Bolt 74B-A9B | [NVIDIA's checkpoint](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Bolt-74B-A9B-24GB) | Native CUDA; 24 GB checkpoint, checked on RTX PRO 6000. | [Bolt/Omni video](docs/recipes/nemotron-omni-video.md); [release qualification](CHANGELOG.md#110). |
|
||||
| Qwen3.8 Flash Next, MLX 6-bit | `tensorfold pull TensorFold/Qwen3.8-Flash-Next-MLX-6bit-MTP` | One M5 Ultra checked; RAM minimum not published. | [Metal](docs/recipes/qwen3.8-flash-next.md), [runbook](RUNBOOK.md#flash-next-and-paired-metal-serving). |
|
||||
| Qwen3.8 Flash Next, MLX 4-bit | `tensorfold pull TensorFold/Qwen3.8-Flash-Next-MLX-4bit-MTP` | One GB10; 73.3 GiB uploaded, plus mapped tables and caches. Metal has a native 4-bit path too (M3 Ultra checked). | [Native CUDA](docs/recipes/flash-next-cuda.md). NVFP4/two-local-rank and vision paths are experimental. Metal's shared-session limits are in [known issues](docs/known-issues.md#models). |
|
||||
| GLM-5.3-Flash, MLX 4-bit | `tensorfold pull TensorFold/GLM-5.3-Flash-MLX-4bit-MTP` | Two M5 Ultras; single-Mac native serving is not qualified. | [Paired Metal runbook](RUNBOOK.md#flash-next-and-paired-metal-serving). Do not use the Python recipe's single-Mac command. |
|
||||
| GLM-5.3-Flash, EXL3/TR3 | `tensorfold pull Mia-AiLab/GLM-5.3-Flash-EXL3-TR3-4bpw` | Two CUDA ranks; the release checks the two-GB10 setup. | [Release scope](CHANGELOG.md#110), [checkpoint](docs/recipes/glm-5.3-flash.md#exl3). Experimental checkpoint; use [native rank options](docs/recipes/glm-5.3-flash-cuda.md#run), not the Python installation. |
|
||||
| GLM-5.3-Flash, NVFP4 | `tensorfold pull nvidia/GLM-5.3-Flash-NVFP4@423acf37583782c51c142d145aef733d72943d93` | Two GB10s at TP=2: @Bizuayeu loaded the whole checkpoint on 1.1.0 in 302.1 s and served it. | [Native CUDA](docs/recipes/glm-5.3-flash-cuda.md); [contributed run](https://github.com/ashhart/TensorFold/issues/1040): one token hash per prompt across three runs and a passphrase found in 199,307 tokens; scored prompts and more than two ranks were not covered. |
|
||||
| GLM-5.3-Flash, FP4-Local | `tensorfold pull nvidia/GLM-5.3-Flash-FP4-Local@76348ddb2be2e35e39ecfc00e75dc07703f4f3d5` | Two GB10s at TP=2, or three at TP=3 over a ring of direct links: @Bizuayeu loaded it as stored and served it at both sizes. 165.3 GiB of weights, 13% less than NVFP4's. | [Native CUDA](docs/recipes/glm-5.3-flash-cuda.md), in 1.1.5 (#1050). NVIDIA's mixed-precision checkpoint: NVFP4 routed experts, FP8 for most of the rest. As close to BF16 as NVFP4 at its smaller size ([receipt](docs/receipts/glm-fp4local-80517fc3/README.md)). |
|
||||
| GLM-5.3-Flash, XSFP4 | `tensorfold pull Bizuayeu/GLM-5.3-Flash-XSFP4@88736f916f8939607fde8a4b881dcae749f7551d` | Two GB10s at TP=2, or three at TP=3 over a ring of direct links: @Bizuayeu served it at both sizes. 165.7 GiB of weights. | [Native CUDA](docs/recipes/glm-5.3-flash-cuda.md), in 1.1.5 through FP4-Local's path. FP4-Local with its routed experts refitted from the BF16 weights and a smoothing folded in, on the same kernels. Closer to BF16 than FP4-Local and NVFP4 by all three measures in [its card](https://huggingface.co/Bizuayeu/GLM-5.3-Flash-XSFP4#measured). |
|
||||
| GLM-5.3-Flash, Jammed XSFP4 | `tensorfold pull Bizuayeu/GLM-5.3-Flash-Jammed-XSFP4@0a22bb46ecef3d0f5f96e41dc6011be12974fbf1` | Two GB10s at TP=2, or three at TP=3 over a ring of direct links: @Bizuayeu served it at both sizes. 160.2 GiB of weights; at TP=2 each GB10 holds [6.6 GiB less](https://huggingface.co/Bizuayeu/GLM-5.3-Flash-Jammed-XSFP4#memory) than at block 16. | [Native CUDA](docs/recipes/glm-5.3-flash-cuda.md), in 1.2.3 (#2041). Refitted from BF16 at block 32 with XSFP4's smoothing, each row's scales packed (`csf0_v1`, read only by this path), at XSFP4's speed. Its KL and top-1 are nearer BF16 than NVIDIA's two checkpoints', short of XSFP4's ([its card](https://huggingface.co/Bizuayeu/GLM-5.3-Flash-Jammed-XSFP4#measured)). |
|
||||
| GLM-5.3-Flash, Jammed XSFP4 NZ5 | `tensorfold pull Bizuayeu/GLM-5.3-Flash-Jammed-XSFP4-NZ5@1c900ea0294e28a8e9ab56c1156c0338eed60aef` | Two GB10s at TP=2: @Bizuayeu served it. 160.2 GiB of weights. | [Native CUDA](docs/recipes/glm-5.3-flash-cuda.md), on main after 1.2.7 (#2894). Jammed XSFP4 refitted with E2M1's -0 code read as +5 (`NVFP4_NZ5`, read only by this path). Nearer BF16 than Jammed XSFP4 ([its card](https://huggingface.co/Bizuayeu/GLM-5.3-Flash-Jammed-XSFP4-NZ5#measured)). |
|
||||
| GLM-5.3, EXLR8 `home` | `tensorfold pull kindlingai/glm-5.3-exlr8-k2-k3-k4@f459f5d0272a529403dd9b3fd32f771f4250a0d4 --exlr8 home --node 0/2 --dir ~/models/glm-5.3-exlr8-home` | Two M5 Ultra Macs, 256 GB each; about 160 GB resident per Mac at 8k context / four streams. | [Two-Mac recipe](docs/glm-5.3-exlr8.md). Use `--node 1/2` on the other Mac; Thunderbolt 5 and MCDMA required. No CUDA backend. |
|
||||
| LFM2.5-24B-A2B, MLX 4 / 6 / 8-bit | `tensorfold pull LiquidAI/LFM2.5-24B-A2B-MLX-4bit@667408d494bde191c2cb9dd4f4549827816b9275`<br>`tensorfold pull LiquidAI/LFM2.5-24B-A2B-MLX-6bit@1deec53eb49571e21cdcbf82fd5839248f07ed88`<br>`tensorfold pull LiquidAI/LFM2.5-24B-A2B-MLX-8bit@67ab417dd02d0c9545802a726df668620eae049d` | One Mac (M4 Pro checked), or one NVIDIA GPU with the 4-bit export (GB10 checked). | [Native recipe](docs/recipes/lfm2.5-24b-a2b.md) ([CUDA](docs/recipes/lfm2.5-24b-a2b.md#cuda)), [release history](CHANGELOG.md). Weights: LFM Open License v1.0. |
|
||||
| Qwen3.6-35B-A3B, MLX with MTP | `tensorfold pull TensorFold/Qwen3.6-35B-A3B-MLX-4bit-MTP@81169a9bc511a27c1b4eedb77a2cd98ced431847` | One GB10; 20.9 GB checkpoint. | [Qwen3.6](docs/recipes/qwen3.6-moe.md). Native CUDA receipt here. Metal also registers this model type; the recipe's Metal commands describe Python 0.6.6. |
|
||||
| Qwen3.6-35B-A3B, NVIDIA NVFP4 with MTP | `tensorfold pull nvidia/Qwen3.6-35B-A3B-NVFP4@1355db6a052410cfd62085d94b58866fd0f2c3c5` | One GB10; 20.3 GiB on the device, 20.9 GiB with the drafter. | [Native CUDA](docs/recipes/qwen3.6-moe.md#nvidias-nvfp4-checkpoint-native-cuda). Serve with `--drafter` naming the same checkpoint for MTP drafts. |
|
||||
| Gemma 4 31B, MLX 4-bit | `tensorfold pull mlx-community/gemma-4-31B-it-4bit@696d436c404745a59f30e4939a658162b0a9e57f`<br>`tensorfold pull z-lab/gemma-4-31B-it-DFlash@eabd648301ce28583cc14757912e5e0f84e152e1` | One Mac (M5 Ultra checked), or one GB10 on CUDA. Pre-M5 Metal has a row path; its assistant and DFlash drafters require M5 tensor units. | [Native 31B on Metal](docs/recipes/gemma-4-native.md), [CUDA qualification](CHANGELOG.md#114). Name the drafter with `--drafter`; images with `--vision`. |
|
||||
| Gemma 4 12B, converted MLX 4-bit | `hf download google/gemma-4-12B-it --revision 707f0a3b8a3c7ad586ed01e27eafbad8a27dd0f7 --local-dir ~/models/gemma-4-12b-hf`<br>`hf download google/gemma-4-12B-it-assistant --revision 46d4c6f13f0ac0ad827b915669b8df9b81c64c51 --local-dir ~/models/gemma-4-12b-assistant` | One Mac (M5 Ultra checked); converted text weights 6.3 GB, image weights 100 MB, plus assistant/caches. MLX 4-bit also served on one GB10. Pre-M5 Metal has a row path; the MTP assistant requires M5 tensor units. | [Convert and serve](docs/recipes/gemma-4-12b-native.md). Upstream download needs `hf`; conversion needs Python, mlx and mlx-lm. Serving is native; [CUDA qualification](CHANGELOG.md#114) includes the MTP assistant. |
|
||||
| Step-5-Preview, converted affine | `hf download stepfun-ai/Step-5-Preview --local-dir ~/models/step5-preview-fp8` | One 256 GB Mac; text 166.9 GiB, MTP adds 2.5 GiB and vision 3.7 GiB. | [Convert and serve](docs/recipes/step-5-preview.md). The documented 256 GB setup serves converted affine weights; converting the upstream FP8 download needs Python and mlx. |
|
||||
| MiniMax-M3.1-Flash, community affine 3/4-bit | `hf download BobClawblaw/MiniMax-M3.1-Flash-MLX-mix34 --revision 9524999057e0d277d26438606e033e2191fb465c --local-dir ~/models/MiniMax-M3.1-Flash-MLX-mix34`<br>`hf download BobClawblaw/MiniMax-M3.1-Flash-MLX-mix256k --revision 916e7ca1044f1c3e7566163096243c940327224d --local-dir ~/models/MiniMax-M3.1-Flash-MLX-mix256k` | One 256 GB M5 Ultra; 203.7 GiB (32,768-token window) or 189.2 GiB (147,456), plus caches. | [MiniMax-M3.1-Flash](docs/recipes/minimax-m3.1-flash.md). Set `MINIMAX_LOAD_LIMIT_GB`; images with `--vision`. Community checkpoints: lossy conversions of MiniMax's NVFP4 release (KL 0.244 / 0.295). MiniMax Community License. |
|
||||
| Recursive Flint 40B-A2.5B, MLX INT4 | `hf download RecursiveSI/flint-int4 --revision 3b93f9053b530488405ae9fca51d4900d6ce21f0 --local-dir ~/models/flint-int4` | One M5 Mac; M5 Ultra checked; 21.4 GiB resident plus caches. M1-M4 untested. | [Flint](docs/recipes/flint.md). Text and tools; always reasons. Optional `incoai/Flint-DFlash2` through `--drafter` on M5, up to four streams. |
|
||||
| Kolibri-1, block FP8 (research) | `tensorfold pull Aleph-Alpha/Kolibri-1@e52eb4627d11516b0c01de49210ab5a4e4061444` | One NVIDIA GPU; GB10 measured; 74 GB checkpoint. | [Kolibri](docs/recipes/kolibri-1.md). Text only; copy drafts, no EAGLE-3/neural drafter. |
|
||||
| Liquid AI d1-3B, decisions | Not documented yet. | Native CUDA; RAM minimum not published. | [API section below](#serve-flags). `/v1/systemone` and `/v1/decisions`. |
|
||||
| Fish Audio Drama 3, speech | Not documented yet. | Native Metal or CUDA; GB10 measured. | [Release audio instructions](CHANGELOG.md#110), [reference voices and dialogue speakers](docs/drama-http-voices.md). `/v1/audio/speech` with [sampling controls](docs/speech-sampling.md); checkpoint and `codec.pth` required. |
|
||||
| Drama 3 pruned NVFP4, speech | `hf download plotarmordev/drama-3-NVFP4-Pruned --revision 494db08481db952f834b2241bce63fb3dfa72554 --local-dir drama-3-NVFP4-Pruned` | Native Metal; roughly 21 GiB checkpoint plus runtime state. Not a minimum-RAM or cross-backend quality claim. | Packed experts, BF16 dense/tower weights and FP32 accumulation; no conversion. Use `serve drama-3-NVFP4-Pruned --cfg-gamma 1.5 --cfg-batched` with an attested catalog voice. |
|
||||
|
||||
### GLM-5.3: one machine or two?
|
||||
|
||||
The native release does not qualify GLM-5.3 on one machine. GLM-5.3 EXLR8 `home` needs two 256 GB M5 Ultra Macs;
|
||||
[its recipe](docs/glm-5.3-exlr8.md) gives both pull and serve commands. GLM-5.3-Flash is a different model:
|
||||
its native Metal setup needs two M5 Ultras. Native CUDA has recorded TP=2 and TP=3 setups, including
|
||||
FP4-Local and XSFP4 on two and three GB10s. The single-256-GB-Mac
|
||||
GLM-5.3-Flash command in the older recipe is for Python 0.6.6, not this release.
|
||||
For the NVFP4 path, see [GLM-5.3-Flash on CUDA](docs/recipes/glm-5.3-flash-cuda.md) and what
|
||||
[the contributed run](https://github.com/ashhart/TensorFold/issues/1040) on two GB10s covered.
|
||||
|
||||
DeepSeek checkpoints are **not served yet** by any release binary: whole-model gate [#827](https://github.com/ashhart/TensorFold/pull/827) is still open.
|
||||
MiMo's native backend is not in a release yet. Bonsai's ternary pack and Gemma 4 26B-A4B remain Python-only;
|
||||
they are not native download recommendations. [Known issues](docs/known-issues.md) lists current limits,
|
||||
including Flash Next shared-session cache/performance behavior and the 27B's drafter limits.
|
||||
|
||||
## Exact decoding
|
||||
|
||||
Every accepted draft must equal the token the same native engine would produce with `"draft": false`.
|
||||
A resumed request must equal fresh execution, and each concurrent stream must equal its solo run.
|
||||
The comparison fixes the checkpoint, backend, settings and runtime.
|
||||
Different quantizations and different backends can produce different outputs.
|
||||
Flash Next on Metal uses shared target rounds with an explicit `--parallel N` above one, when that many sessions fit.
|
||||
A lone greedy request there uses GPU-side rounds and hands over when a second request arrives.
|
||||
`--parallel auto` (the default) and `--parallel 1`, learning and two-Mac serving use the single-reply driver.
|
||||
`FZ_BATCH_MTP_SERIAL=1` restores serial MTP drafting on the shared host.
|
||||
The [earlier MTP chain receipt](docs/receipts/flashnext-mtp-chain-2026-10-10/README.md) records its own pinned commits.
|
||||
Nemotron, GLM, the 2B model and Qwen3.8-27B use shared lane rounds.
|
||||
On Metal, each of up to 128 streams in the 27B's shared rounds drafts its own DFlash2 tree.
|
||||
|
||||
## Models on disk
|
||||
|
||||
```sh
|
||||
tensorfold pull TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit
|
||||
tensorfold models
|
||||
tensorfold models --json
|
||||
tensorfold info TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit
|
||||
tensorfold rm TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit
|
||||
```
|
||||
|
||||
`pull` downloads a checkpoint into the Hugging Face cache and checks what it downloads against the Hub: large files by sha256, small files by their git blob sha1.
|
||||
Large files come down in pieces over up to 16 connections, and an interrupted pull resumes with the pieces it lacks.
|
||||
It refuses a checkpoint whose `model_type` has no native family, and fetches the 27B's DFlash2 drafter for `--drafter`. `models` lists the cached checkpoints with a model type it knows, and `info` shows one checkpoint's family, format, context and memory floor.
|
||||
`models --json` prints the same list as one document for programs: `schema` 1, and each checkpoint's `repo`, `family` and `model_type`; `family` is a display title and `model_type` is the key to match on.
|
||||
`tensorfold serve REPO` serves a cached checkpoint by its repository name.
|
||||
`rm REPO` removes a cached checkpoint with all its snapshots, blobs and refs, and then the repo's folder.
|
||||
`rm REPO@REVISION` removes one snapshot, named by a ref such as `main` or by its commit, and the refs that name it. Blobs another snapshot still links to stay.
|
||||
Before deleting, it lists each snapshot and the bytes freed, counting a blob two snapshots share once, and asks.
|
||||
`--yes` skips the question and is needed when stdin is not a terminal. `--dry-run` only lists.
|
||||
A pull or removal already using this cache causes a busy refusal. After confirmation, removal checks a fresh plan.
|
||||
If the cache changed, nothing is removed: review the new plan and retry. A snapshot held by a running server is refused by name.
|
||||
External Hugging Face clients, older TensorFold binaries and programs writing cache paths directly do not share this lock.
|
||||
Stop them before removing a checkpoint; concurrent external cache writes are not supported. The filesystem must support advisory locks.
|
||||
On Windows the persistent cache lock is `.tensorfold-lock` in the cache root.
|
||||
It takes a cached repo id, never a path, deletes only inside that repo's cache folder, and removes a link without following it.
|
||||
TensorFold's own files inside a snapshot, such as the `--slide` originals in `.tensorfold-original`, go with the snapshot.
|
||||
Flash Next packs and the learned, spilled and Recall states under `~/.cache/tensorfold` are shared rather than kept per repo, so they stay.
|
||||
Stop a server that holds the checkpoint before removing it; `rm` refuses its leased snapshot by name.
|
||||
|
||||
## Context compaction
|
||||
|
||||
Compaction is off by default, and with it off every reply is unchanged.
|
||||
With `--compact-at`, a conversation that would overflow is compacted instead of refused.
|
||||
The server keeps the system prompt and the most recent turns word for word, and never separates a tool call from its result.
|
||||
The older turns become a memory note: goal, constraints, progress, decisions, next steps, exact names and numbers, and the files the tool calls read or changed.
|
||||
Each later compaction updates the previous note instead of starting over. A client that sends back the compacted conversation keeps its note.
|
||||
The reply carries the note and the compaction counts under `tensorfold.compaction`, and every reply reports `context_window` and `context_used`.
|
||||
The same request gives the same compaction and the same reply. With `--compact-memory`, the stored note carries over between requests.
|
||||
|
||||
## Cortheon mode
|
||||
|
||||
Off by default. `--cortheon` gives every chat request [Cortheon](https://github.com/ashhart/Cortheon)'s reasoning program and web research run by the server, so any OpenAI-compatible client gets it with no setup.
|
||||
The model works through Cortheon's stages for its task type and can call `cortheon_search` and `cortheon_fetch`, which the server runs without the client seeing them.
|
||||
A question about current facts, or a request to build with an outside library, is researched before the model starts.
|
||||
A coding task that changed files is asked to run its tests before it finishes.
|
||||
Web text is filtered for instructions aimed at the model, and reads reach public addresses only.
|
||||
With the flag, search queries written from the conversation go to DuckDuckGo, or to Brave with `BRAVE_SEARCH_API_KEY`, and pages are fetched from this machine; without it, the server makes no searches and reads no pages.
|
||||
See [Cortheon mode](docs/cortheon.md).
|
||||
|
||||
## Model discovery
|
||||
|
||||
`GET /v1/models` (also `/models`) advertises each served name and alias. When the engine reports a finite
|
||||
context window, each entry includes equal `context_length` and `max_model_len` integer extensions. These
|
||||
are the loaded engine's effective prompt-plus-reply token limit, including any startup memory fitting;
|
||||
they are not the default reply limit. An unspecified engine window omits both fields. Clients should
|
||||
still handle per-request memory refusals: an advertised context is not a guarantee that every workload fits.
|
||||
|
||||
A model that thinks also carries an OpenRouter-style `reasoning`: `default_enabled`, `default_effort` (only
|
||||
with `--reasoning-effort`), and `supported_efforts`, the levels its template names, highest first, then `none`
|
||||
when the template has a thinking switch. A template that names no level leaves `supported_efforts` out. These
|
||||
describe chat and Responses requests.
|
||||
|
||||
## Serve flags
|
||||
|
||||
The read-only [`/memory` diagnostics](docs/memory-diagnostics.md) report process footprint and lifetime peak,
|
||||
available backend allocation counters, and the applied retained-prefix plan without changing memory policy.
|
||||
|
||||
The binary's `capabilities --json` response lists its supported flags and platform-specific values.
|
||||
`serve MODEL --help` prints usage without loading a model.
|
||||
|
||||
| Flag | Meaning |
|
||||
| --- | --- |
|
||||
| `--host HOST`, `--port PORT` | Listen address and port, default `127.0.0.1:8080`. |
|
||||
| `--unix-socket PATH` | Listen on a new owner-only Unix socket at PATH instead of TCP, refused with `--host` or `--port`; macOS and Linux. An existing PATH, or a directory other users can write to (unless sticky, like `/tmp`), is refused, and connections from other users are closed. API keys, `--metrics-open` and the Host check apply as on TCP (a client sends a loopback `Host` or one in `--allowed-host`): the socket's permissions are a second layer, not a substitute for keys. |
|
||||
| `--profile stable` | Explicitly preserve current defaults; [profiles](docs/profiles.md) describes the initial switch registry and startup report. |
|
||||
| `--config FILE.toml` | Read serve flags from a TOML file: a key is a flag without its `--`, and `model` names the model. The command line wins over the file, and a relative path in the file starts at the file's folder. See [serve config files](docs/serve-config.md). |
|
||||
| `--name NAME` | Model ID advertised to clients. |
|
||||
| `--alias NAME` | Another accepted model ID; repeat for multiple aliases. |
|
||||
| `--api-key KEY` | Require a bearer key; repeat for multiple keys. |
|
||||
| `--api-key-file FILE` | Read keys from a restricted-permission file; a key can be limited to [some routes](docs/api.md#key-scopes). |
|
||||
| `--metrics-open` | Allow `/metrics`, `/v1/metrics` and `/v1/load` without a key when API authentication is enabled. |
|
||||
| `--dashboard` | Enable the local `/dashboard` page and `/stats` endpoint. |
|
||||
| `--max-inflight N`, `--max-inflight-per-key N` | Refuse model requests past N in progress at once, overall or per key, with 429; 0, the default, is off. See [admission](docs/api.md#admission). |
|
||||
| `--max-connections N`, `--max-connections-per-address N`, `--trusted-proxy ADDRESS` | Open connections at most (default 128); from three quarters full, one address's share (default a quarter, 0 off); addresses never counted for that share, as loopback is not, such as a reverse proxy or Docker's bridge gateway. See [admission](docs/api.md#admission). |
|
||||
| `--requests-per-second N`, `--request-burst N` | Refuse a key's model requests past N a second, after a burst; 0, the default, is off. |
|
||||
| `--context N` | Bound prompt plus reply tokens; the model's window and memory checks still apply. Qwen3.8-27B defaults to 32,768 and takes up to 262,144. |
|
||||
| `--rope-yarn F` | YaRN context extension with this factor over the checkpoint's trained window, for Qwen3.5 and 3.6 on a CUDA build; other builds refuse the flag. |
|
||||
| `--loops N` | Passes over a looped model's recurrent block, from 1; without it the checkpoint's own count runs. Other builds refuse the flag. |
|
||||
| `--speed-up FILE` | Rank and link settings for two-Mac Flash Next or GLM serving. |
|
||||
| `--max-tokens N` | Default reply limit, 4096; requests can override it. |
|
||||
| `--temperature T` | Sampling temperature; zero requests greedy decoding. |
|
||||
| `--prompt-seed` | Use native prompt-derived keys instead of the fresh OS fallback; request and configured default seeds still win. |
|
||||
| `--top-p P`, `--top-k K`, `--min-p P` | Sampling defaults. |
|
||||
| `--instruct-sampling SET` | Sampling defaults for sampled chat requests with thinking off: `card` (the Qwen 3.5, 3.6 and 3.8 cards' temperature 0.7, top_p 0.8, top_k 20, presence_penalty 1.5), `name=value` pairs over it, or `none`; the serve flags still win. Greedy requests, raw completions and the server's own requests never take them. |
|
||||
| `--thinking`, `--no-thinking` | Choose whether the chat template opens a reasoning block. |
|
||||
| `--reasoning-effort LEVEL` | Default template effort: `minimal`, `low`, `medium`, `high`, `xhigh` or `max`. |
|
||||
| `--thinking-budget N` | Limit reasoning tokens where the engine supports closing the reasoning block. |
|
||||
| `--thinking-reserve N` | With thinking on, let reasoning use up to N tokens beyond a request's `max_tokens`, which then limits the answer (lane engines). |
|
||||
| `--loop-guard` | Close reasoning that repeats itself verbatim (a short cycle, or a long passage) where the engine supports it. |
|
||||
| `--loop-guard-stop` | As `--loop-guard`, but end the reply where the guard fires: the reasoning so far, no answer or tool calls, `finish_reason` `content_filter` and a `reasoning_loop` error ([API](docs/api.md)). |
|
||||
| `--no-drafts` | Produce the plain reference through the same engine. |
|
||||
| `--drafter DRAFTER` | An external drafter, as a directory or a repo id in the Hugging Face cache, for models that take one (Gemma 4 31B's recipe names its drafter); `none` serves without one. Without the flag, Qwen3.8-27B pairs DFlash2 when the cache holds it (never downloaded, not on HIP): one line names it, and serve runs without it if it does not open. |
|
||||
| `--drafter-bits 0\|4` | Drafter weight precision where the model offers a choice: 4 bits (the default), or 0 to keep bf16. Qwen3.8-27B on CUDA takes 4 only. |
|
||||
| `--record DIR` | Write each stream's committed tokens, positions and tapped rows under DIR, for drafter training. CUDA Nemotron only; a single stream runs through the lane rounds, and recording stops below 25 GiB free disk. |
|
||||
| `--keep-warm SECONDS` | Keep the Metal GPU active while idle for this long after a request, default 900; zero disables it. |
|
||||
| `--cfg-gamma GAMMA` | Metal Drama speech: semantic guidance strength, finite 1–5; 0/default disables it. Only reference-conditioned requests are guided. Enabled replies report `X-Cfg-Gamma`; codec heads stay conditional. |
|
||||
| `--cfg-allow-request-gamma` | Metal Drama speech: allow a finite 1–5 `X-Cfg-Gamma` request header; invalid values return 400 before engine submission. Without this opt-in, the server's gamma is fixed. |
|
||||
| `--cfg-force-guided` | With an enabled Metal Drama guidance policy, exercise the unconditional state even at gamma 1. The semantic mix at 1 remains exact conditional-logit identity. |
|
||||
| `--cfg-batched` | With enabled Metal Drama guidance, submit both independent backbone states in one command buffer rather than separate submissions. Weights are shared; extra state is included in admission. Not vectorized batching. |
|
||||
| `--silence-floor-dbfs DBFS` | Drama speech only: explicit frame-power floor for the silence guard, with no default floor. Calibrate below quiet intended speech using public or built-in speech. |
|
||||
| `--silence-seconds SECONDS` | Drama speech only: stop after this continuous duration below the explicit floor, retaining audio and reporting `silence`. Unset by default: off; calibrate above intentional pauses. |
|
||||
| `--silence-onset-s SECONDS` | Drama speech only: with the silence guard on, stop once this many seconds run below its floor while the synthesis has voiced less than `--silence-onset-voiced-s`, retaining audio and reporting `silence`. Off unless given; must be below `--silence-seconds`. |
|
||||
| `--silence-onset-voiced-s SECONDS` | Drama speech only: the voiced seconds below which `--silence-onset-s` applies; required with it, with no default. Calibrate on public or built-in speech. |
|
||||
| `--silence-mid-s SECONDS` | Drama speech only: with the silence guard on, finish as `silence` when end of speech falls in a run this long below the floor, after the explicit voiced minimum. Whole replies carry the decimal `X-Silence-Mid-Trips` count, including zero. Must be below `--silence-seconds` and paired with `--silence-mid-min-voiced-s`. Unset by default: off. |
|
||||
| `--silence-mid-min-voiced-s SECONDS` | Required with `--silence-mid-s`: positive finite cumulative voiced duration before the mid rule applies, including equality. No default; calibrate with the other silence thresholds. |
|
||||
| `--silence-redraws N` | Drama speech only: draw a whole reply the silence guard ended again, up to N times, as seed salt + k or explicit request seed + k; N of 1 or more needs the guard. Unset by default: off, as is 0; streams are never redrawn. See [speech redraws](docs/speech-redraws.md). |
|
||||
| `--silence-redraw-budget-s SECONDS` | Start a redraw only while elapsed time plus the last take's duration fits; a request's `X-Deadline-S` can lower it. No default budget. |
|
||||
| `--silence-redraw-controls LIST` | Redraws speak the input filtered to the listed controls, as `--allowed-controls` filters; an empty list removes every control. |
|
||||
| `--short-reply-ratio R` | Also redraw a whole reply that finished `stop` with less audio than R (above 0, below 1) of its text's expected length; needs `--silence-redraws` and `--short-reply-chars-per-s`. No default. |
|
||||
| `--short-reply-chars-per-s CPS` | Input characters per second of audio in complete replies of the served voice, setting the expected length; needs `--short-reply-ratio`. No default; calibrate on your own voice. |
|
||||
| `--register-redraw-st ST` | Drama speech only: draw a whole reply once more when a phrase after the first opens ST semitones above the other phrases' median opening; needs the two flags below. Unset by default: off, with no default for any of the three. See [speech redraws](docs/speech-redraws.md#register). |
|
||||
| `--register-redraw-high PERCENT` | The share of that phrase's voiced frames that must lie above `--register-high-hz`. |
|
||||
| `--register-high-hz HZ` | The pitch line, 75 to 600 Hz, that marks a high register; calibrate it on your own voice. |
|
||||
| `--parallel N\|auto` | Cap active requests at N and queue the rest. Default `auto` asks for up to 8 as memory and the engine allow; an explicit count that cannot fit is refused. Read the accepted count at startup. |
|
||||
| `--prompt-cache-gib GIB` | Retained-prefix budget; by default half the room left after streams on Metal and unified-memory CUDA (16 GiB floor where room permits), 8 GiB host snapshots on discrete CUDA, 16 GiB for Flash Next's batch host. An explicit value overrides it; 0 disables it. |
|
||||
| `--prompt-cache-over-cap` | Permit an explicit prefix budget past what 70% of RAM leaves once the server loads. |
|
||||
| `--learn` | Keep shared prompt prefixes on disk for new conversations to resume; the models are below the table. |
|
||||
| `--learn-dir DIR` | Where `--learn` keeps them, `~/.cache/tensorfold/learned` by default; implies `--learn`. |
|
||||
| `--learn-gib GIB` | Disk for learned prefixes on each Mac, 32 by default; the least recently used go first. Implies `--learn`. |
|
||||
| `--learn-min-free-gib GIB` | Free disk `--learn` leaves on each Mac, 4 by default; below it learning pauses and serving goes on. |
|
||||
| `--learn-conversations` | Keep every prompt state on disk too, each conversation's and the shared prefixes, in one store in place of `--learn`'s, so a next turn after a restart, a crash or an eviction reads it back. Implies `--learn`; see [Conversations on disk](docs/api.md#conversations-on-disk). |
|
||||
| `--learn-daily-gib GIB` | What `--learn-conversations` may write to disk a day, every model together, 32 by default; past it states stay in RAM only. |
|
||||
| `--recall` | Draft from a record of the token ids earlier requests read and wrote, so repeated text is verified in a few rounds; replies are unchanged. Off by default; see [Recall](docs/recall.md) for what stays on disk. |
|
||||
| `--recall-dir DIR` | The record's directory, one a tokenizer under `~/.cache/tensorfold/recall` by default; implies `--recall`. |
|
||||
| `--recall-gib GIB` | Disk for the record, 1/16 GiB by default; the oldest ids go first. Implies `--recall`. |
|
||||
| `--recall-read-only` | Draft from the record without adding to it, as gates and benchmarks run; implies `--recall`. |
|
||||
| `--snapshot-dir none` | Keep prefix state in memory; `none` is the supported value. |
|
||||
| `--max-snapshots 0` | Disable disk snapshots at startup; `0` is the supported value. |
|
||||
| `--compact-at auto\|FRACTION` | Turn on context compaction (below). `auto` compacts when the prompt and reply would pass the window minus a reserve. |
|
||||
| `--compact-keep TOKENS` | Recent tokens kept word for word when compacting; the default is 20,000 or a quarter of the window, whichever is smaller. |
|
||||
| `--compact-memory DIR` | Also keep each conversation's memory note as a Markdown file in DIR. |
|
||||
| `--cortheon` | Cortheon's reasoning program and server-run web research for chat requests; see [Cortheon mode](docs/cortheon.md). |
|
||||
| `--no-update-check` | Accepted compatibility switch; update the installed binary through its package manager. |
|
||||
| `--backend auto` | Use the backend compiled for the platform; `mlx` selects native Metal on macOS and `cuda` selects CUDA on Linux. |
|
||||
|
||||
`--prompt-cache-gib` applies to Nemotron, Flash Next, GLM, Qwen3.8-27B and LFM2.5-24B-A2B, and
|
||||
`--prompt-cache-over-cap` to the same models but GLM.
|
||||
`--learn` keeps shared prompt prefixes, such as a system prompt and its tools, on disk, so new conversations resume
|
||||
them after a restart or an upgrade that computes the same bits. It covers GLM-5.3-Flash, Nemotron, and Flash Next on
|
||||
one Mac; Qwen3.8-27B, Qwen3.5-2B, LFM2.5-24B-A2B, GLM-5.3 (EXLR8) and a CUDA server refuse it at startup.
|
||||
Qwen3.8-27B on Metal also resumes a follow-up turn from the state its last reply left in the server's first slot,
|
||||
when the prompt cache holds nothing as far: the turn reads only its new tokens, even on a Mac whose cache cannot keep
|
||||
a long conversation. Where the cache cannot keep a whole context, the server also keeps that slot's DeltaNet states
|
||||
at each prompt's history end, so a turn whose template drops the last reply's reasoning resumes there. Replies are
|
||||
the same tokens as a fresh prompt pass; `TF_QWEN27_SLOT_RESUME=0` turns both off.
|
||||
|
||||
Sampling defaults come from the checkpoint's `generation_config.json`, then serve flags and request fields override them.
|
||||
`--context 0` is family-specific; use a positive limit for GLM and inspect the capacity reported at startup.
|
||||
The supported environment variables are listed in `capabilities --json`, including API keys, request logging and Hugging Face cache paths.
|
||||
`TF_Q27_PROFILE=N` makes a native Metal Qwen3.8-27B server log a per-class GPU-time breakdown every N decode rounds (`1` means 64) and add `gpu_seconds` to its replies; it is diagnostic only, and a profiled round runs slower.
|
||||
|
||||
## Community benchmarks
|
||||
|
||||
`tensorfold benchmark MODEL` runs public code and chat fixtures on a cached model and saves a portable receipt;
|
||||
`--publish` optionally submits it for review at tensorfold.dev. See [benchmark commands and measurement definitions](docs/community-benchmarks.md).
|
||||
|
||||
## Build and contribute
|
||||
|
||||
Use the Zig version pinned in `.zig-version`, currently 0.17.0.
|
||||
The `.metal` sources need Xcode's Metal compiler. Install full Xcode and its Metal Toolchain component
|
||||
(`xcodebuild -downloadComponent MetalToolchain`); the Command Line Tools alone fail every kernel compile with
|
||||
`unable to find utility "metal"`.
|
||||
|
||||
```sh
|
||||
zig build native -Dcpu=apple_m1
|
||||
zig build test test-golden -Dcpu=apple_m1
|
||||
```
|
||||
|
||||
Structured output and required tool calls need the release archive's `lib/` or `zig build grammar -Dxgrammar=DIR`; prepare DIR with `git clone --branch v0.2.8 --recurse-submodules https://github.com/mlc-ai/xgrammar` (use the native build's same `--prefix` for grammar).
|
||||
|
||||
To build one stripped server for one GPU (`zig build -Dgpu=spark -Dnvcc=...`, about 69% smaller than the four-target server), see [Build a server for one GPU](RUNBOOK.md#build-a-server-for-one-gpu).
|
||||
|
||||
On macOS, `test` also runs available Metal device checks. See [CONTRIBUTING.md](CONTRIBUTING.md) for the host-test subset.
|
||||
|
||||
The server is `zig-out/native/bin/tensorfold-native`.
|
||||
Release archives include the native executable, runtime assets and license notices; [packaging](packaging/README.md) describes the qualified CUDA inputs.
|
||||
For cache-aware performance receipts, see [observed cache benchmark evidence](docs/cache-benchmarks.md).
|
||||
The clients retain server usage and output fingerprints, and verify cold/reused states rather than inferring them.
|
||||
|
||||
Read [CONTRIBUTING.md](CONTRIBUTING.md) for exactness, precision and performance gates.
|
||||
Coding agents should also load [docs/recipes/SKILL.md](docs/recipes/SKILL.md); agents that support skills can install it as `tensorfold-contributor`.
|
||||
TensorFold is Apache-2.0; see [LICENSE](LICENSE), [NOTICE](NOTICE) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
||||
- [Run guide](docs/run-guide.md): platform setup, requests, parallel requests, exact decoding, context compaction,
|
||||
Cortheon mode, every serve flag, the Mac app and TensorFold Starlight.
|
||||
- [Supported models](docs/supported-models.md): which checkpoints run on which machines, models on disk and model discovery.
|
||||
- [Living Weights (experimental)](docs/living-weights.md): teach a running model new facts in its own weights.
|
||||
- [Installation runbook](RUNBOOK.md): macOS and CUDA installation, paired Metal serving and troubleshooting.
|
||||
- [Windows](docs/WINDOWS.md), [TensorFold Web](docs/web.md) and [the Mac app](app/README.md).
|
||||
- [API](docs/api.md), [Cortheon mode](docs/cortheon.md) and [known issues](docs/known-issues.md).
|
||||
- [Evaluating TensorFold](docs/evaluating.md) and [community benchmarks](docs/community-benchmarks.md).
|
||||
- [Usable memory profiles](docs/memory-profiling.md): how to record applied budgets, context, cache state and process peaks.
|
||||
- [Contributing](CONTRIBUTING.md): ATC and agents, builds, tests and the exactness and performance gates.
|
||||
- [Changes](CHANGELOG.md), [1.0.0 release notes](docs/release-notes-1.0.0.md) and [the Zig engine preview](docs/zig-preview.md).
|
||||
- TensorFold is Apache-2.0: [LICENSE](LICENSE), [NOTICE](NOTICE), [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) and [SECURITY.md](SECURITY.md).
|
||||
|
||||
## Contributors
|
||||
|
||||
@@ -618,5 +267,3 @@ Thank you to everyone who has sent TensorFold a pull request, a measurement or a
|
||||
[@zweck](https://github.com/zweck).
|
||||
|
||||
[docs/credits.md](docs/credits.md) names whose Python engine work each part of the native engine carries.
|
||||
|
||||
[Usable memory profiles](docs/memory-profiling.md) explains how to record applied budgets, context, cache state and process peaks.
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
# Installation runbook
|
||||
|
||||
TensorFold runs from a native executable.
|
||||
Choose a qualified model and platform from [README.md](README.md#qualified-models), then keep its complete checkpoint outside the source checkout.
|
||||
Choose a qualified model and platform from [README.md](docs/supported-models.md#qualified-models), then keep its complete checkpoint outside the source checkout.
|
||||
The model directory needs configuration, tokenizer, chat template and weight files.
|
||||
An existing complete Hugging Face cache also works.
|
||||
|
||||
@@ -127,7 +127,7 @@ curl -fsS http://127.0.0.1:8080/v1/chat/completions \
|
||||
Use `http://127.0.0.1:8080/v1` as the OpenAI client base URL.
|
||||
For streaming, add `"stream": true` to the request.
|
||||
The native server also has `/v1/responses` and Anthropic `/v1/messages` routes.
|
||||
Serve flags and request overrides are described in [README.md](README.md#serve-flags).
|
||||
Serve flags and request overrides are described in [README.md](docs/run-guide.md#serve-flags).
|
||||
|
||||
With API authentication off, `/health` includes `live.connections`, the total active plus waiting requests,
|
||||
and `live.waiting`, the queued requests. Subtract waiting from connections to get the active count.
|
||||
@@ -186,7 +186,7 @@ For source builds with `zig build native` (including `--prefix` installs): Struc
|
||||
Choose `linux-aarch64` for an arm64 host or `linux-x86_64` for an x86_64 host.
|
||||
The archives require glibc 2.28 or newer and NVIDIA driver R580 or newer (CUDA 13.0), providing `libcuda.so.1`.
|
||||
Their kernels are built with CUDA 13, so TensorFold refuses an older driver at startup; `nvidia-smi` shows the installed one.
|
||||
See [qualified models](README.md#qualified-models) for native CUDA serving by family and format.
|
||||
See [qualified models](docs/supported-models.md#qualified-models) for native CUDA serving by family and format.
|
||||
Nemotron 3.5 Lightning MLX 4-bit has been checked on GB10 (sm_121, greedy and sampled), RTX 3090 (sm_86, greedy)
|
||||
and RTX PRO 6000 Blackwell (sm_120). A receipt on one sm_86 card does not measure every card of that class.
|
||||
Flash Next MLX 4-bit has served on a GB10 ([native recipe](docs/recipes/flash-next-cuda.md)).
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
# Community benchmarks
|
||||
|
||||
`tensorfold benchmark MODEL` runs public code and chat fixtures on a cached model and saves a portable receipt;
|
||||
`--publish` optionally submits it for review at tensorfold.dev; [Publishing](#publishing) says which receipts it accepts today.
|
||||
|
||||
Run repeatable code and chat workloads on a model you have already downloaded:
|
||||
|
||||
```sh
|
||||
|
||||
+3
-3
@@ -10,7 +10,7 @@ Record four things with every result:
|
||||
- The release, from `tensorfold --version` (on Linux, `tensorfold-native --version`).
|
||||
- The checkpoint and its revision, as `REPO@revision` in `tensorfold pull`.
|
||||
- The backend: Metal on a Mac, CUDA on Linux or Windows.
|
||||
- The recipe you followed from [Pick a model](../README.md#pick-a-model), with its flags.
|
||||
- The recipe you followed from [Pick a model](supported-models.md#pick-a-model), with its flags.
|
||||
|
||||
Releases from 1.0.0 on are the native Zig engine. The Python engine stopped at 0.6.6 and lives only at the `v0.6.6`
|
||||
tag; its tests need MLX and its results do not describe a 1.x release. `pip install .` at the root stops and says where
|
||||
@@ -86,7 +86,7 @@ Linux. GPU kernel and served-model checks run on the maintainers' Macs and NVIDI
|
||||
|
||||
Drafting must never change the output. At temperature 0, send the same request twice, once with `"draft": false`,
|
||||
and compare the text and `usage`. A request repeated against the prompt cache must equal its first run, and
|
||||
concurrent requests must each equal their solo run. [Exact decoding](../README.md#exact-decoding) states the rule
|
||||
concurrent requests must each equal their solo run. [Exact decoding](run-guide.md#exact-decoding) states the rule
|
||||
and what it fixes.
|
||||
|
||||
## Requests worth replaying
|
||||
@@ -106,7 +106,7 @@ The [API reference](api.md) lists every field and refusal.
|
||||
Context length, `--parallel`, prompt caches and drafters need memory beyond that floor. Once a model is loaded,
|
||||
`GET /v1/memory` reports the memory in use: the process footprint on macOS and the backend's device counters
|
||||
([memory diagnostics](memory-diagnostics.md)).
|
||||
The machines each model was checked on are in [Pick a model](../README.md#pick-a-model); where no minimum was
|
||||
The machines each model was checked on are in [Pick a model](supported-models.md#pick-a-model); where no minimum was
|
||||
measured, none is published.
|
||||
|
||||
## Dependencies
|
||||
|
||||
@@ -8,6 +8,39 @@ It is not a prompt cache, a retrieval index or an adapter: each fact it keeps be
|
||||
model, written into the checkpoint's own safetensors files. Nothing the model already had is changed. It shipped in 1.0.3
|
||||
as Sliding Weights (experimental), and its flag and API use the name `slide`.
|
||||
|
||||
## At a glance
|
||||
|
||||
Start a Nemotron 3.5 Lightning server with `--slide` and tell it something: each fact that passes the lesson's checks
|
||||
is written into the checkpoint folder's files. It is experimental: related facts can disturb each other, recall drops
|
||||
past a few dozen facts and with thinking on, and learned facts cost some decode speed on a Mac.
|
||||
[Known issues](known-issues.md#living-weights---slide) has the details.
|
||||
|
||||
```sh
|
||||
tensorfold pull TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit
|
||||
hub="${HF_HUB_CACHE:-${HF_HOME:-$HOME/.cache/huggingface}/hub}/models--TensorFold--NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit"
|
||||
src="$hub/snapshots/$(cat "$hub/refs/main")"
|
||||
mkdir -p ~/models && cp -RL "$src" ~/models/nemotron-living # always teach a copy
|
||||
(umask 077; openssl rand -hex 24 > ~/models/slide-key) # --slide starts only with a key
|
||||
tensorfold serve ~/models/nemotron-living --slide --api-key-file ~/models/slide-key
|
||||
```
|
||||
|
||||
Leave that server running and send a lesson from another terminal:
|
||||
|
||||
```sh
|
||||
curl -N http://127.0.0.1:8080/v1/slide/learn -H "Authorization: Bearer $(cat ~/models/slide-key)" \
|
||||
-H 'Content-Type: application/json' -d '{"text": "I like blue."}'
|
||||
```
|
||||
|
||||
Send it a document instead and it finds the facts in it and learns them one by one. Open
|
||||
`http://127.0.0.1:8080/slide` to watch in 3D: the facts, the neurons each one took in the model's layers, the shard
|
||||
files that hold them, and the lesson running now.
|
||||
|
||||
Learning runs on Apple-silicon Macs and on an NVIDIA GB10 (DGX Spark), and a folder that learned on one serves on the
|
||||
other. On an APFS volume, `cp -cRL` makes a clone that shares the original's data until lessons change it. It rewrites
|
||||
the folder's files: before the first lesson the server keeps the originals in a hidden snapshot, and
|
||||
`tensorfold slide rollback ~/models/nemotron-living` puts them back, undoing every lesson. The rest of this guide covers
|
||||
the key, teaching files and web pages, omp's `/learn` command, the 3D view, undoing lessons, and what to expect.
|
||||
|
||||
## Repeating a lesson
|
||||
|
||||
The same text and supplied questions can take different steps and choose different neurons on separate runs.
|
||||
|
||||
@@ -5,7 +5,7 @@ profile also names the context, reply reserve, request capacity, cache policy an
|
||||
exact runtime. Measure those together before recommending a RAM class.
|
||||
|
||||
This guide separates the Python/MLX server, frozen at 0.6.6, from the
|
||||
[native Zig preview](../ZIG-PREVIEW.md). The MLX details below were checked against
|
||||
[native Zig preview](zig-preview.md). The MLX details below were checked against
|
||||
[v0.6.6](https://github.com/ashhart/TensorFold/tree/v0.6.6) and describe that engine. They do not qualify the
|
||||
native engine's models, kernels or memory admission.
|
||||
|
||||
@@ -114,7 +114,7 @@ The Zig preview uses its own native Metal allocations and cache policy. In its
|
||||
Flash Next server, `--prompt-cache-gib` controls retained prompt states, not a
|
||||
whole-process memory budget. Flash Next serves one reply at a time under the default `auto` and
|
||||
`--parallel 1`; an explicit `--parallel` above one shares sessions. Nemotron's prompt reuse has a different status. Consult
|
||||
[the preview's current limitations](../ZIG-PREVIEW.md#known-gaps) before building
|
||||
[the preview's current limitations](zig-preview.md#known-gaps) before building
|
||||
a matrix. Python 0.6.6 MLX measurements are not preview performance or exactness results.
|
||||
|
||||
A public receipt should contain synthetic or public prompts, generic hardware
|
||||
|
||||
@@ -41,7 +41,7 @@ For agent-assisted contributions, read the [TensorFold contributor skill](SKILL.
|
||||
The native release includes CUDA kernels for sm_80, sm_86, sm_120 and sm_121. This is a build target list, not
|
||||
per-card model qualification. Nemotron MLX 4-bit has been checked on GB10, RTX 3090 and RTX PRO 6000.
|
||||
The A100 (sm_80) has [kernel-check evidence](../../CHANGELOG.md#1012) from #846, but no served checkpoint on record;
|
||||
it is not model-qualified. See [qualified models](../../README.md#qualified-models) for the measured scope.
|
||||
it is not model-qualified. See [qualified models](../supported-models.md#qualified-models) for the measured scope.
|
||||
`tensorfold info REPO` prints a checkpoint's memory floor: its weights plus a 2 GiB runtime margin. On macOS, a
|
||||
Flash Next (`qwen4_exp`) checkpoint instead prints its startup and cold pack budgets.
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ DeepSeek requires sm_90 or newer and remains refused by the release server pendi
|
||||
Nemotron's `--precision checkpoint` is refused on an A100 because it needs Blackwell (compute capability 12.x).
|
||||
GLM also refuses an FP8 or MXFP8 projection on sm_80 to sm_89 when its shape needs split-K partial storage that
|
||||
this family does not hold. CUDA `--slide` learning is admitted only on sm_121.
|
||||
See the [qualified models](../../README.md#qualified-models), [changes](../../CHANGELOG.md) and
|
||||
See the [qualified models](../supported-models.md#qualified-models), [changes](../../CHANGELOG.md) and
|
||||
[native CUDA runbook](../../RUNBOOK.md#linux-and-cuda) for recorded serving scope.
|
||||
Native [GLM](glm-5.3-flash-cuda.md) has TP=2 and TP=3 serving receipts; native EXL3 loading and DFlash2 drafting
|
||||
also exist for the families and formats recorded there.
|
||||
|
||||
@@ -7,7 +7,7 @@ revision `707f0a3b8a3c7ad586ed01e27eafbad8a27dd0f7` (`gemma4_unified`), its lang
|
||||
[`google/gemma-4-12B-it-assistant`](https://huggingface.co/google/gemma-4-12B-it-assistant/tree/46d4c6f13f0ac0ad827b915669b8df9b81c64c51)
|
||||
(revision `46d4c6f13f0ac0ad827b915669b8df9b81c64c51`) as the drafter. It runs on the native Gemma 4 family that serves
|
||||
[the 31B](gemma-4-native.md), on M5 tensor-unit GPUs. Build with Zig **0.17.0** and Xcode's Metal toolchain, as
|
||||
described in [the native preview](../../ZIG-PREVIEW.md#build).
|
||||
described in [the native preview](../zig-preview.md#build).
|
||||
|
||||
```bash
|
||||
hf download google/gemma-4-12B-it --revision 707f0a3b8a3c7ad586ed01e27eafbad8a27dd0f7 --local-dir "$HOME/models/gemma-4-12b-hf"
|
||||
|
||||
@@ -4,7 +4,7 @@ This recipe covers text generation with
|
||||
[`mlx-community/gemma-4-31B-it-4bit`](https://huggingface.co/mlx-community/gemma-4-31B-it-4bit/tree/696d436c404745a59f30e4939a658162b0a9e57f),
|
||||
revision `696d436c404745a59f30e4939a658162b0a9e57f`, the dense 31B in MLX affine 4-bit, groups of 64.
|
||||
Build from `main` with Zig **0.17.0** and Xcode's Metal toolchain, as described in
|
||||
[the native preview](../../ZIG-PREVIEW.md#build).
|
||||
[the native preview](../zig-preview.md#build).
|
||||
|
||||
```bash
|
||||
hf download mlx-community/gemma-4-31B-it-4bit --revision 696d436c404745a59f30e4939a658162b0a9e57f \
|
||||
|
||||
@@ -8,7 +8,7 @@ page uses `TENSORFOLD_MEMORY_LIMIT_GB` (in GiB); the `TF_GLM_*` variables and th
|
||||
that engine's too, except `TF_GLM_CLEAR_THINKING`, which the native server also reads ([api](../api.md)).
|
||||
The native binary serves GLM on two M5 Ultra Macs with MLX affine 4-bit/group-64 weights, and on CUDA ranks from
|
||||
NVIDIA's NVFP4 checkpoint and the EXL3/TR3 checkpoint ([GLM-5.3-Flash on CUDA](glm-5.3-flash-cuda.md)).
|
||||
For native serving, use the [qualified model table](../../README.md#pick-a-model), the
|
||||
For native serving, use the [qualified model table](../supported-models.md#pick-a-model), the
|
||||
[paired Metal runbook](../../RUNBOOK.md#flash-next-and-paired-metal-serving) and that page.
|
||||
@chadhurley25075-png wrote the Mac family in [#9](https://github.com/ashhart/TensorFold/pull/9), with fixes from
|
||||
@kingjamez, and its prompt path in [#39](https://github.com/ashhart/TensorFold/pull/39); the native engine runs
|
||||
|
||||
@@ -49,7 +49,7 @@ such switch, and its family declares no reasoning block.
|
||||
|
||||
JPEG inputs require the project's pinned libjpeg-turbo 3.1.4.1. Set
|
||||
`TENSORFOLD_LIBTURBOJPEG` to that library when it is outside the normal
|
||||
loader path. See [native preview](../../ZIG-PREVIEW.md) for image libraries.
|
||||
loader path. See [native preview](../zig-preview.md) for image libraries.
|
||||
|
||||
For an isolated GPU test, identify the physical PCI address and acquire the
|
||||
existing device lease. Shared tests must account for current users, the
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
The model combines Mamba-2, attention and MoE blocks. The native family is `zig/src/families/nemotron/`, on Metal,
|
||||
CUDA and HIP; the native prompt reuse, routed experts, shared rounds and HIP sections below describe it, and the
|
||||
[README](../../README.md#qualified-models) lists its qualified checkpoints and hardware.
|
||||
[README](../supported-models.md#qualified-models) lists its qualified checkpoints and hardware.
|
||||
|
||||
The MLX execution, CUDA, draft vocabulary and measurements sections describe the Python engine,
|
||||
frozen at 0.6.6 and available at the [`v0.6.6` tag](https://github.com/ashhart/TensorFold/tree/v0.6.6). Its MLX family
|
||||
|
||||
@@ -4,7 +4,7 @@ This recipe covers text generation with
|
||||
[`mlx-community/Qwen3.5-2B-MLX-4bit`](https://huggingface.co/mlx-community/Qwen3.5-2B-MLX-4bit/tree/93760be4f1f69842a46bc13dbdc0f19e291392a3),
|
||||
revision `93760be4f1f69842a46bc13dbdc0f19e291392a3`.
|
||||
Build from `main` with Zig **0.17.0** and Xcode's Metal toolchain, as described in
|
||||
[the native preview](../../ZIG-PREVIEW.md#build). Keep weights outside the source checkout.
|
||||
[the native preview](../zig-preview.md#build). Keep weights outside the source checkout.
|
||||
|
||||
```bash
|
||||
hf download mlx-community/Qwen3.5-2B-MLX-4bit \
|
||||
|
||||
@@ -24,7 +24,7 @@ The server exposes OpenAI chat and completion routes, Anthropic Messages and tok
|
||||
|
||||
Metal engines support configurable idle keepalive through `--keep-warm`. A load-time probe selects a prebuilt packed-kernel library when macOS 26.3's runtime compiler rejects that kernel.
|
||||
|
||||
Release archives target macOS arm64 and Linux aarch64 for the GB10. They contain `bin/tensorfold-native`, runtime information and license notices. CUDA needs a compatible NVIDIA driver and the qualified kernel assets described in the deployment instructions; paired Metal serving needs its transport and peer configuration. See [README.md](README.md) for installation and [RUNBOOK.md](RUNBOOK.md) for deployment.
|
||||
Release archives target macOS arm64 and Linux aarch64 for the GB10. They contain `bin/tensorfold-native`, runtime information and license notices. CUDA needs a compatible NVIDIA driver and the qualified kernel assets described in the deployment instructions; paired Metal serving needs its transport and peer configuration. See [README.md](../README.md) for installation and [RUNBOOK.md](../RUNBOOK.md) for deployment.
|
||||
|
||||
The shipped commands include `--version`, `--help`, `capabilities --json`, `serve MODEL`, and `pull`, `models` and `info` for checkpoints in the Hugging Face cache. Use `serve MODEL --help` and the capabilities output for supported flags and backends.
|
||||
|
||||
@@ -42,9 +42,9 @@ On the GB10, greedy and sampled replies equal the one-token reference, seeds and
|
||||
|
||||
## Moving from Python 0.6
|
||||
|
||||
The Python 0.6.6 engine remains on the `python-0.6` branch and the `v0.6.6` tag. Its historical release entries remain in [CHANGELOG.md](CHANGELOG.md). The native release's model table and capabilities define its supported options; older Python CLI features and model backends are maintained on the Python line. A `pip install` of 1.0.0 stops with directions instead of replacing a working 0.6.6 install.
|
||||
The Python 0.6.6 engine remains on the `python-0.6` branch and the `v0.6.6` tag. Its historical release entries remain in [CHANGELOG.md](../CHANGELOG.md). The native release's model table and capabilities define its supported options; older Python CLI features and model backends are maintained on the Python line. A `pip install` of 1.0.0 stops with directions instead of replacing a working 0.6.6 install.
|
||||
|
||||
TensorFold is Apache-2.0. Earlier code retains the bundled MIT notice, and model weights retain their own licenses; see [LICENSE](LICENSE), [NOTICE](NOTICE) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
||||
TensorFold is Apache-2.0. Earlier code retains the bundled MIT notice, and model weights retain their own licenses; see [LICENSE](../LICENSE), [NOTICE](../NOTICE) and [THIRD_PARTY_NOTICES.md](../THIRD_PARTY_NOTICES.md).
|
||||
|
||||
## Contributors
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
# Run guide
|
||||
|
||||
How to install, start and tune a TensorFold server after the [quick start](../README.md#quick-start).
|
||||
Which checkpoints run on which machines is in [supported models](supported-models.md).
|
||||
|
||||
## Platform setup
|
||||
|
||||
The quick start serves Qwen3.5-2B, the small 4-bit checkpoint checked on Metal and a GB10. Its commands download its
|
||||
pinned revision, then serve it as `local-model`. Model weights have their own licenses.
|
||||
Reviewing or benchmarking TensorFold? [Evaluating TensorFold](evaluating.md) covers pinning, signature checks,
|
||||
a container and the tests that need no GPU.
|
||||
|
||||
- **Mac with Apple Silicon:** install with Homebrew (`brew install ashhart/tensorfold/tensorfold`). The
|
||||
[runbook](../RUNBOOK.md#macos-installation) covers macOS installation in more detail.
|
||||
- **Linux with an NVIDIA GPU:** use the release archive for your CPU: `linux-aarch64` on a GB10, `linux-x86_64` on an x86_64 host.
|
||||
It needs glibc 2.28 or newer and NVIDIA driver R580 or newer (CUDA 13.0), providing `libcuda.so.1`. Keep the archive's directories together.
|
||||
Its kernels are built with CUDA 13, so TensorFold refuses an older driver at startup; `nvidia-smi` shows the installed one.
|
||||
See the [CUDA runbook](../RUNBOOK.md#linux-and-cuda) for runtime libraries and supported GPUs.
|
||||
The archive's binary is `tensorfold-native`; the quick start defines a `tensorfold` shell function that calls it.
|
||||
- **Windows with an NVIDIA GPU:** follow [the native Windows build guide](WINDOWS.md).
|
||||
|
||||
## Send a request
|
||||
|
||||
Leave the server running. In another terminal, on either platform:
|
||||
|
||||
```sh
|
||||
curl -fsS http://127.0.0.1:8080/v1/chat/completions \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"model":"local-model","messages":[{"role":"user","content":"Say hello in one sentence."}],"max_tokens":128,"temperature":0}'
|
||||
```
|
||||
|
||||
The API also serves completions, Responses and Anthropic Messages. `/v1/models` lists the served name.
|
||||
Use `tensorfold --help`, `tensorfold capabilities --json` and `tensorfold serve REPO --help` to inspect your binary.
|
||||
You can also serve a complete local checkpoint directory or an existing Hugging Face cache.
|
||||
|
||||
## TensorFold Web
|
||||
|
||||
`tensorfold web [ARGS...]` opens TensorFold Web, a small local web app for picking, running and chatting with models.
|
||||
If it needs installing, an interactive release binary offers to install its matching version with `uv` after you say yes.
|
||||
See [the web launcher](web.md) for manual installation and unattended use.
|
||||
|
||||
## Parallel requests
|
||||
|
||||
`--parallel N` caps active requests at N; extra requests wait for a free slot.
|
||||
Omitting the flag uses `--parallel auto`, which asks for up to eight streams as memory and the engine allow.
|
||||
An explicit number is refused if the engine cannot fit that many streams.
|
||||
Read the engine's startup capacity line, such as `8 streams at once` on CUDA, for the count it accepted.
|
||||
With API authentication off, `/health` reports `live.connections` as active plus waiting requests and
|
||||
`live.waiting` as the queued count. For example, 8 connections with 4 waiting means 4 active requests.
|
||||
Completing or cancelling an active request frees its slot; cancelling a waiting request removes it from the queue.
|
||||
|
||||
## Exact decoding
|
||||
|
||||
Every accepted draft must equal the token the same native engine would produce with `"draft": false`.
|
||||
A resumed request must equal fresh execution, and each concurrent stream must equal its solo run.
|
||||
The comparison fixes the checkpoint, backend, settings and runtime.
|
||||
Different quantizations and different backends can produce different outputs.
|
||||
Flash Next on Metal uses shared target rounds with an explicit `--parallel N` above one, when that many sessions fit.
|
||||
A lone greedy request there uses GPU-side rounds and hands over when a second request arrives.
|
||||
`--parallel auto` (the default) and `--parallel 1`, learning and two-Mac serving use the single-reply driver.
|
||||
`FZ_BATCH_MTP_SERIAL=1` restores serial MTP drafting on the shared host.
|
||||
The [earlier MTP chain receipt](receipts/flashnext-mtp-chain-2026-10-10/README.md) records its own pinned commits.
|
||||
Nemotron, GLM, the 2B model and Qwen3.8-27B use shared lane rounds.
|
||||
On Metal, each of up to 128 streams in the 27B's shared rounds drafts its own DFlash2 tree.
|
||||
|
||||
## Context compaction
|
||||
|
||||
Compaction is off by default, and with it off every reply is unchanged.
|
||||
With `--compact-at`, a conversation that would overflow is compacted instead of refused.
|
||||
The server keeps the system prompt and the most recent turns word for word, and never separates a tool call from its result.
|
||||
The older turns become a memory note: goal, constraints, progress, decisions, next steps, exact names and numbers, and the files the tool calls read or changed.
|
||||
Each later compaction updates the previous note instead of starting over. A client that sends back the compacted conversation keeps its note.
|
||||
The reply carries the note and the compaction counts under `tensorfold.compaction`, and every reply reports `context_window` and `context_used`.
|
||||
The same request gives the same compaction and the same reply. With `--compact-memory`, the stored note carries over between requests.
|
||||
|
||||
## Cortheon mode
|
||||
|
||||
Off by default. `--cortheon` gives every chat request [Cortheon](https://github.com/ashhart/Cortheon)'s reasoning program and web research run by the server, so any OpenAI-compatible client gets it with no setup.
|
||||
The model works through Cortheon's stages for its task type and can call `cortheon_search` and `cortheon_fetch`, which the server runs without the client seeing them.
|
||||
A question about current facts, or a request to build with an outside library, is researched before the model starts.
|
||||
A coding task that changed files is asked to run its tests before it finishes.
|
||||
Web text is filtered for instructions aimed at the model, and reads reach public addresses only.
|
||||
With the flag, search queries written from the conversation go to DuckDuckGo, or to Brave with `BRAVE_SEARCH_API_KEY`, and pages are fetched from this machine; without it, the server makes no searches and reads no pages.
|
||||
See [Cortheon mode](cortheon.md).
|
||||
|
||||
## Serve flags
|
||||
|
||||
The read-only [`/memory` diagnostics](memory-diagnostics.md) report process footprint and lifetime peak,
|
||||
available backend allocation counters, and the applied retained-prefix plan without changing memory policy.
|
||||
|
||||
The binary's `capabilities --json` response lists its supported flags and platform-specific values.
|
||||
`serve MODEL --help` prints usage without loading a model.
|
||||
|
||||
| Flag | Meaning |
|
||||
| --- | --- |
|
||||
| `--host HOST`, `--port PORT` | Listen address and port, default `127.0.0.1:8080`. |
|
||||
| `--unix-socket PATH` | Listen on a new owner-only Unix socket at PATH instead of TCP, refused with `--host` or `--port`; macOS and Linux. An existing PATH, or a directory other users can write to (unless sticky, like `/tmp`), is refused, and connections from other users are closed. API keys, `--metrics-open` and the Host check apply as on TCP (a client sends a loopback `Host` or one in `--allowed-host`): the socket's permissions are a second layer, not a substitute for keys. |
|
||||
| `--profile stable` | Explicitly preserve current defaults; [profiles](profiles.md) describes the initial switch registry and startup report. |
|
||||
| `--config FILE.toml` | Read serve flags from a TOML file: a key is a flag without its `--`, and `model` names the model. The command line wins over the file, and a relative path in the file starts at the file's folder. See [serve config files](serve-config.md). |
|
||||
| `--name NAME` | Model ID advertised to clients. |
|
||||
| `--alias NAME` | Another accepted model ID; repeat for multiple aliases. |
|
||||
| `--api-key KEY` | Require a bearer key; repeat for multiple keys. |
|
||||
| `--api-key-file FILE` | Read keys from a restricted-permission file; a key can be limited to [some routes](api.md#key-scopes). |
|
||||
| `--metrics-open` | Allow `/metrics`, `/v1/metrics` and `/v1/load` without a key when API authentication is enabled. |
|
||||
| `--dashboard` | Enable the local `/dashboard` page and `/stats` endpoint. |
|
||||
| `--max-inflight N`, `--max-inflight-per-key N` | Refuse model requests past N in progress at once, overall or per key, with 429; 0, the default, is off. See [admission](api.md#admission). |
|
||||
| `--max-connections N`, `--max-connections-per-address N`, `--trusted-proxy ADDRESS` | Open connections at most (default 128); from three quarters full, one address's share (default a quarter, 0 off); addresses never counted for that share, as loopback is not, such as a reverse proxy or Docker's bridge gateway. See [admission](api.md#admission). |
|
||||
| `--requests-per-second N`, `--request-burst N` | Refuse a key's model requests past N a second, after a burst; 0, the default, is off. |
|
||||
| `--context N` | Bound prompt plus reply tokens; the model's window and memory checks still apply. Qwen3.8-27B defaults to 32,768 and takes up to 262,144. |
|
||||
| `--rope-yarn F` | YaRN context extension with this factor over the checkpoint's trained window, for Qwen3.5 and 3.6 on a CUDA build; other builds refuse the flag. |
|
||||
| `--loops N` | Passes over a looped model's recurrent block, from 1; without it the checkpoint's own count runs. Other builds refuse the flag. |
|
||||
| `--speed-up FILE` | Rank and link settings for two-Mac Flash Next or GLM serving. |
|
||||
| `--max-tokens N` | Default reply limit, 4096; requests can override it. |
|
||||
| `--temperature T` | Sampling temperature; zero requests greedy decoding. |
|
||||
| `--prompt-seed` | Use native prompt-derived keys instead of the fresh OS fallback; request and configured default seeds still win. |
|
||||
| `--top-p P`, `--top-k K`, `--min-p P` | Sampling defaults. |
|
||||
| `--instruct-sampling SET` | Sampling defaults for sampled chat requests with thinking off: `card` (the Qwen 3.5, 3.6 and 3.8 cards' temperature 0.7, top_p 0.8, top_k 20, presence_penalty 1.5), `name=value` pairs over it, or `none`; the serve flags still win. Greedy requests, raw completions and the server's own requests never take them. |
|
||||
| `--thinking`, `--no-thinking` | Choose whether the chat template opens a reasoning block. |
|
||||
| `--reasoning-effort LEVEL` | Default template effort: `minimal`, `low`, `medium`, `high`, `xhigh` or `max`. |
|
||||
| `--thinking-budget N` | Limit reasoning tokens where the engine supports closing the reasoning block. |
|
||||
| `--thinking-reserve N` | With thinking on, let reasoning use up to N tokens beyond a request's `max_tokens`, which then limits the answer (lane engines). |
|
||||
| `--loop-guard` | Close reasoning that repeats itself verbatim (a short cycle, or a long passage) where the engine supports it. |
|
||||
| `--loop-guard-stop` | As `--loop-guard`, but end the reply where the guard fires: the reasoning so far, no answer or tool calls, `finish_reason` `content_filter` and a `reasoning_loop` error ([API](api.md)). |
|
||||
| `--no-drafts` | Produce the plain reference through the same engine. |
|
||||
| `--drafter DRAFTER` | An external drafter, as a directory or a repo id in the Hugging Face cache, for models that take one (Gemma 4 31B's recipe names its drafter); `none` serves without one. Without the flag, Qwen3.8-27B pairs DFlash2 when the cache holds it (never downloaded, not on HIP): one line names it, and serve runs without it if it does not open. |
|
||||
| `--drafter-bits 0\|4` | Drafter weight precision where the model offers a choice: 4 bits (the default), or 0 to keep bf16. Qwen3.8-27B on CUDA takes 4 only. |
|
||||
| `--record DIR` | Write each stream's committed tokens, positions and tapped rows under DIR, for drafter training. CUDA Nemotron only; a single stream runs through the lane rounds, and recording stops below 25 GiB free disk. |
|
||||
| `--keep-warm SECONDS` | Keep the Metal GPU active while idle for this long after a request, default 900; zero disables it. |
|
||||
| `--cfg-gamma GAMMA` | Metal Drama speech: semantic guidance strength, finite 1–5; 0/default disables it. Only reference-conditioned requests are guided. Enabled replies report `X-Cfg-Gamma`; codec heads stay conditional. |
|
||||
| `--cfg-allow-request-gamma` | Metal Drama speech: allow a finite 1–5 `X-Cfg-Gamma` request header; invalid values return 400 before engine submission. Without this opt-in, the server's gamma is fixed. |
|
||||
| `--cfg-force-guided` | With an enabled Metal Drama guidance policy, exercise the unconditional state even at gamma 1. The semantic mix at 1 remains exact conditional-logit identity. |
|
||||
| `--cfg-batched` | With enabled Metal Drama guidance, submit both independent backbone states in one command buffer rather than separate submissions. Weights are shared; extra state is included in admission. Not vectorized batching. |
|
||||
| `--silence-floor-dbfs DBFS` | Drama speech only: explicit frame-power floor for the silence guard, with no default floor. Calibrate below quiet intended speech using public or built-in speech. |
|
||||
| `--silence-seconds SECONDS` | Drama speech only: stop after this continuous duration below the explicit floor, retaining audio and reporting `silence`. Unset by default: off; calibrate above intentional pauses. |
|
||||
| `--silence-onset-s SECONDS` | Drama speech only: with the silence guard on, stop once this many seconds run below its floor while the synthesis has voiced less than `--silence-onset-voiced-s`, retaining audio and reporting `silence`. Off unless given; must be below `--silence-seconds`. |
|
||||
| `--silence-onset-voiced-s SECONDS` | Drama speech only: the voiced seconds below which `--silence-onset-s` applies; required with it, with no default. Calibrate on public or built-in speech. |
|
||||
| `--silence-mid-s SECONDS` | Drama speech only: with the silence guard on, finish as `silence` when end of speech falls in a run this long below the floor, after the explicit voiced minimum. Whole replies carry the decimal `X-Silence-Mid-Trips` count, including zero. Must be below `--silence-seconds` and paired with `--silence-mid-min-voiced-s`. Unset by default: off. |
|
||||
| `--silence-mid-min-voiced-s SECONDS` | Required with `--silence-mid-s`: positive finite cumulative voiced duration before the mid rule applies, including equality. No default; calibrate with the other silence thresholds. |
|
||||
| `--silence-redraws N` | Drama speech only: draw a whole reply the silence guard ended again, up to N times, as seed salt + k or explicit request seed + k; N of 1 or more needs the guard. Unset by default: off, as is 0; streams are never redrawn. See [speech redraws](speech-redraws.md). |
|
||||
| `--silence-redraw-budget-s SECONDS` | Start a redraw only while elapsed time plus the last take's duration fits; a request's `X-Deadline-S` can lower it. No default budget. |
|
||||
| `--silence-redraw-controls LIST` | Redraws speak the input filtered to the listed controls, as `--allowed-controls` filters; an empty list removes every control. |
|
||||
| `--short-reply-ratio R` | Also redraw a whole reply that finished `stop` with less audio than R (above 0, below 1) of its text's expected length; needs `--silence-redraws` and `--short-reply-chars-per-s`. No default. |
|
||||
| `--short-reply-chars-per-s CPS` | Input characters per second of audio in complete replies of the served voice, setting the expected length; needs `--short-reply-ratio`. No default; calibrate on your own voice. |
|
||||
| `--register-redraw-st ST` | Drama speech only: draw a whole reply once more when a phrase after the first opens ST semitones above the other phrases' median opening; needs the two flags below. Unset by default: off, with no default for any of the three. See [speech redraws](speech-redraws.md#register). |
|
||||
| `--register-redraw-high PERCENT` | The share of that phrase's voiced frames that must lie above `--register-high-hz`. |
|
||||
| `--register-high-hz HZ` | The pitch line, 75 to 600 Hz, that marks a high register; calibrate it on your own voice. |
|
||||
| `--parallel N\|auto` | Cap active requests at N and queue the rest. Default `auto` asks for up to 8 as memory and the engine allow; an explicit count that cannot fit is refused. Read the accepted count at startup. |
|
||||
| `--prompt-cache-gib GIB` | Retained-prefix budget; by default half the room left after streams on Metal and unified-memory CUDA (16 GiB floor where room permits), 8 GiB host snapshots on discrete CUDA, 16 GiB for Flash Next's batch host. An explicit value overrides it; 0 disables it. |
|
||||
| `--prompt-cache-over-cap` | Permit an explicit prefix budget past what 70% of RAM leaves once the server loads. |
|
||||
| `--learn` | Keep shared prompt prefixes on disk for new conversations to resume; the models are below the table. |
|
||||
| `--learn-dir DIR` | Where `--learn` keeps them, `~/.cache/tensorfold/learned` by default; implies `--learn`. |
|
||||
| `--learn-gib GIB` | Disk for learned prefixes on each Mac, 32 by default; the least recently used go first. Implies `--learn`. |
|
||||
| `--learn-min-free-gib GIB` | Free disk `--learn` leaves on each Mac, 4 by default; below it learning pauses and serving goes on. |
|
||||
| `--learn-conversations` | Keep every prompt state on disk too, each conversation's and the shared prefixes, in one store in place of `--learn`'s, so a next turn after a restart, a crash or an eviction reads it back. Implies `--learn`; see [Conversations on disk](api.md#conversations-on-disk). |
|
||||
| `--learn-daily-gib GIB` | What `--learn-conversations` may write to disk a day, every model together, 32 by default; past it states stay in RAM only. |
|
||||
| `--recall` | Draft from a record of the token ids earlier requests read and wrote, so repeated text is verified in a few rounds; replies are unchanged. Off by default; see [Recall](recall.md) for what stays on disk. |
|
||||
| `--recall-dir DIR` | The record's directory, one a tokenizer under `~/.cache/tensorfold/recall` by default; implies `--recall`. |
|
||||
| `--recall-gib GIB` | Disk for the record, 1/16 GiB by default; the oldest ids go first. Implies `--recall`. |
|
||||
| `--recall-read-only` | Draft from the record without adding to it, as gates and benchmarks run; implies `--recall`. |
|
||||
| `--snapshot-dir none` | Keep prefix state in memory; `none` is the supported value. |
|
||||
| `--max-snapshots 0` | Disable disk snapshots at startup; `0` is the supported value. |
|
||||
| `--compact-at auto\|FRACTION` | Turn on [context compaction](#context-compaction). `auto` compacts when the prompt and reply would pass the window minus a reserve. |
|
||||
| `--compact-keep TOKENS` | Recent tokens kept word for word when compacting; the default is 20,000 or a quarter of the window, whichever is smaller. |
|
||||
| `--compact-memory DIR` | Also keep each conversation's memory note as a Markdown file in DIR. |
|
||||
| `--cortheon` | Cortheon's reasoning program and server-run web research for chat requests; see [Cortheon mode](cortheon.md). |
|
||||
| `--no-update-check` | Accepted compatibility switch; update the installed binary through its package manager. |
|
||||
| `--backend auto` | Use the backend compiled for the platform; `mlx` selects native Metal on macOS and `cuda` selects CUDA on Linux. |
|
||||
|
||||
`--prompt-cache-gib` applies to Nemotron, Flash Next, GLM, Qwen3.8-27B and LFM2.5-24B-A2B, and
|
||||
`--prompt-cache-over-cap` to the same models but GLM.
|
||||
`--learn` keeps shared prompt prefixes, such as a system prompt and its tools, on disk, so new conversations resume
|
||||
them after a restart or an upgrade that computes the same bits. It covers GLM-5.3-Flash, Nemotron, and Flash Next on
|
||||
one Mac; Qwen3.8-27B, Qwen3.5-2B, LFM2.5-24B-A2B, GLM-5.3 (EXLR8) and a CUDA server refuse it at startup.
|
||||
Qwen3.8-27B on Metal also resumes a follow-up turn from the state its last reply left in the server's first slot,
|
||||
when the prompt cache holds nothing as far: the turn reads only its new tokens, even on a Mac whose cache cannot keep
|
||||
a long conversation. Where the cache cannot keep a whole context, the server also keeps that slot's DeltaNet states
|
||||
at each prompt's history end, so a turn whose template drops the last reply's reasoning resumes there. Replies are
|
||||
the same tokens as a fresh prompt pass; `TF_QWEN27_SLOT_RESUME=0` turns both off.
|
||||
|
||||
Sampling defaults come from the checkpoint's `generation_config.json`, then serve flags and request fields override them.
|
||||
`--context 0` is family-specific; use a positive limit for GLM and inspect the capacity reported at startup.
|
||||
The supported environment variables are listed in `capabilities --json`, including API keys, request logging and Hugging Face cache paths.
|
||||
`TF_Q27_PROFILE=N` makes a native Metal Qwen3.8-27B server log a per-class GPU-time breakdown every N decode rounds (`1` means 64) and add `gpu_seconds` to its replies; it is diagnostic only, and a profiled round runs slower.
|
||||
|
||||
## Other ways to run
|
||||
|
||||
### Mac app
|
||||
|
||||
The [TensorFold desktop workspace](../app/README.md) bundles the local engine, model downloads, hardware recommendations, live generation metrics, coding workers and document editing.
|
||||
Download the Apple-silicon [beta 9 DMG](https://github.com/ashhart/TensorFold/releases/tag/v1.0.0-beta.9), or build from [`app/`](../app/README.md).
|
||||
The desktop app launches the bundled `tensorfold-native` executable directly.
|
||||
Mobile clients in `app/mobile/` remain preview software.
|
||||
|
||||
### TensorFold Starlight (enterprise)
|
||||
|
||||
[TensorFold Starlight](https://github.com/ashhart/tf-starlight) gives an organisation one governed OpenAI- and Anthropic-compatible endpoint for a fleet of TensorFold engines on Macs, Linux GPU servers and Windows machines.
|
||||
It signs people in through the organisation's identity provider (OIDC or SAML, with SCIM provisioning), decides who may use which model and where it runs, places and supervises models on nodes, and accounts for every token.
|
||||
It runs fully offline, or brokers approved frontier providers under the same identity, policy and budgets; [the install guide](https://github.com/ashhart/tf-starlight/blob/main/docs/install.md) covers Docker, Kubernetes and Linux services.
|
||||
Starlight lives in its own repository, [ashhart/tf-starlight](https://github.com/ashhart/tf-starlight): it pins the TensorFold release it is tested with and checks every flag its nodes pass to `tensorfold serve` against that release in CI.
|
||||
Starlight is new: the gates that still need real GPU clusters or identity-provider tenants are listed in [its qualification notes](https://github.com/ashhart/tf-starlight/blob/main/docs/qualification.md).
|
||||
@@ -26,7 +26,7 @@ tensorfold serve other/model --config glm.toml # a model on the command line
|
||||
|
||||
## Keys
|
||||
|
||||
A key is a [serve flag](../README.md#serve-flags) without its `--`. `-` and `_` are the same, so
|
||||
A key is a [serve flag](run-guide.md#serve-flags) without its `--`. `-` and `_` are the same, so
|
||||
`max-tokens` and `max_tokens` both set `--max-tokens`; a file that has both is refused. `model` names the
|
||||
model, as the positional argument does. Every key is at the top level of the file.
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ idle and with 36 busy threads on the first Mac.
|
||||
|
||||
Macs with less memory, such as 64 GB Mac minis, can't run Flash Next in this mode today, since every Mac holds the whole
|
||||
model. One such Mac can serve Nemotron 3.5 Lightning 30B-A3B 4-bit, 17 GiB, on the Zig engine: see
|
||||
[ZIG-PREVIEW.md](../ZIG-PREVIEW.md). Spreading one model's layers over several smaller Macs needs a pipeline mode, which
|
||||
[the native preview](zig-preview.md). Spreading one model's layers over several smaller Macs needs a pipeline mode, which
|
||||
isn't built.
|
||||
|
||||
## Setup
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
# Supported models
|
||||
|
||||
Which checkpoints the native release serves, on which machines, and how to manage the models on disk.
|
||||
Install TensorFold first with the [quick start](../README.md#quick-start); the serve flags are in the [run guide](run-guide.md#serve-flags).
|
||||
|
||||
<a id="qualified-models"></a>
|
||||
|
||||
## Pick a model
|
||||
|
||||
These are the native release's serving paths. A recipe may also describe the older Python 0.6.6 engine;
|
||||
use its native section and the current [changes](../CHANGELOG.md) together.
|
||||
Hardware below records the documented scope, not an unmeasured minimum. Context, parallel requests, prompt caches
|
||||
and drafters need memory beyond the weights. `tensorfold info REPO` reports the checkpoint's memory floor.
|
||||
Where no RAM capacity is published, inspect that floor before serving a large checkpoint.
|
||||
CUDA release images include sm_80, sm_86, sm_120 and sm_121. The A100 (sm_80) has kernel-check evidence
|
||||
([#846](https://github.com/ashhart/TensorFold/pull/846)), but no served checkpoint on record, so it is not model-qualified.
|
||||
Nemotron and dense Qwen have NVFP4/FP8 fallback code for sm_80 to sm_89 (#901, #1470); no such model run on sm_80 to sm_89 is recorded.
|
||||
|
||||
Run a table command after installation. On a Linux archive installation, use the `tensorfold` shell function from the [quick start](../README.md#linux-with-an-nvidia-gpu).
|
||||
`REPO@revision` pins a pull; serve the repository name without the revision after pulling it.
|
||||
Conversions are explicitly marked: their upstream weights need the linked conversion before native serving.
|
||||
|
||||
| Model / format | Download | Machine and memory scope | Native recipe / limits |
|
||||
| --- | --- | --- | --- |
|
||||
| dots.mocr, BF16 OCR | Use the local `dots-studio/dots.mocr` checkpoint. | Native HIP; AMD R9700 (`gfx1201`) checked, one GPU. | [Native OCR recipe](recipes/dots-mocr-hip.md); full model-card demo matches HF tokens. Native CUDA serves text prompts only ([CUDA recipe](recipes/dots-mocr-cuda.md)). No video, MTP head, or Metal qualification. |
|
||||
| Qwen3.5-2B, MLX 4-bit | `tensorfold pull mlx-community/Qwen3.5-2B-MLX-4bit@93760be4f1f69842a46bc13dbdc0f19e291392a3` | One Mac (M5 Max checked), or one GB10; no RAM minimum published. | [2B](recipes/qwen3.5-2b-native.md); [CUDA release checks](../CHANGELOG.md#110). Text only. |
|
||||
| Qwen3.8-27B, MLX 4-bit | `tensorfold pull TensorFold/Qwen3.8-27B-MLX-4bit`<br>`tensorfold pull z-lab/Qwen3.8-27B-DFlash2` | One Mac (M5 Max/M3 Ultra), or one GB10; a 32 GB Mac needs `iogpu.wired_limit_mb` raised (the startup refusal names the value). | [27B](recipes/qwen3.8-27b.md). Serve drafts with the pulled DFlash2 by itself; `--drafter none` serves without it. |
|
||||
| Nemotron 3.5 Lightning 30B-A3B, MLX 4-bit | `tensorfold pull TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit` | One Mac (M1-M5), or one GB10; also checked on RTX 3090 / RTX PRO 6000. | [Lightning](recipes/nemotron-3.5.md). Includes MTP. |
|
||||
| Lightning, mixed oQ4 / oQ6 / oQ8 | `tensorfold pull TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-oQ4`<br>`tensorfold pull TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-oQ6`<br>`tensorfold pull TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-oQ8` | One M3 Ultra checked. | [Width and MTP instructions](recipes/nemotron-3.5.md#run). Metal only; copy the 4-bit checkpoint's MTP head to draft. |
|
||||
| Lightning, NVIDIA NVFP4 | `tensorfold pull nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-NVFP4` | One GB10 checked. Non-cluster fallback code exists for sm_80 to sm_89; no NVFP4/FP8 serving run is recorded on sm_80. | [Lightning](recipes/nemotron-3.5.md); [CUDA changes](../CHANGELOG.md#110). |
|
||||
| Nemotron 3.5 Super VL 120B-A12B, NVFP4 | `tensorfold pull nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4@82d93699acd3be9e4617c53360fe5b3f5dbeb1b3` | One or two GB10s; weights 70.8 GiB, 73.2 GiB with vision on one. | [One/two-GB10 commands](recipes/nemotron-3.5-super-vl.md). Add `--vision` for images. |
|
||||
| Nemotron 3.5 Bolt 74B-A9B | [NVIDIA's checkpoint](https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Bolt-74B-A9B-24GB) | Native CUDA; 24 GB checkpoint, checked on RTX PRO 6000. | [Bolt/Omni video](recipes/nemotron-omni-video.md); [release qualification](../CHANGELOG.md#110). |
|
||||
| Qwen3.8 Flash Next, MLX 6-bit | `tensorfold pull TensorFold/Qwen3.8-Flash-Next-MLX-6bit-MTP` | One M5 Ultra checked; RAM minimum not published. | [Metal](recipes/qwen3.8-flash-next.md), [runbook](../RUNBOOK.md#flash-next-and-paired-metal-serving). |
|
||||
| Qwen3.8 Flash Next, MLX 4-bit | `tensorfold pull TensorFold/Qwen3.8-Flash-Next-MLX-4bit-MTP` | One GB10; 73.3 GiB uploaded, plus mapped tables and caches. Metal has a native 4-bit path too (M3 Ultra checked). | [Native CUDA](recipes/flash-next-cuda.md). NVFP4/two-local-rank and vision paths are experimental. Metal's shared-session limits are in [known issues](known-issues.md#models). |
|
||||
| GLM-5.3-Flash, MLX 4-bit | `tensorfold pull TensorFold/GLM-5.3-Flash-MLX-4bit-MTP` | Two M5 Ultras; single-Mac native serving is not qualified. | [Paired Metal runbook](../RUNBOOK.md#flash-next-and-paired-metal-serving). Do not use the Python recipe's single-Mac command. |
|
||||
| GLM-5.3-Flash, EXL3/TR3 | `tensorfold pull Mia-AiLab/GLM-5.3-Flash-EXL3-TR3-4bpw` | Two CUDA ranks; the release checks the two-GB10 setup. | [Release scope](../CHANGELOG.md#110), [checkpoint](recipes/glm-5.3-flash.md#exl3). Experimental checkpoint; use [native rank options](recipes/glm-5.3-flash-cuda.md#run), not the Python installation. |
|
||||
| GLM-5.3-Flash, NVFP4 | `tensorfold pull nvidia/GLM-5.3-Flash-NVFP4@423acf37583782c51c142d145aef733d72943d93` | Two GB10s at TP=2: @Bizuayeu loaded the whole checkpoint on 1.1.0 in 302.1 s and served it. | [Native CUDA](recipes/glm-5.3-flash-cuda.md); [contributed run](https://github.com/ashhart/TensorFold/issues/1040): one token hash per prompt across three runs and a passphrase found in 199,307 tokens; scored prompts and more than two ranks were not covered. |
|
||||
| GLM-5.3-Flash, FP4-Local | `tensorfold pull nvidia/GLM-5.3-Flash-FP4-Local@76348ddb2be2e35e39ecfc00e75dc07703f4f3d5` | Two GB10s at TP=2, or three at TP=3 over a ring of direct links: @Bizuayeu loaded it as stored and served it at both sizes. 165.3 GiB of weights, 13% less than NVFP4's. | [Native CUDA](recipes/glm-5.3-flash-cuda.md), in 1.1.5 (#1050). NVIDIA's mixed-precision checkpoint: NVFP4 routed experts, FP8 for most of the rest. As close to BF16 as NVFP4 at its smaller size ([receipt](receipts/glm-fp4local-80517fc3/README.md)). |
|
||||
| GLM-5.3-Flash, XSFP4 | `tensorfold pull Bizuayeu/GLM-5.3-Flash-XSFP4@88736f916f8939607fde8a4b881dcae749f7551d` | Two GB10s at TP=2, or three at TP=3 over a ring of direct links: @Bizuayeu served it at both sizes. 165.7 GiB of weights. | [Native CUDA](recipes/glm-5.3-flash-cuda.md), in 1.1.5 through FP4-Local's path. FP4-Local with its routed experts refitted from the BF16 weights and a smoothing folded in, on the same kernels. Closer to BF16 than FP4-Local and NVFP4 by all three measures in [its card](https://huggingface.co/Bizuayeu/GLM-5.3-Flash-XSFP4#measured). |
|
||||
| GLM-5.3-Flash, Jammed XSFP4 | `tensorfold pull Bizuayeu/GLM-5.3-Flash-Jammed-XSFP4@0a22bb46ecef3d0f5f96e41dc6011be12974fbf1` | Two GB10s at TP=2, or three at TP=3 over a ring of direct links: @Bizuayeu served it at both sizes. 160.2 GiB of weights; at TP=2 each GB10 holds [6.6 GiB less](https://huggingface.co/Bizuayeu/GLM-5.3-Flash-Jammed-XSFP4#memory) than at block 16. | [Native CUDA](recipes/glm-5.3-flash-cuda.md), in 1.2.3 (#2041). Refitted from BF16 at block 32 with XSFP4's smoothing, each row's scales packed (`csf0_v1`, read only by this path), at XSFP4's speed. Its KL and top-1 are nearer BF16 than NVIDIA's two checkpoints', short of XSFP4's ([its card](https://huggingface.co/Bizuayeu/GLM-5.3-Flash-Jammed-XSFP4#measured)). |
|
||||
| GLM-5.3-Flash, Jammed XSFP4 NZ5 | `tensorfold pull Bizuayeu/GLM-5.3-Flash-Jammed-XSFP4-NZ5@1c900ea0294e28a8e9ab56c1156c0338eed60aef` | Two GB10s at TP=2: @Bizuayeu served it. 160.2 GiB of weights. | [Native CUDA](recipes/glm-5.3-flash-cuda.md), on main after 1.2.7 (#2894). Jammed XSFP4 refitted with E2M1's -0 code read as +5 (`NVFP4_NZ5`, read only by this path). Nearer BF16 than Jammed XSFP4 ([its card](https://huggingface.co/Bizuayeu/GLM-5.3-Flash-Jammed-XSFP4-NZ5#measured)). |
|
||||
| GLM-5.3, EXLR8 `home` | `tensorfold pull kindlingai/glm-5.3-exlr8-k2-k3-k4@f459f5d0272a529403dd9b3fd32f771f4250a0d4 --exlr8 home --node 0/2 --dir ~/models/glm-5.3-exlr8-home` | Two M5 Ultra Macs, 256 GB each; about 160 GB resident per Mac at 8k context / four streams. | [Two-Mac recipe](glm-5.3-exlr8.md). Use `--node 1/2` on the other Mac; Thunderbolt 5 and MCDMA required. No CUDA backend. |
|
||||
| LFM2.5-24B-A2B, MLX 4 / 6 / 8-bit | `tensorfold pull LiquidAI/LFM2.5-24B-A2B-MLX-4bit@667408d494bde191c2cb9dd4f4549827816b9275`<br>`tensorfold pull LiquidAI/LFM2.5-24B-A2B-MLX-6bit@1deec53eb49571e21cdcbf82fd5839248f07ed88`<br>`tensorfold pull LiquidAI/LFM2.5-24B-A2B-MLX-8bit@67ab417dd02d0c9545802a726df668620eae049d` | One Mac (M4 Pro checked), or one NVIDIA GPU with the 4-bit export (GB10 checked). | [Native recipe](recipes/lfm2.5-24b-a2b.md) ([CUDA](recipes/lfm2.5-24b-a2b.md#cuda)), [release history](../CHANGELOG.md). Weights: LFM Open License v1.0. |
|
||||
| Qwen3.6-35B-A3B, MLX with MTP | `tensorfold pull TensorFold/Qwen3.6-35B-A3B-MLX-4bit-MTP@81169a9bc511a27c1b4eedb77a2cd98ced431847` | One GB10; 20.9 GB checkpoint. | [Qwen3.6](recipes/qwen3.6-moe.md). Native CUDA receipt here. Metal also registers this model type; the recipe's Metal commands describe Python 0.6.6. |
|
||||
| Qwen3.6-35B-A3B, NVIDIA NVFP4 with MTP | `tensorfold pull nvidia/Qwen3.6-35B-A3B-NVFP4@1355db6a052410cfd62085d94b58866fd0f2c3c5` | One GB10; 20.3 GiB on the device, 20.9 GiB with the drafter. | [Native CUDA](recipes/qwen3.6-moe.md#nvidias-nvfp4-checkpoint-native-cuda). Serve with `--drafter` naming the same checkpoint for MTP drafts. |
|
||||
| Gemma 4 31B, MLX 4-bit | `tensorfold pull mlx-community/gemma-4-31B-it-4bit@696d436c404745a59f30e4939a658162b0a9e57f`<br>`tensorfold pull z-lab/gemma-4-31B-it-DFlash@eabd648301ce28583cc14757912e5e0f84e152e1` | One Mac (M5 Ultra checked), or one GB10 on CUDA. Pre-M5 Metal has a row path; its assistant and DFlash drafters require M5 tensor units. | [Native 31B on Metal](recipes/gemma-4-native.md), [CUDA qualification](../CHANGELOG.md#114). Name the drafter with `--drafter`; images with `--vision`. |
|
||||
| Gemma 4 12B, converted MLX 4-bit | `hf download google/gemma-4-12B-it --revision 707f0a3b8a3c7ad586ed01e27eafbad8a27dd0f7 --local-dir ~/models/gemma-4-12b-hf`<br>`hf download google/gemma-4-12B-it-assistant --revision 46d4c6f13f0ac0ad827b915669b8df9b81c64c51 --local-dir ~/models/gemma-4-12b-assistant` | One Mac (M5 Ultra checked); converted text weights 6.3 GB, image weights 100 MB, plus assistant/caches. MLX 4-bit also served on one GB10. Pre-M5 Metal has a row path; the MTP assistant requires M5 tensor units. | [Convert and serve](recipes/gemma-4-12b-native.md). Upstream download needs `hf`; conversion needs Python, mlx and mlx-lm. Serving is native; [CUDA qualification](../CHANGELOG.md#114) includes the MTP assistant. |
|
||||
| Step-5-Preview, converted affine | `hf download stepfun-ai/Step-5-Preview --local-dir ~/models/step5-preview-fp8` | One 256 GB Mac; text 166.9 GiB, MTP adds 2.5 GiB and vision 3.7 GiB. | [Convert and serve](recipes/step-5-preview.md). The documented 256 GB setup serves converted affine weights; converting the upstream FP8 download needs Python and mlx. |
|
||||
| MiniMax-M3.1-Flash, community affine 3/4-bit | `hf download BobClawblaw/MiniMax-M3.1-Flash-MLX-mix34 --revision 9524999057e0d277d26438606e033e2191fb465c --local-dir ~/models/MiniMax-M3.1-Flash-MLX-mix34`<br>`hf download BobClawblaw/MiniMax-M3.1-Flash-MLX-mix256k --revision 916e7ca1044f1c3e7566163096243c940327224d --local-dir ~/models/MiniMax-M3.1-Flash-MLX-mix256k` | One 256 GB M5 Ultra; 203.7 GiB (32,768-token window) or 189.2 GiB (147,456), plus caches. | [MiniMax-M3.1-Flash](recipes/minimax-m3.1-flash.md). Set `MINIMAX_LOAD_LIMIT_GB`; images with `--vision`. Community checkpoints: lossy conversions of MiniMax's NVFP4 release (KL 0.244 / 0.295). MiniMax Community License. |
|
||||
| Recursive Flint 40B-A2.5B, MLX INT4 | `hf download RecursiveSI/flint-int4 --revision 3b93f9053b530488405ae9fca51d4900d6ce21f0 --local-dir ~/models/flint-int4` | One M5 Mac; M5 Ultra checked; 21.4 GiB resident plus caches. M1-M4 untested. | [Flint](recipes/flint.md). Text and tools; always reasons. Optional `incoai/Flint-DFlash2` through `--drafter` on M5, up to four streams. |
|
||||
| Kolibri-1, block FP8 (research) | `tensorfold pull Aleph-Alpha/Kolibri-1@e52eb4627d11516b0c01de49210ab5a4e4061444` | One NVIDIA GPU; GB10 measured; 74 GB checkpoint. | [Kolibri](recipes/kolibri-1.md). Text only; copy drafts, no EAGLE-3/neural drafter. |
|
||||
| Liquid AI d1-3B, decisions | Not documented yet. | Native CUDA; RAM minimum not published. | [API section](run-guide.md#serve-flags). `/v1/systemone` and `/v1/decisions`. |
|
||||
| Fish Audio Drama 3, speech | Not documented yet. | Native Metal or CUDA; GB10 measured. | [Release audio instructions](../CHANGELOG.md#110), [reference voices and dialogue speakers](drama-http-voices.md). `/v1/audio/speech` with [sampling controls](speech-sampling.md); checkpoint and `codec.pth` required. |
|
||||
| Drama 3 pruned NVFP4, speech | `hf download plotarmordev/drama-3-NVFP4-Pruned --revision 494db08481db952f834b2241bce63fb3dfa72554 --local-dir drama-3-NVFP4-Pruned` | Native Metal; roughly 21 GiB checkpoint plus runtime state. Not a minimum-RAM or cross-backend quality claim. | Packed experts, BF16 dense/tower weights and FP32 accumulation; no conversion. Use `serve drama-3-NVFP4-Pruned --cfg-gamma 1.5 --cfg-batched` with an attested catalog voice. |
|
||||
|
||||
### GLM-5.3: one machine or two?
|
||||
|
||||
The native release does not qualify GLM-5.3 on one machine. GLM-5.3 EXLR8 `home` needs two 256 GB M5 Ultra Macs;
|
||||
[its recipe](glm-5.3-exlr8.md) gives both pull and serve commands. GLM-5.3-Flash is a different model:
|
||||
its native Metal setup needs two M5 Ultras. Native CUDA has recorded TP=2 and TP=3 setups, including
|
||||
FP4-Local and XSFP4 on two and three GB10s. The single-256-GB-Mac
|
||||
GLM-5.3-Flash command in the older recipe is for Python 0.6.6, not this release.
|
||||
For the NVFP4 path, see [GLM-5.3-Flash on CUDA](recipes/glm-5.3-flash-cuda.md) and what
|
||||
[the contributed run](https://github.com/ashhart/TensorFold/issues/1040) on two GB10s covered.
|
||||
|
||||
DeepSeek checkpoints are **not served yet** by any release binary: whole-model gate [#827](https://github.com/ashhart/TensorFold/pull/827) is still open.
|
||||
MiMo's native backend is not in a release yet. Bonsai's ternary pack and Gemma 4 26B-A4B remain Python-only;
|
||||
they are not native download recommendations. [Known issues](known-issues.md) lists current limits,
|
||||
including Flash Next shared-session cache/performance behavior and the 27B's drafter limits.
|
||||
|
||||
## Models on disk
|
||||
|
||||
```sh
|
||||
tensorfold pull TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit
|
||||
tensorfold models
|
||||
tensorfold models --json
|
||||
tensorfold info TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit
|
||||
tensorfold rm TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit
|
||||
```
|
||||
|
||||
`pull` downloads a checkpoint into the Hugging Face cache and checks what it downloads against the Hub: large files by sha256, small files by their git blob sha1.
|
||||
Large files come down in pieces over up to 16 connections, and an interrupted pull resumes with the pieces it lacks.
|
||||
It refuses a checkpoint whose `model_type` has no native family, and fetches the 27B's DFlash2 drafter for `--drafter`. `models` lists the cached checkpoints with a model type it knows, and `info` shows one checkpoint's family, format, context and memory floor.
|
||||
`models --json` prints the same list as one document for programs: `schema` 1, and each checkpoint's `repo`, `family` and `model_type`; `family` is a display title and `model_type` is the key to match on.
|
||||
`tensorfold serve REPO` serves a cached checkpoint by its repository name.
|
||||
`rm REPO` removes a cached checkpoint with all its snapshots, blobs and refs, and then the repo's folder.
|
||||
`rm REPO@REVISION` removes one snapshot, named by a ref such as `main` or by its commit, and the refs that name it. Blobs another snapshot still links to stay.
|
||||
Before deleting, it lists each snapshot and the bytes freed, counting a blob two snapshots share once, and asks.
|
||||
`--yes` skips the question and is needed when stdin is not a terminal. `--dry-run` only lists.
|
||||
A pull or removal already using this cache causes a busy refusal. After confirmation, removal checks a fresh plan.
|
||||
If the cache changed, nothing is removed: review the new plan and retry. A snapshot held by a running server is refused by name.
|
||||
External Hugging Face clients, older TensorFold binaries and programs writing cache paths directly do not share this lock.
|
||||
Stop them before removing a checkpoint; concurrent external cache writes are not supported. The filesystem must support advisory locks.
|
||||
On Windows the persistent cache lock is `.tensorfold-lock` in the cache root.
|
||||
It takes a cached repo id, never a path, deletes only inside that repo's cache folder, and removes a link without following it.
|
||||
TensorFold's own files inside a snapshot, such as the `--slide` originals in `.tensorfold-original`, go with the snapshot.
|
||||
Flash Next packs and the learned, spilled and Recall states under `~/.cache/tensorfold` are shared rather than kept per repo, so they stay.
|
||||
Stop a server that holds the checkpoint before removing it; `rm` refuses its leased snapshot by name.
|
||||
|
||||
## Model discovery
|
||||
|
||||
`GET /v1/models` (also `/models`) advertises each served name and alias. When the engine reports a finite
|
||||
context window, each entry includes equal `context_length` and `max_model_len` integer extensions. These
|
||||
are the loaded engine's effective prompt-plus-reply token limit, including any startup memory fitting;
|
||||
they are not the default reply limit. An unspecified engine window omits both fields. Clients should
|
||||
still handle per-request memory refusals: an advertised context is not a guarantee that every workload fits.
|
||||
|
||||
A model that thinks also carries an OpenRouter-style `reasoning`: `default_enabled`, `default_effort` (only
|
||||
with `--reasoning-effort`), and `supported_efforts`, the levels its template names, highest first, then `none`
|
||||
when the template has a thinking switch. A template that names no level leaves `supported_efforts` out. These
|
||||
describe chat and Responses requests.
|
||||
@@ -9,9 +9,9 @@ The rule the whole engine is built around: drafted output is byte-for-byte ident
|
||||
| Model | Backend | Status |
|
||||
|---|---|---|
|
||||
| Nemotron 3.5 Lightning 30B-A3B, MLX 4-bit + MTP head ([TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit](https://huggingface.co/TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit)) | Metal, Apple M5 | Served through the OpenAI-compatible server. Exact against the Python engine on the same chip. Keeps each conversation's prompt state between requests, so a later turn reads only its new tokens. Measured below. |
|
||||
| Qwen 3.8 Flash Next, mlx-q6g32 | Metal | Served through the same server straight from its checkpoint, one reply at a time, with prompt reuse between requests. It builds its weight packs on the first load and needs no recorded dump. Also served from two Macs at once in [speed-up mode](docs/speed-up-mode.md). |
|
||||
| Qwen 3.8 Flash Next, mlx-q6g32 | Metal | Served through the same server straight from its checkpoint, one reply at a time, with prompt reuse between requests. It builds its weight packs on the first load and needs no recorded dump. Also served from two Macs at once in [speed-up mode](speed-up-mode.md). |
|
||||
| Nemotron 3.5 Lightning 30B-A3B | CUDA, NVIDIA GB10 (DGX Spark) | `tensorfold run` from the command line. Token-identical to the Python engine on 16 of 16 runs. Speed about level with the Python engine. Not wired into the server yet. |
|
||||
| Qwen3.5-2B, pinned MLX affine 4-bit/group-64 checkpoint | Metal, Apple M5 Max | Text generation through the native server and lane core, with shared tied embeddings. [Recipe, scope and verification](docs/recipes/qwen3.5-2b-native.md). M1–M4 untested for this model. |
|
||||
| Qwen3.5-2B, pinned MLX affine 4-bit/group-64 checkpoint | Metal, Apple M5 Max | Text generation through the native server and lane core, with shared tied embeddings. [Recipe, scope and verification](recipes/qwen3.5-2b-native.md). M1–M4 untested for this model. |
|
||||
| Kimi K3 | Metal, several Macs over Thunderbolt | Research code for multi-Mac tensor parallelism (`zig/src/families/kimi_k3`, `zig/src/cluster`). Not ready for testing. |
|
||||
|
||||
## Speed so far
|
||||
@@ -60,7 +60,7 @@ Then point any OpenAI-compatible client at `http://127.0.0.1:8090/v1`. Add `--pa
|
||||
|
||||
Flash Next is the same `serve` command on a qwen4_exp checkpoint in mlx-q6g32, with no dump folder or environment variable. The host has one lane, so `--parallel` does not run two Flash Next replies at once. The memory kept for earlier prompts' states defaults to what 70% of RAM leaves past the loaded server, less 2 GiB, up to 16 GiB; `--prompt-cache-gib` sets another size up to that room, and `0` turns it off. `--learn` keeps shared prefixes (a system prompt and its tools) on disk as well, under `~/.cache/tensorfold/learned` by default, keyed by the checkpoint, the kernel sources, the chip and OS build and a startup probe's bits, so a fresh server, or an upgrade that computes the same bits, resumes them without reading them again. On one Mac for now: a speed-up pair refuses it.
|
||||
|
||||
To serve Flash Next from two Macs at once, each holding the whole model, see [speed-up mode](docs/speed-up-mode.md).
|
||||
To serve Flash Next from two Macs at once, each holding the whole model, see [speed-up mode](speed-up-mode.md).
|
||||
|
||||
The GLM-5.3-Flash engine's standalone path (the `tf-glm-run` tool, and any host that loads the GLM engine directly)
|
||||
reads `GLM_SAMPLING=seed,temperature,top_k,top_p,min_p`: a seeded draw replaces the greedy-only refusal the family
|
||||
@@ -84,7 +84,7 @@ because a correct full-vocabulary draw needs both Macs' logits; greedy peer exec
|
||||
1. **Exactness on M1 to M4** (`zig/kernels/metal`). Prompt kernels and Nemotron window attention already use the simdgroup-matrix layout and are checked at load. The remaining kernels still need the per-kernel sweep: one row alone against the same row inside a 2-, 3- and 8-row window, then fix the kernel whose bits move.
|
||||
2. **More than 128 rows per forward** (`zig/src/native/metal.zig`, `batch_rows`; `zig/src/families/nemotron/state.zig`, `max_rows`). A shared round holds four rows a lane up to 128 now, which is what 64 sessions need. Past that, each row costs a Mamba state slot (47 MiB across the model's 23 Mamba layers) and the expert kernels' cost per row keeps climbing (item 3), so 128+ sessions, and wider windows for one stream, need both looked at together.
|
||||
3. **Cheaper extra lanes** (`zig/kernels/metal/nemotron_experts.metal`). Past 16 lanes the routed-expert kernel falls below the memory line: it streams unique expert weights at about 1 TB/s up to 8 rows, 730 GB/s at 32 and 540 GB/s at 64. `tf_experts_w` (a 16-group's weight words as the outer loop, three members a pass, four simdgroups) took 6% off at 32 rows and 10% at 64, bit for bit. The rest of the gap is per-member work that the weight stream does not hide; a change that keeps each lane's summation order is allowed, and `tf-nemotron-experts` bit-checks and times a candidate at every width.
|
||||
4. **New model families** (`zig/src/families`). Qwen 3.8 Flash Next is served on Metal. Each new family follows the Nemotron layout: a weight loader, kernels checked op by op against the Python engine, a full forward whose tokens match it, then the lanes. [Adding a Zig family](docs/recipes/adding-a-zig-family.md) has the steps in order, what each one gained, and which code owns it.
|
||||
4. **New model families** (`zig/src/families`). Qwen 3.8 Flash Next is served on Metal. Each new family follows the Nemotron layout: a weight loader, kernels checked op by op against the Python engine, a full forward whose tokens match it, then the lanes. [Adding a Zig family](recipes/adding-a-zig-family.md) has the steps in order, what each one gained, and which code owns it.
|
||||
5. **The CUDA backend** (`zig/src/cuda`, `zig/build/cuda.zig`). Nemotron serves on a GB10, an RTX 3090 and an RTX PRO 6000. The next step is more families.
|
||||
6. **One-pass drafting** (experimental, `--block-lanes`). The draft head can fill every lane in one pass instead of level by level. The engine side is in, but the placeholder lanes need trained rows before they land tokens.
|
||||
|
||||
Reference in New Issue
Block a user