TensorFold v1.3.7

TensorFold is an open-source local AI inference engine designed to run large language models directly on personal computers and GPU servers. Developed primarily in Zig, it provides native GPU execution through Metal on Apple Silicon and CUDA on NVIDIA hardware, without requiring a Python or MLX installation to serve models.

Unlike tools that simply wrap existing inference frameworks, TensorFold implements its own model execution and GPU kernels. It also provides an API server compatible with popular AI clients, making it possible to use locally hosted models with applications designed for OpenAI or Anthropic services.

The project goes beyond basic model inference by including a desktop workspace, web interface, model management tools, and experimental capabilities for modifying model weights while running.

Features

Native Local LLM Inference

TensorFold runs language models directly on supported hardware using native GPU backends.

Its main advantages include:

  • Metal acceleration for Apple Silicon.

  • CUDA acceleration for NVIDIA GPUs.

  • Native HIP support for selected AMD hardware.

  • Direct model checkpoint loading and tokenization.

  • No Python or MLX installation required for native serving.

  • Configurable context length and generation parameters.

  • Support for concurrent inference requests.

The engine is designed to make local inference more accessible without requiring users to maintain a complicated Python-based machine learning environment.

Hardware support varies by backend and model architecture. Not every model is compatible with every GPU, so users should consult the project's model compatibility information before downloading large checkpoints.

Model Management

TensorFold includes commands for downloading and managing models from Hugging Face and other supported sources.

For example, users can download a model and start an inference server with:

tensorfold pull mlx-community/Qwen3.5-2B-MLX-4bit
tensorfold serve mlx-community/Qwen3.5-2B-MLX-4bit --name local-model

The application also supports existing local checkpoint directories and models already present in the Hugging Face cache.

Model configuration options include context length, maximum output tokens, temperature, sampling parameters, and reasoning settings. This provides flexibility when adapting a model for coding, chat, document processing, or other workloads.

An important consideration is that model weights have their own licenses. TensorFold's Apache 2.0 license does not automatically grant permission to use every model distributed through external repositories.

OpenAI and Anthropic-Compatible API

One of TensorFold's most useful features is its local API server.

It supports several popular API formats, including:

  • OpenAI Chat Completions.

  • OpenAI Responses API.

  • OpenAI Completions.

  • Anthropic Messages API.

This allows compatible applications to communicate with locally hosted models instead of relying on cloud AI providers.

For example, after starting the server, users can test it with:

curl http://127.0.0.1:8080/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "local-model",
    "messages": [
      {
        "role": "user",
        "content": "Explain how local LLM inference works."
      }
    ],
    "max_tokens": 256
  }'

The default server address is 127.0.0.1:8080. Authentication options are available for deployments that need API access control.

This compatibility makes TensorFold useful for integrating local models with coding assistants, chat interfaces, and other applications that already support standard AI APIs.

Concurrent Requests and Performance Controls

TensorFold includes controls for managing inference workloads and available GPU memory.

Its serving configuration supports:

  • Parallel inference requests.

  • Automatic concurrency selection.

  • Request queuing.

  • Context-length limits.

  • Prompt caching.

  • Maximum output token limits.

  • Sampling and reasoning configuration.

  • Memory diagnostics.

The automatic parallelism option attempts to determine how many requests can run concurrently based on available resources. Explicit concurrency limits are also supported.

Prompt caching can reduce repeated processing when conversations share common prefixes. Additional options allow users to control memory allocation and retained prompt data.

These features are particularly useful when operating a local inference server for multiple applications or users.

TensorFold Desktop Workspace

TensorFold also provides a desktop application for managing local AI workloads.

The workspace combines several functions:

  • Local model discovery and downloads.

  • Model execution and chat.

  • Hardware recommendations.

  • Live generation metrics.

  • Coding agent management.

  • Document editing.

  • Local inference management.

This provides a more approachable interface for users who prefer graphical applications over terminal-based workflows.

The macOS desktop application is distributed as an Apple Silicon beta. Its mobile clients remain preview software, so users should not expect the same maturity as the native inference engine.

TensorFold Web

For users who prefer a browser interface, TensorFold includes a local web application.

It provides a graphical environment for selecting models, running inference, and chatting with locally hosted models.

The web interface complements the command-line server and desktop application, giving users another way to interact with their local AI environment.

AI Coding Workers

TensorFold's desktop workspace also includes coding workers designed to assist with development tasks.

This extends the application beyond conventional chat-based inference. Users can manage coding-oriented workflows alongside their local models and documents.

The desktop workspace is still evolving, so its agent functionality should be evaluated separately from the more established inference engine.

Living Weights

One of TensorFold's more experimental capabilities is Living Weights.

Instead of keeping newly learned information exclusively in an external database or conversation history, this feature attempts to write selected facts directly into a model's checkpoint files.

Users can provide information through a dedicated API endpoint, and TensorFold processes the material as lessons that modify the model's weights.

The project also provides a 3D visualization interface showing learned facts and their associated model components.

However, Living Weights is explicitly experimental. The project documents limitations involving interference between related facts, declining recall after learning multiple facts, and reduced decoding performance on some hardware.

It is an interesting research feature, but it should not be considered a replacement for established retrieval-augmented generation systems or a reliable persistent memory solution.

Download TensorFold v1.3.7 - Software Mirrors

TensorFold v1.3.7 for macOS

tensorfold-engine-1.3.7-darwin-arm64-metal.tar.gz | 8.87 MB

tensorfold-1.3.7-macos-arm64.tar.gz | 8.9 MB

TensorFold v1.3.7 for Linux

tensorfold-1.3.7-linux-x86_64.tar.gz | 62.08 MB

tensorfold-1.3.7-linux-aarch64.tar.gz | 61.49 MB

TensorFold v1.3.7 Source Code

TensorFold v1.3.7 Source code (zip)

TensorFold v1.3.7 Source code (tar.gz)

TensorFold v1.3.7 Release Notes:

TensorFold 1.3.7

Upgrade from 1.3.6 for the Metal library-load fixes: Metal libraries that failed to load on macOS 27.0 compilers load again, including Inkling 2 Mini's runtime library and rewritten Flash Next libraries. CUDA also fixes Qwen FP8 KV ordering: the FP8 RoPE kernel now starts after its head norms finish, and --kv-cache fp8 gives identical tokens with the default TF_QWEN_PDL on and with it off (#5376, #5405, #5303; #5353, fixes #5308).

Fixes and changes you may notice

  • Metal library loading: source rewriters no longer add a second threadgroup-size attribute, which made the M5 compiler refuse whole libraries. Inkling 2 and LFM2 generated libraries guard against repeated or conflicting reservations, and the checked Inkling sources have one module owner. This covers Flash Next's SSD 4-bit group-32 prompt path among the affected libraries (#5376, #5405). Inkling 2 Mini's runtime convolution kernels also declare their threadgroup size once, so that runtime library loads again on current Metal compilers after failing with LibraryLoad since #4593 (#5303).
  • CUDA dependent launches: a host guard now rejects each enumerated programmatic dependent launch of a kernel that lacks its dependency wait. DeepSeek's generic x3ld kernels now wait first (#5381, after #5308).
  • Flash Next on CUDA: TF_FLASHNEXT_PREFILL_MTP_LEAN=1 no longer fails prompts over about 1,400 tokens; lean prefill pieces fit the MTP scratch while wide pieces remain where they fit (#5358, fixes #5332). Greedy drafts beside another open stream now use TF_FLASHNEXT_CONFIDENCE, the same stop rule as a lone stream, with token verification unchanged (#5265). TP=2 decode stages graph inputs before capture and every replay and frees the graph before aborting NCCL (#5222, fixes #2974). Expert residency caps now follow the selected GPU instead of device 0 (#5221, fixes #4952).
  • Checkpoint and pack validation: loading refuses a sharded checkpoint whose index disagrees with its shard headers. A Flash Next pack without a recorded source, made before 1.0, is refused with the command that rebuilds it, and saved prompt state is keyed to the TFQ3 tables the loaders already check. No additional weight bytes are read at load (#5306).
  • Inkling 2 Mini draft memory: window fitting now prices each drafted token at its own bytes. A 64 GB limit holds the whole draft window for eight streams, with every output bit unchanged (#4622).
  • Prompt-cache pressure reporting: when memory pressure stops the cache keeping new states, request logs explain that and /memory reports prompt_cache_keeping_new_states and prompt_cache_hold_reason. Warnings occur once per pressure episode, remind every 60 seconds, and report when the condition clears. What is kept, shed and resumed is unchanged (#5312, refs #5272).
  • GLM fixes: GLM-5.3-Flash TFQ3 Metal row signs now come from each tensor's absolute row, with fused runs retaining their recorded boundaries on every prompt path; the published checkpoint's replies are unchanged (#5225). On CUDA, layer read-ahead uses the checkpoint's model prefix, fixing full GLM/DSA without changing Flash spans (#5264, refs #5256).
  • Desktop development builds: macOS ARM64 builds stage engine 1.2.8 instead of 1.1.0, so tool calls reach Desktop as structured calls rather than chat text (#4545).

Speed

  • Idol native preprocessing and background removal: in the cited Metal/SDK comparison, FP32 BiRefNet takes 0.172 seconds versus the SDK's 0.48–0.52 seconds. Its logits are within torch's own distance from a float64 ruler; Pillow resizes, erosion, crop and paste are byte-for-byte equal, and the preprocessed picture differs from the SDK's in two pixels by one. Generation from a photo takes 30.1 seconds versus 101.3 seconds, with a 2.77 GB peak footprint versus 12.88 GB (#1787, after #1780, for #1757).
  • Inkling 2 Mini router and gate passes on Metal: vectorized router/gate passes and a direct ungated all-reduce make decode about 1% faster on M3 and M5 Ultra, with tokens unchanged (#5207, refs #5191).
  • Inkling 2 Mini on M5 Ultra: the register-tiled dense BF16 kernel computes the same rows in the same order and fills a 2K-token prompt 5.7–7.3% faster, with tokens unchanged (#5201, refs #5191).
  • Inkling 2 Mini on M3 Ultra: 3:1 GQA decode and verification read each key/value head once for its three query heads, and multi-stream attention batches shared descriptors. Four-stream decode is 12–14% faster and a 2K-token prompt is 6% faster, with tokens unchanged (#5206, refs #5191).
  • Inkling 2 on M3 Ultra: each gated-attention layer runs its K and V short convolutions in one dispatch. Decode is about 1–2% faster, with tokens unchanged (#5004).

Exact execution and drafting

  • Inkling 2 Mini on Metal: single-stream multi-row sliding-window attention stages K/V tiles while preserving scalar key order, BF16 roundings and FP32 accumulation; partials and replies remain bit-identical (#5138). The fused AR, loop and convolution steps run in one command buffer with every output bit unchanged (#4593).
  • Qwen3.5 drafting on CUDA: a batch mixing narrow and wide DFlash2/DSpine heads runs as one head launch per width and returns to the original stream order, with every token unchanged (#4439).
  • Qwen vision on CUDA: shared K/V tiles are stored as BF16 and widened to FP32 at use, with outputs byte-identical to before (#5239, refs #3143).
  • Dory on CUDA: decode rows issue q, k, v and g in one grouped NVFP4 launch and gate/up in another, replacing four and two launches. Each part's bytes and prompt rows are unchanged. The six tf_qmmf_many* symbols are looked up at load, so the fatbin must be rebuilt (#3131, closes #3118).
  • Inkling 2 CUDA drafting: DSpark kernels draft every open stream in one pass with byte-identical drafted output (#4858). Inkling 2 Small also gains DSpark drafter kernels with byte-identical output, and the shared expert planner skips out-of-range expert IDs (#4128).

New opt-in switches and controls

  • TF_Q35_DFLASH_TRACE=PATH: writes one JSONL record per Qwen3.5-family CUDA DFlash round, including the scorer's exact grow priorities, to replay later with tools/dflash_replay.py. It is off by default; unset serving is unchanged (#5253).
  • serve --execution-witness: attests the Qwen3.8-27B-class Metal engine for the 9B and 27B MLX 4-bit checkpoints by hashing the Metal libraries built at load. Replies are unchanged, and nothing changes with the flag off (#5184).
  • --confidential: refuses at startup every flag and variable that keeps or sends request content and turns core dumps off. This is the startup slice; stored Responses follow separately (#5180, refs #5176).
  • Inkling 2 Mini GPU token draws: opt-in GPU sampling uses bit-exact f32 sampling and argmax with asynchronous decode. Default host sampling remains unchanged (#5153).
  • Inkling 2 Mini DSpark draft head: an opt-in, draft-only 4-bit/64 copy of the output head is available for DSpark drafting only. DFlash 2 drafting still uses the full head, target verification keeps the original head, and default output is unchanged (#5020).
  • GLM-5.3-Flash on one Mac: an MTP load without a stored draft head can synthesize an in-memory 4-bit/64 draft head from an 8-bit/64 LM head when the budget allows. Target verification still uses the original head (#4253).
  • TF_CUDA_SCHED=blocking: selects how a served CUDA model's host thread waits for its GPU; auto, spin and yield are also available. Blocking is off by default. It frees the core the driver's default spins on a GB10, with identical tokens and pictures; Inkling 2 Mini decode is about 2% slower (#5165).
  • TF_NEMOTRON_METAL_KV_PAGES=1: on pre-M5 Metal, drafted verification computes attention one row at a time, as plain decoding does, so drafted output stays byte-identical to plain. Contracts compare every output byte, including NaN payloads (#5267, refs #5223).
  • Inkling 2 Mini --drafter: accepts a DFlash 2 drafter, with drafted output byte-identical to plain decoding (#4917).
  • serve --listen-fd N: serves on the Unix socket supplied by the parent process, only to that process, taking the socket once before model loading (#5183, refs #5175).

Models, platforms and guides

  • Hy4-flash CUDA: FP8 Engram kernels arrive with contract gates, controls and five-SM launch limits (#5087, slice 2b of #4795). The Top-16 router, BF16 row helpers and DFly2 glue also arrive with byte-exact MLA comparisons and full contract coverage (#5099).
  • CUDA GPTQ: an int4 W4A16 kernel serves group-128 routed experts and the LM head (#4183).
  • Idol native input: tf-idol-generate accepts raw PNG, JPEG and WebP photos, with --mode synthetic|real and --crop-margin X. It writes preprocessed.png and adds preprocess_s and birefnet_s to its JSON (#1787, after #1780, for #1757).
  • DeepSeek-V4.1 on Metal: EXL3 routed experts run with exact up and down kernels. A short descriptor table is refused before launch, and planted controls cover both kernels (#5063).
  • Linux CUDA archives: Thor (sm_110) SASS is included, and Qwen3.8-27B-only admission rules apply when serving on Thor (#5053).
  • Kolibri 1.1 on CUDA: kolibri1_1 serves up to 2,048 tokens exactly. Capabilities, model information and managed benchmarks list every CUDA-only alias with its family's formats (#4941, refs #4846).
  • Qwen guides and receipts: the pinned Qwen3.5-2B quick start stays first, the managed-choice alternative asks before downloading, and Windows points to its guide (#5349). The recipe and supported-model table record an RTX A4500 (sm_86) receipt for the pinned MLX 4-bit checkpoint with the 1.3.5 archive, including what it measured and what remains unqualified (#5315).

Groundwork and shared code

  • Shared TFQ3 and Drama 3 data: TFQ3 records and wire constants now live in one shared copy used by every backend, with layouts, constants and output unchanged (#5281). Drama 3 CUDA and Metal take weight names, shapes and load order from one shared map while retaining backend-specific loaders and unchanged loaded weights (#5257, refs #4860).
  • ERNIE 5.5 CUDA groundwork: tf_ernie55_multimax runs the head's FP32 logits in a new ernie5_5_head image, rounding each step once in vendor order under a host-replay kernel contract. Nothing launches it yet, so served output is unchanged (#5202, part of #4926).
  • Metal shader sharing: legacy and current row-projection sources share helpers and 60 narrow indexed instances while keeping compiled shader sources byte-identical (#5205, refs #2251). Step-5, MiniMax-M3 and Spark2.5 embeddings share one affine-quantized-row macro while retaining identical compiler-visible tokens (#5203, refs #2251).
  • CUDA router tiles: shared router tiles read each 16-byte shared-memory row as four 32-bit words. Measured GB10 and x86-64 builds with nvcc 13.0.88 and 13.3.73 produced one PTX form for the affected router kernels and control; images, register counts and outputs are unchanged (#5360, refs #5123, #5157).

Documentation, tooling and tests

  • Environment registry and documentation: computed trace lookups, two new variables and names refused by --confidential are registered, so the environment-names check passes again (#5373). Thirty more settings read through the registry with the same accepted values, reducing the lean count from 123 to 93 (#5188). docs/environment-names.md now lists variables found from actual Zig lookups, scoped by build and tagged for disk writes, request-content logging and library loads, with CI keeping it complete (#5182).
  • Qualification tools: a new device check compares drafted and plain output under seeded sampling on Metal and CUDA for release and PR qualification (#5249). The --listen-fd test treats a connection closed before a request is sent as refused, removing that race from the suite (#5273, refs #5183).
  • CUDA sparse-attention tests: a third contract case covers one query head per key head, a negative key count, a duplicate across a tile edge and unnamed entries in a nonfinite replay. This is test-only (#5242, follow-up to #5166).
  • Maintainability and housekeeping: pr_check refuses new cross-family imports beside its import-cycle ratchet; today's edges may only shrink, with qwen3 to llama allowed (#5233, fixes #4804). Changelog housekeeping restores #4907's number and Unreleased placement, removes repeated #4918/#4931/#5003 bullets, and credits #5042's author (#5196).

Release reads

Release-tip reads against 1.3.6 found identical tokens in every cell. On an M5 Ultra (Metal), Inkling 2 Mini fills 2K and 8K prompts 23% faster and decodes 3-6% faster; Flash Next is flat at one stream and 2-3% faster at four; Qwen3.8-27B is flat, with and without its DFlash 2 drafter. On a GB10 (CUDA), Qwen3.8-27B and Flash Next NVFP4 are flat (Flash Next's 64K prompt is 3.7% faster), and GLM-5.3-Flash NVFP4 at TP=2 on two GB10s stays within 0.7% at one and two streams, with no unequal streams. Qwen3.8-27B on Strix Halo (HIP) is flat. Metal was read on an M5 Ultra only; no M3 Ultra or other pre-M5 Mac was reachable for this release. Known issue: on a GB10, Qwen3.8-27B with its DFlash 2 drafter runs about 2% slower at four greedy streams than in 1.3.6. Batches whose streams use different draft widths now run without the CUDA graph (#4439). Tokens are unchanged, and one stream and sampled runs are not affected. 1.3.8 restores the graph path for those batches.

Thanks

Thank you to @AlexanderYW, @BadAd84, @Bizuayeu, @BlivionIaG, @GrgaPalcic, @jayleaton, @ZackSample, @ajensenwaud, @cwschroeder, @gilby, @jschmied, @jojomondag, @kotevcode, @mvanhorn, @sethforprivacy, @tacosta and @yguanrong for the fixes, features, measurements and reports behind this release.

Performance and Compatibility

TensorFold is built with Zig and uses native GPU execution rather than depending on a Python-based inference stack for its serving engine.

This architecture reduces the number of runtime dependencies and gives the project direct control over model execution, memory management, and GPU kernels.

Performance depends on the model architecture, quantization format, GPU memory, context length, and available hardware acceleration.

Apple Silicon: TensorFold uses Metal for GPU execution on supported Apple Silicon Macs. Unified memory can be useful when running larger models, although the available memory must accommodate model weights, context data, and concurrent requests.

NVIDIA GPUs: The Linux release supports CUDA-based inference. Its documented Linux release requirements include an NVIDIA driver version R580 or newer and CUDA 13.0 compatibility. Supported GPU architectures and model combinations vary.

AMD GPUs: Native HIP support is available for selected hardware and models. The project documents specific qualification results rather than guaranteeing compatibility with every AMD graphics card.

The project also advertises Vulkan support, but users should verify the actual backend and model compatibility for their target hardware rather than assuming every advertised backend supports every model.

TensorFold supports Linux and macOS for its documented native workflows, with additional Windows support through its native Windows build documentation.

System Requirements

macOS

  • Apple Silicon Mac.

  • Compatible Metal GPU support.

  • Sufficient unified memory for the selected model.

  • Homebrew for the recommended installation method.

Linux

  • 64-bit Linux system.

  • glibc 2.28 or newer for the documented NVIDIA release archives.

  • NVIDIA GPU and R580-or-newer driver for the documented CUDA release.

  • CUDA 13.0-compatible runtime environment.

  • Sufficient GPU or unified memory for the selected model.

Windows

  • Supported Windows environment.

  • Compatible NVIDIA GPU and driver for the CUDA workflow.

  • Follow the project's native Windows build and installation documentation.

There is no universal minimum RAM requirement because memory consumption depends heavily on the model, quantization, context size, and concurrency settings.

Pros and Cons

Pros

  • Free and open-source under Apache 2.0.

  • Native inference engine written in Zig.

  • Metal acceleration for Apple Silicon.

  • CUDA support for NVIDIA GPUs.

  • Native HIP support for selected AMD hardware.

  • Does not require Python or MLX for native serving.

  • Supports OpenAI-compatible and Anthropic-compatible APIs.

  • Includes model downloading and management.

  • Supports concurrent requests and prompt caching.

  • Provides desktop and browser-based interfaces.

  • Includes performance diagnostics and memory controls.

  • Experimental Living Weights functionality.

Cons

  • Hardware and model compatibility vary considerably.

  • NVIDIA Linux releases require a relatively recent driver.

  • Large models require substantial memory.

  • Some desktop and mobile functionality remains in beta or preview.

  • Living Weights is experimental and has documented limitations.

  • The project has a learning curve for users unfamiliar with local LLM deployment.

  • Not every model available through Hugging Face is compatible with its native engine.

How to Install

macOS

The recommended installation method for Apple Silicon is Homebrew:

brew install ashhart/tensorfold/tensorfold

Download a model and start the server:

tensorfold pull mlx-community/Qwen3.5-2B-MLX-4bit

tensorfold serve mlx-community/Qwen3.5-2B-MLX-4bit \
  --name local-model \
  --context 8192 \
  --no-thinking

Linux with NVIDIA GPU

Download the appropriate release archive for your CPU architecture. The project provides separate archives for x86_64 and ARM64 systems.

For example:

V=1.2.8

curl -fLO "https://github.com/ashhart/TensorFold/releases/download/v$V/tensorfold-$V-linux-x86_64.tar.gz"

tar -xzf "tensorfold-$V-linux-x86_64.tar.gz"

export PATH="$PWD/tensorfold-$V-linux-x86_64/bin:$PATH"

Download a compatible model and start inference:

tensorfold pull mlx-community/Qwen3.5-2B-MLX-4bit

tensorfold serve mlx-community/Qwen3.5-2B-MLX-4bit \
  --name local-model \
  --context 8192 \
  --no-thinking

Check the latest release instructions before installation because package names, supported architectures, and hardware requirements can change.

Verify the Installation

After starting the server, open another terminal and test the API:

curl -fsS http://127.0.0.1:8080/v1/models

The command should return the models currently available through the running server.

For additional options, use:

tensorfold --help
tensorfold capabilities --json
tensorfold serve --help

Final Verdict

TensorFold is an ambitious local AI inference project that combines a native Zig engine, GPU acceleration, model management, and API compatibility in one ecosystem. Its ability to serve local language models without requiring Python or MLX is a major advantage for users who want a more self-contained inference environment.

The OpenAI and Anthropic-compatible APIs make it practical for integrating local models with existing applications, while its desktop and web interfaces provide alternatives to command-line operation. Advanced features such as prompt caching, concurrency controls, and memory diagnostics also make it interesting for more demanding inference workloads.

Its main limitation is hardware and model compatibility. Users must verify that their GPU, driver, and chosen checkpoint are supported before expecting good results. The desktop application and Living Weights feature also have different maturity levels from the core inference engine.

Overall, TensorFold is a promising choice for developers and enthusiasts who want to run local LLMs with native GPU acceleration and a flexible API server.

Sources


TensorFold v1.3.7
Free
Software Informations:
Developer:

Operating System:
macOS / Linux
Date Added:
2026-11-28T00:07:17.239Z
Categories:

Post a Comment/Report Broken Link: