Skip to content

By PromptFission2 min read

TensorFold serves LLMs from a Zig binary and only keeps drafts it would have written anyway

An Apache 2.0 inference engine for Macs and NVIDIA GPUs with a strict rule for speculative decoding, and an experimental mode that writes facts into the weights.


TensorFold is an inference engine that serves language models from a single native binary written in Zig, on Apple Silicon through Metal and on NVIDIA GPUs through CUDA. The README says serving needs no Python or MLX installation. It was on GitHub’s trending page today, and two things in it caught our eye: a hard rule about what a speed trick is allowed to change, and an experimental feature that edits a model’s weights from a conversation.

How it works

The binary reads checkpoints, tokenizes requests, and runs the GPU kernels itself. It exposes OpenAI-style and Anthropic Messages APIs. Some conversion steps for particular models still need Python, the README notes.

Most of the speed work is speculative decoding. A small, cheap drafter guesses several tokens ahead, and the big model checks the guesses in one pass. TensorFold uses external drafters and draft heads that ship with some models, depending on the checkpoint.

The rule is what makes it interesting. In the README’s words: “Every accepted draft must equal the token the same native engine would produce” with drafting off. A resumed request has to match a fresh run, and each stream in a batch has to match the same stream run alone. A --no-drafts flag produces the plain reference through the same engine, so the claim can be checked. The README is careful about scope: the comparison holds the checkpoint, backend, and settings fixed, and different quantizations can still give different outputs.

Living Weights

The stranger feature is marked experimental. Start a Nemotron 3.5 Lightning server with --slide, post lessons to it, and each fact that passes the lesson’s checks is written into the checkpoint’s files. A document is split into facts and learned one at a time.

The README tells you to teach a copy, never the original. The server keeps a hidden snapshot of the original files before the first lesson, and tensorfold slide rollback undoes every lesson.

The limits are listed plainly. Related facts can disturb each other. Recall drops past a few dozen facts, and more with thinking on. Learned facts cost some decode speed on a Mac.

Where it stops

The supported list is per model and per machine, with pinned revisions, and the gaps are stated: DeepSeek checkpoints are not served by any release binary yet, and some models remain Python-only. The README gives no tokens-per-second figures. The release notes do, for single cases: version 1.2.8, dated 13 Nov, reports one copy-heavy greedy reply on Qwen3.8-27B going from 241 to about 792 tokens per second. That is the project’s own number for a favorable case.

Try it yourself

The repo is Apache 2.0, under the GitHub account ashhart, with a long list of credited contributors. On a Mac the README’s install is:

brew install ashhart/tensorfold/tensorfold

Linux needs glibc 2.28 or newer and an NVIDIA driver at R580 or newer, using a release archive. Building from source needs Zig 0.17.0 and, on a Mac, full Xcode.

We have not installed or run TensorFold; this is based on the README and the releases page.