Skip to content

TensorFold 1.3.0

Choose a tag to compare

@ashhart ashhart released this 19 Nov 23:04
· 2190 commits to main since this release

TensorFold 1.3.0

1.3.0 brings faster DeepSeek-V4.1 prompts on Metal, faster NVFP4 and GLM decode on CUDA, and lazy Flash Next KV pages that leave more memory free after load. It adds a first host-only gpt-oss slice, Idol's denoiser on CUDA and Metal, Ling-3.0-tiny's MLA on Metal, XPU peer-to-peer collectives, a server request journal and several new CLI and app features. Every speedup below keeps replies unchanged; the faster follow-up turns and the NVFP4 figure are the only ones that change measured timing, not tokens.

Speed

  • DeepSeek-V4.1 on Metal: the prompt attention kernel widens bf16 keys through bfloat and lets two heads share one load of each key, with the per-key arithmetic unchanged, about 1.5x faster with the same output bits (#3351).
  • Qwen3.8-27B on Metal: on Macs with tensor units (M5), drafted decode runs two 16-row query tiles in each prefix-attention threadgroup instead of up to six, with the same kernel and tokens; Macs without tensor units keep six on a long cache and four otherwise (#3704).
  • Flash Next on CUDA: with TF_FLASHNEXT_KV_PAGES on Linux, the page pool maps its 256 MiB pieces as streams reach them and a helper thread maps the next ones between requests, so more memory stays free after load; replies are unchanged, and without the flag or on other systems nothing changes (#3066).
  • HIP on RDNA3.5: routed MoE plan buffers (moe.planRows) are sized to the exact window row count instead of the 16-row bucket, and rising added-row window costs are pooled within four-row tile steps (costs.poolWindowRows), with no kernel or output token changes (#3774).
  • CUDA: the one-launch path for two to four affine-4 prompt projections (tf_qmm_prefill_many) works out each thread's copy addresses once before the K loop; the copies, their order and the math are unchanged (#2825).
  • DeepSeek-V4.1 on Metal: with TF_DSV41_PREFILL_PIECES=1, TENSORFOLD_PREFILL_ORDER=srpt, a prompt policy (share or budget) or --decode-share, a prompt runs a chunk at a time between the other streams' rounds so a short request no longer waits behind a long one; with none set, prompts run whole as before (#2950, refs #2984).
  • GLM-5.3-Flash on Metal: prompt index scores read each row's queries once per tile and routed-expert gathers load the next step's codes ahead, so follow-up turns reach the first token 3-4% sooner with unchanged outputs (#3458).
  • CUDA (NVFP4 experts): expert decode streams weights through a per-warp cp.async ring with the same output bits; on an RTX PRO 6000 (sm_120) with drafts off the author measured GLM-5.3 at 104.1 tok/s against 83.8 (up to 24% faster), and on GB10 (sm_121) it is level (#2266).
  • GLM on CUDA: TF_GLM_L2PF site f also prefetches a MoE layer's shared expert gate-up after its router within the same TF_GLM_L2PF_MB budget, about 1.0-1.2% faster decode at TP=2 on GB10 (mean of three alternating launches) with identical tokens (#3156).
  • Flash Next on CUDA: after load, a mixed shard keeps only the n-gram table's pages in the page cache and the final sweep reaches shards nested under tensors/, freeing about 3 GiB of page cache on the NVFP4 export with replies unchanged (#3467).

New

  • CLI: tensorfold models lists the chat checkpoints from the supported-models guide that fit this machine, largest first, with the memory each needs, a quality score from TensorFold Web's quality suite (receipts in docs/receipts/quality-suite) and a rough one-stream speed; --all adds the rest, --json adds machine and catalog to schema 1, and cached checkpoints follow as before (#3483).
  • gpt-oss: a first host-only slice reads openai/gpt-oss-20b's config, refuses unknown or unsupported fields by name, checks all 459 tensor names of the published checkpoint and adds an MXFP4 reader for 32-value E2M1 blocks with UE8M0 scales that never rewrites checkpoint bytes; nothing is registered with the server yet (#3513).
  • Templates: str.format() renders positional fields ({}, {N}) and the {{ }} escapes as Python does, while signed or underscored indexes, keyword, attribute, conversion and spec fields are refused by name (#3816, refs #3801).
  • Qwen3.8-27B on XPU: a sampled row with top_k from 1 to 64, a temperature above 0 and no grammar mask draws from its top_k largest logits kept on the card instead of copying the whole row to the host, with the same tokens for the same seed (#3340, lands #2895).
  • dots.mocr on CUDA: the image tower (42 blocks and the 2x2 merger) is built but not yet served, so --vision stays refused and replies are unchanged; two GB10 runner commands check it, tf-cuda-test dots-image and dots-stages (#2770, refs #1927).
  • Model configs: Qwen 3.5 on CUDA and HIP and Qwen3.8-27B on Metal read their config fields through one typed reader and named end-of-sequence policies, with the same refusals and stop sets as before; a refused field now logs the file and field it came from (#3716, for #2460).
  • Core prompt cache: the radix store can keep a checkpoint inside a page as a writable tail, a store-held copy of that page's rows that is never written again; no family turns tails on yet, so every current store behaves as before (#3329, part of #2444).
  • Inkling 2 Small: a host-only family package reads its config, checkpoint names and chat template and checks them against fixtures from the published release; nothing serves it yet (#3578, refs #3476).
  • Intel Arc (XPU): two or four Level Zero GPUs open as peers in one context with new peer-to-peer all-reduce collectives (FP16, BF16 and FP32; one shot up to 512 KiB, reduce-scatter then gather above) that sum in fixed rank order for exact bits, and zig build xpu-tp-bench builds tf-xpu-tp-bench to check and time them; nothing serves through them yet (#3585, part of #3583).
  • tensorfold info on Metal: tensorfold info MODEL [--context N] [--parallel N|auto] prints the startup budget serve charges a Qwen3.8-27B-class checkpoint (weights, each stream's KV and state, the prompt scratch; no drafter or images) and whether it fits this Mac's Metal working set beside the 8 GiB margin, in place of a memory floor that ignored the context; info also copies model_type out of the parse before freeing it (#3268, refs #2761).
  • Nemotron on HIP: a checkpoint whose token table (backbone.embeddings) is stored bf16 beside quantized matrices, marked false in config.json's quantization block or stored without scales, is admitted and loads, with rows gathered as stored, the memory plan counting stored bytes and the startup label adding +bf16-embed; a bf16 lm_head, projection or other unquantized tensor is still refused by name (#3575, refs #3061).
  • Idol on CUDA: tf-idol runs Idol's denoiser on GB10 (sm_121) and on RTX 50-series and RTX PRO Blackwell (sm_120) cards against a reference case, gated step by step against idol-sdk's float32 run as on Metal, and refuses other GPUs by name (#1767, for #1757).
  • Families: Nemotron, GLM, Qwen 3.8 27B, MiniMax M3, Dory, tensor-parallel fabric, pictures and video settings read through platform/environment.zig (#3558).
  • Idol on Metal: Idol's released denoiser runs as a native Metal family, idol, with fp16 block projections and attention inputs summed in fp32 and fp32 norms, softmax and RePo as the SDK splits them; tf-idol checks it step by step against idol-sdk's float32 run, and its 27 kernels are in the kernel contract with 19 planted controls. The image encoders and decoders are separate changes (#1766, for #1757).
  • Code: a GPTQ reader in core/quant reads AutoGPTQ v1 4-bit symmetric group-128 weights as stored (qweight, fp16 scales, a qzeros zero point of 8) into an fp64 reference and refuses every other GPTQ field, rule or tensor by name; host only, with no caller yet (#3611, refs #3368).
  • Metal: Ling-3.0-tiny's MLA layers run on Kimi's k3_mla kernels with three added kernels for cache and query RoPE and gate widening, registered with planted controls in the kernel contract (#3609).

Server and API

  • Server: serve --log-json writes each request start and end as one compact JSON object on the existing log line, with no keys, headers or bodies; default logs and /health stay unchanged (#3195).
  • Server: stored Responses belong to the API key that created them; other keys get the unknown-ID error on reads, continuations, deletion and live cancellation, while keyless and single-key callers retain their own history (#3756).
  • Server: replies in recipient-addressed messages (to=self ... <|eom|>, to=user ... <|eot|>, as Muse Spark Open's chat template writes them) are split into reasoning, answer and tool calls, where the whole reply, markers included, ended up in content (#1336).
  • Server: TENSORFOLD_REQUEST_JOURNAL=PATH records each chat or completion request in three JSON lines (start, prepared, finish), so a request unfinished at a crash is flagged on the next start, one in flight at two crashes is refused with 400 request_quarantined, and tools/replay_request.py replays a journaled request and compares the reply's tensorfold.token_sha256; off unless set (#3221).
  • CLI: tensorfold config validate FILE (source builds only, not tensorfold-native) reads a cluster.json with the same parser and 16 MiB limit the server uses, prints the node and model counts on success or every problem the parser collected, and exits 0, 1 or 2 without planning models or probing hosts; cluster check is unchanged (#3189).
  • Drama voices: --manage-voices (off by default) lets admin keys add a voice with POST /v1/voices (a WAV with its transcript, or an attested voice file, checked and encoded by the loaded model's own codec) and delete one with DELETE /v1/voices/NAME, and --request-voices lets a request carry an inline voice object; a running request keeps the voice it copied when it arrived (#3140).
  • CUDA and HIP: nccl.Library.open() and the tensor-parallel config now resolve TF_NCCL_LIB through the shared path rule, so GLM, Flash Next's --tp 2 collective, MiniMax M3 and TP sessions open the same library; unset, empty or blank values keep libnccl.so.2, and a value with control characters is refused (#3106).

Desktop and Web

  • App: Room agents keep their own reasoning effort, and an agent without one inherits the run's default (#3514).
  • Desktop: a Qwen3.8-27B checkpoint is offered and loads, where the library applied the 2B geometry to every qwen3_5 checkpoint and rejected the supported 27B at hidden size 5,120 (#3771).
  • Web: an explicit relative --token-file path for the service installer is anchored to the directory it is run from, so the file the installer prepares and the file the generated launcher opens are the same; the default path and symlink handling are unchanged (#3838, fixes #3835).
  • Desktop: searching the current conversation no longer carries a project picked under All saved conversations; the request, its results, filters and navigation use the scope's own project filter, and switching back restores the project (#3900, fixes #3849).
  • Desktop: an attachment in a saved draft keeps only its original diagnostic, and the reselection guidance is added once when the draft is rendered; older drafts with repeated guidance show one copy and keep any surviving diagnostic (#3842, fixes #3837).
  • Desktop: turning off autoCheckUpdates cancels the first scheduled update check as well as the recurring interval, and scheduled callbacks recheck the saved setting; a manual check from Settings still works with automatic checks off (#3836, fixes #3833).
  • Desktop: changing the run, mode or redaction in the export panel clears the old preview at once and leaves Copy JSON and Save… disabled until the new selection builds successfully; a late result cannot replace another selection's preview or its feedback (#3834, fixes #3829).
  • Web: the engine address may be an OpenAI base URL ending in /v1 as well as a server root; health, the relay and Connect derive the server root with engine_root and append the API suffix once, and settings keeps the supplied address so a reverse-proxy prefix ending in /v1 survives a reload (#3831, fixes #3830).
  • Desktop: the library scan uses four convolution taps for Qwen3.5-2B, so the supported checkpoint is offered instead of being refused at scan time; a checkpoint with the old value still gets a geometry refusal (#3768).
  • Desktop: a ticket can finalize only after a current independent review of its actual builder work; reviewer blockers stay with their batch and ordinary later notes no longer revoke approval (#3484).
  • Desktop: the Terminal picker launches a registered Orchestrator CLI by its ID without forwarding the catalog command as a custom override, lists CLIs for the current project and host, and stops a click left stale by retargeting, project removal or a disabled host; local custom commands and the remote refusal still apply (#3828, fixes #3824).
  • Web: the OpenAI connection probe uses the shared stream reader, so partial text followed by an error or early EOF fails the check instead of passing; the reader handles LF, CRLF and bare CR, and complete streams still pass the text-or-reasoning check (#3826, fixes #3823).
  • Web: POST /api/conversations keeps a validated pinned and folder supplied at creation, so the response, later reads and folder counts agree; requests that omit those fields keep the old response shape (#3825, fixes #3822).
  • Web: cleaning up Bench runs drops a finished comparison only once none of its runs remain, so two passes can remove one a single pass kept; age-filtered cleanup considers only comparisons touched by that pass (#3820, fixes #3818).
  • Web: stopping Chat Replay during its final reply marks the replay cancelled and keeps only the turns already completed, leaving the interrupted reply out of the done count and saved results; other engine errors still use the per-turn error path (#3815).
  • Web: on reattachment to a running engine, the last unfinished log line stays buffered until the engine completes it, so a split context-window line is recorded once and supplies startup telemetry; truncating the log clears that fragment (#3813).
  • Web: settings files whose JSON root is an array or a scalar now fall back to defaults at startup instead of raising, and the original file is left untouched; a valid settings object still loads its known fields (#3808).
  • Desktop: a manual Refresh results click in Benchmarks takes priority over an in-flight status poll, so duplicate reads stay coalesced and a late response from the old poll cannot replace the refreshed result (#3817).
  • Desktop: new local project Chats and Tasks keep an explicit Provider key or Default login selection through thread creation and renderer configuration instead of falling back to a named account; projects that omit the account field keep their old fallback (#3810).
  • Desktop: deleting an unloaded checkpoint refreshes the engine snapshot so the open Models view drops its old Downloads row; the browser demo removes that row from its backing snapshot too (#3798, fixes #3796).
  • Desktop: Cancel is honored at the final download byte update, before verification; a cancelled download is not registered as a model and its bytes stay cached for a later retry (#3795, fixes #3794).
  • Desktop: downloader diagnostics are assembled per stream with split UTF-8 intact and an unterminated final line flushed before the exit is handled; a bounded tail keeps long diagnostics usable (#3793, fixes #3792).
  • Desktop: the Hub check and local model library recognize Spark's declared BF16 dtype when a config has no quantization or compression field, while still comparing the detected format with the active engine's capabilities (#3791, fixes #3789).
  • Desktop: a Room's health counter shows completed tickets out of the Room's total, and the bot VM guest's cleanup after a bounded command treats macOS's EPERM as already stopped instead of failing the command (#3698).

Platforms and settings

  • Qwen3.5 on Metal: the text-only server no longer keeps the vision tower stored between the language-model tensors in GPU memory, so the 2B holds 1.7 GiB instead of 2.3 GiB measured with footprint after load (0.61 GiB less), with replies unchanged (#3407).
  • CUDA and HIP: Qwen 3.5 settings go through the environment rules, so malformed text is refused at startup with the setting's name and accepted forms; names, defaults and clamps are unchanged (#3520).
  • Kernel contract: the nvcc 13.2/13.3 usage table moves to its own registry_cuda_sets.zig, so registry.zig has room under the 600-line limit; the registered set is unchanged (#3865).
  • tensorfold device: a saved macOS profile is refreshed when the live GPU wired-memory limit changes, so the reported available weight bytes match the current limit (#3780, fixes #3778).

Docs

  • Optimization ledger: rows 30 to 32 (small-kernel fusion, stream-tile prefetch and the filled-item prompt grid) are added, each failed for Flash Next on HIP with the measurements from #1603 (#3160, refs #1603).
  • Qwen3.8-27B recipe: serve with --thinking-budget 4096 when thinking is on, with its GPQA Diamond result on TensorFold 1.2.7 and one GB10: replies cut at the limit fall from 78 of 198 to 0, and correct from 58.1% to 82.8% (#3373, fixes #3323).
  • Drafter training recipe: a section on adapting an already released drafter, budgeted from a few passes over the scarcest class at a low learning rate with early checkpoints, with the Qwen3.8-27B pilot behind it (#3369, refs #2667).
  • Supported models: GLM-5.3-Flash Jammed XSFP4 NZ5 is listed as in 1.2.10 in the supported models table and the GLM CUDA recipe, where both said "on main after 1.2.7" (#3869, refs #2894).
  • GLM-5.3-Flash CUDA recipe: switchless RoCE links on separate IPv4 subnets, with NCCL 2.30.7 or later, NCCL_IB_SUBNET_AWARE_ROUTING=1 and NCCL_IB_SUBNET_PREFIX_LEN, and how to check the NCCL version and NIC each rank picked at startup (#2993).
  • Native release guide: the CUDA command builds all four required targets with the build's catalog, and both archive commands supply the pinned XGrammar checkout with -Dxgrammar=DIR so libtfgrammar is packaged (#3764, fixes #3763).
  • GLM-5.3-Flash CUDA recipe: nvidia/GLM-5.3-Flash-FP4-Local gets its pinned pull and launch, with a new TP=2 receipt on two GB10s in which drafted replies equal plain ones, concurrent equal alone and resumed equal cold (#3425).

Fixes

  • HIP: in multi-rank runs, a follower rank refuses a step from rank 0 whose page ids, first page index, page-copy pages, snapshot slot, Flash Next begin slot or Nemotron resume row fall outside its own pool, table or slot counts, with the same ShortMessage error as a short message (#3081).
  • GLM on CUDA: the window-cost cache is keyed by TF_GLM_KDA_PAD, TF_ROCE, TF_GLM_PDL and TF_GLM_DSEL too, so changing one times the windows again instead of reusing prices measured under the other value (#3495, fixes #3493).
  • GLM-5.3-Flash on CUDA: while rank 0's vision tower encodes a prompt's images, the other ranks sleep on their liveness lines instead of waiting in a collective receive for the whole pass, so a long image pass no longer trips a net plugin's operation timeout and stops every rank; replies are unchanged (#3675, for #3614).
  • Gemma 4 on Metal: an image input whose tower cannot load is refused cleanly instead of crashing during deinit, and a host test pins that a failed tower load leaves the model with none (#3421).
  • tensorfold web: after a PATH miss, the launcher looks in uv's tool directory for an existing Web executable before offering an install; PATH still wins and installing still needs an explicit yes (#3748, fixes #3747). When uv is missing, the fallback points to uv's installation guide and asks for uv on PATH instead of suggesting pip install --user; the printed install command, consent and exit status are unchanged (#3746, fixes #3743).
  • Web: the packaged stand-in reports the current native version after a native release bump, and Web CI runs when build.zig.zon changes with a build check that the committed packaged version is fresh (#3745, fixes #3739).
  • Nemotron: the Living Weights copies left behind by the October revert are deleted and cuda_pages imports living.lesson_route, leaving one copy of the learner, pocket and lesson files (#3707).
  • Changelog: #3125's entry appears once, under 1.2.10; the copy in 1.2.9's section, a release published before #3125 landed, is removed (#3916, refs #3125).
  • CI: the last four host checks excluded under #2031 return to the aggregate; recording fixtures initialize runner state and affine kernel handles (#2031).

Tools and tests

  • Tools: tools/draft_divergence.py checks drafted decoding returns exactly the plain token IDs on prompts around recorded BF16 near-ties, at draft caps 1, 4 and 8 (#3841).
  • Tests: a two-session KV isolation test pins that kept states across spill, offload and page reuse match by tokens only, never position (#3840).
  • Tests: the Metal kernel-contract gate checks the four dsv41 xmma units launches only where tensor units exist, so Gate 5 limits pass on Macs without them while the four simdgroup launches stay checked everywhere (#3522).
  • Tools: the served gates (tools/conformance.py, the Qwen and LFM3 serve checks and the Qwen3.8-27B HTTP gate) prove they ran what they claim: drafts landed, the sampler and the prompt cache were used, and concurrent requests overlapped (#3708, follows #2460).
  • Tests: the Zig cache restat tests read .lib_dir from zig env instead of guessing a lib folder beside the executable, so they work with Homebrew Zig (#3786, fixes #3785).
  • Tests: the loopback conformance fixture sets its listen backlog explicitly so a concurrent burst does not lose connections while handler threads start; the same token-equality checks still run (#3784, fixes #3782).
  • Tests: the benchmark TTFT test pins its send clock and requires a nonempty result set before its exact assertion, so rounding no longer decides the result; it still separates first content from headers and role or usage frames (#3783, fixes #3779).
  • Tests: the Desktop helper timing test drives the exact echo, typing and keypress deadlines with a fake clock instead of real process startup, while still checking that the timed-out helper exits and a fresh one starts (#3802).
  • Tests: the Desktop power test runs the real power module with a fake process handle and a mock clock, checking owned shutdown, the restart backoff boundary and saved errors without looking up or stopping unrelated host processes (#3804).
  • Tests: test-pull-host no longer hangs on macOS, where the test allocator's stack capture on frees from the client's I/O threads deadlocked in Zig's Mach-O unwinder (#3740).
  • Tests: a new host step, test-hip-followers-host, runs the HIP followers' step-parser tests (the hip_serve protocol tests and the Flash Next, Qwen and Nemotron HIP worker security tests) in CI, where no build step ran them (#3091).
  • Tests: the macOS nightly builds again: the row dispatch tests handle both pipeline representations, and the OS readings test accepts a small runner's RAM with its footprint check unchanged (#3854).

What changes by default

  • Faster DeepSeek-V4.1 prompts on Metal (#3351), Qwen3.8-27B tensor-unit tiles (#3704), NVFP4 expert decode (#2266) and the GLM follow-up and L2-prefetch paths (#3458, #3156) all keep replies unchanged.
  • GLM-5.3-Flash follow-up turns now reach the first token 3-4% sooner (#3458), and the Flash Next lazy KV pages are on only with TF_FLASHNEXT_KV_PAGES on Linux (#3066).
  • serve --log-json is opt-in (#3195), the request journal is off unless TENSORFOLD_REQUEST_JOURNAL is set (#3221), and --manage-voices is off by default (#3140).
  • Malformed Qwen 3.5 settings on CUDA and HIP are now refused at startup by name (#3520), and stored Responses are only readable by the API key that created them (#3756).

Thanks

@AbrahamCete, @AIFlowML, @ajensenwaud, @Arminova, @atakann, @BadAd84, @Bizuayeu, @cshintov, @devopsfortunato, @eleqtrizit, @gilby, @GumbiiDigital, @jayleaton, @jschmied, @laudney, @Maxrio9, @mrv777, @mvanhorn, @Nipale-ai, @supernovae, @ThinkOffApp, @ultradaoto and @vdalesandro.