Skip to content

Releases

TensorFold 1.3.6

Choose a tag to compare

@ashhart ashhart released this 26 Nov 20:21

TensorFold 1.3.6

1.3.6 brings exact CUDA TFQ3 serving and speculative drafting to Qwen3.8-27B, GLM-5.3-Flash and Flash Next. It also adds LFM3-VL images on Metal, full GLM-5.3 on CUDA, more LFM3 formats and SenseNova-Loop MLX-affine checkpoints, alongside substantial Inkling 2 speedups and broader prompt-cache controls. A stable release now publishes checked Linux amd64 and arm64 container images (#4986, #1502, #4900, #1634, #1508, #4415, #3857).

CUDA TFQ3

  • Qwen3.8-27B, GLM-5.3-Flash and Flash Next: CUDA serves 3/4/5-bit 2D-AffineCoset TFQ3 checkpoints with randomized 2D FWHT-128. Qwen3.8-27B supports DFlash2 and DSpine drafting from BF16 or MLX bases, GLM-5.3-Flash supports MTP and DFlash2, and Flash Next supports its routed TFQ3 layers and MTP drafter alongside MLX PLE checkpoints. Shared dense and Tensor Core kernels provide bit-exact speculative verification; non-TFQ3 checkpoints keep their existing paths (#4986).
  • Flash Next top-5 checkpoints: a checkpoint with a 1280-wide shared expert loads those projections at their real width rather than 640; top-10/640 checkpoints are unchanged. The optional Inkling 2 EXL3 pack-test path, TF_INKLING2_EXL3_DIR, is registered and documented (#5228).

Speed

  • Inkling 2 Mini on Metal: tensor-unit expert and loop-gate projections make 2K-token prompts about 1.95x faster on M5, with tokens unchanged (#5144). Multi-row logits use coalesced 32-wide vocabulary tiles, making four-stream decode about 3.5% faster on M3 Ultra and 4.5% on M5 with byte-equal results (#5135). Coalesced NVFP4 and MXFP8 expert loads and stable SIMD combining preserve every output bit (#5150). Cached inverse RMS and fused partial updates make single-stream decode about 4% faster on M3 and M5 (#5001).
  • More Inkling 2 Metal gains: grouped routed-expert reads give about 1.9x prompt fill and 15-19% faster four-stream decode on M5 Ultra (#4995). Dense power-of-two matvec kernels gain about 3.6% on M3 Ultra (#4998), fused relative-bias attention makes decode about 3-7% faster on M3 Ultra (#5000), and 16-byte decode reads with parallel router selection move one-stream M4 Pro decode from 9.3 to 20.9 tok/s (#4919).
  • Inkling 2 drafting and prefill: the reworked DSpark drafter batches streams, removes attention score scratch and uses a two-pass GPU top-k while preserving plain and drafted output bits (#4699). On M1 to M4, simdgroup prompt kernels cut a cold 2,048-token prompt from 146 s to 9.7 s on M4 Pro with identical greedy output (#4756). Tree-shaped verification windows now run with output bits equal to the linear path (#5011).
  • Inkling 2 Mini on CUDA: the staged QKV decode projection reaches 5.6 to 6.4 tok/s on GB10 with identical bits (#4718). Sharing one forward pass across concurrent streams makes four-stream decode about 2.7-3.4x faster, with each stream's tokens equal to its solo run (#4786).
  • CUDA sampling: grouped radix probes replace bit-by-bit top-p cutoff searches. At top_p=0.95, a row takes 279-286 us instead of 427-515 us on GB10; every draw, probability and token is unchanged (#4691).
  • Vision on Metal: BF16 attention scores and probabilities halve Inkling 2 image-tower score traffic with byte-identical answers (#5120). Its two FP32 attention dots also use 64 x 64 tiles with byte-identical answers (#5119).
  • Other exact work: Ling-3.0-tiny attention on ARM CPUs is about 10% faster at one and four threads with unchanged tokens and logits (#5071). GLM's Metal DFlash2 draft decode fuses projections and reads packed rows without changing verified tokens (#4258). Metal EXL3 adds exact multi-row projections and a fused gate/up epilogue (#5054), and MiniMax-H3-Image reads ahead only the tensors it uses with mapped BF16 bytes and decoder conversion unchanged (#4909).

New models, formats and guides

  • LFM3-VL-2B images on Metal: the official MLX 4-, 6- and 8-bit checkpoints serve with their own image tower when --vision is enabled; without it the server is text-only. OpenAI image_url parts accept up to four images and 256 image tokens a request by default (#1502, part of #1491).
  • Full GLM-5.3 on CUDA: glm_moe_dsa serves at TP=3, or TP=1 with three in-process shares, with a BF16 latent cache, MTP drafts, slots and prompt steps. GLM-5.3-Flash's paths, kernels and launch arguments are unchanged (#4900, part of #3063).
  • LFM3-1.7B formats on CUDA: the ModelOpt NVFP4 and block-FP8 exports run weight-only with BF16 activations, and the MLX 4-bit checkpoint runs as stored. TENSORFOLD_LFM3_KV_PAGES=0 gives each stream fixed pages, and LFM2.5-24B-A2B moves to the shared Liquid CUDA backend (#1634, #1508, part of #1491).
  • SenseNova-Loop on Metal: MLX-affine g64 checkpoints load and serve (#4415).
  • Tokenizer patterns: \A, \z, $, \G and atomic groups follow Oniguruma, so ERNIE 5.5's digit-grouping tokenizer loads; previously accepted patterns split as before (#4984).
  • Guides: a Claude Code guide covers starting a server, selecting a model or alias, setting the client context window and measuring the attribution block's cache effect (#4931, refs #3225). A Drama 3 guide and checker cover pruned checkpoints, audio waveform (PCM) comparisons and successful retry logs (#4992).

Prompt caches, memory and optional controls

  • Qwen3.8-27B prompt caches: TF_QWEN27_MESSAGE_STARTS=1 keeps states at up to four recent message starts, allowing edits and replacements to resume from that message with unchanged replies (#4932). Repeated prompts retain their rewind state when the cache is full without letting clients evict one another; one-off conversations keep the old plan (#5136). Dropping reasoning from history also resumes correctly with a full cache while preserving the existing state protections (#5154, fixes #5141).
  • Idle weights on Metal: TF_Q27_IDLE_RELEASE=N releases prepared target weights after N quiet seconds and restores only the buffers macOS emptied on the next request, checking each against a SHA-256 snapshot. Replies are unchanged (#5040).
  • DeepSeek-V4.1 on Metal: TF_DSV41_POOL_TOKENS shares latent and index-key positions across slots while preserving per-request context limits and tokens. A request waits when too few positions are free; unset memory and startup behavior are unchanged (#3278, refs #2984).
  • Folded memory and living weights v6: opt-in living weights store folded-memory weights exactly as computed and add in-flight conversational learning, belief revision and a crash-safe delta journal for Llama, Nemotron, Qwen3.5 and Qwen3.8-27B; with learning off, replies are unchanged (#4937). Folded-memory saves and journals use exclusive files without following links, transactional recovery and size, offset and count checks before allocation (#5127).
  • CUDA execution controls: TF_FLASHNEXT_PREFILL_MTP_LEAN=1 skips unread MTP proposal and query work during prefill (#4529). TF_FLASHNEXT_GRAPH_TAIL=1 includes a lone verification row's final copies and greedy selection in its captured graph with the same operations and order (#4544). TF_GLM_KEEP_SEQS=1 reuses a released stream's sequence on its next request, avoiding allocation, fill and free (#4809). Each is off by default with unset behavior unchanged.
  • Kolibri graphs: TENSORFOLD_KOLIBRI_GRAPHS leaves decode graphs enabled when unset, blank or 1, selects eager execution with 0, and refuses other text by name. Tokens are the same either way (#5002).
  • Diagnostics: serve --execution-witness on Qwen3.5-2B Metal binds weight bytes and Metal library hashes with the OS compile options, OS build and chip, without changing replies (#4908). Ling-3.0-tiny's decoder can hash every step's full logits for bit-for-bit comparisons without changing selection (#5072, part of #1247).

Server and request logs

Setting TENSORFOLD_REQUEST_LOG_REPLIES=1 writes each finished reply beside its request, including status, finish reason, text, reasoning, token usage and timings. Streamed replies are written once complete, and rotated archives end on whole records (#4918, part of #3666).

With the switch off, logs remain request-only and background work writes nothing. Typed request records pair with replies under owner-only access rules. Records are capped at 8 MiB and refusal messages at 4 KiB; a larger request record is refused while its reply is still recorded. Writes use an adjacent lock file, rotation to .1 at 64 MiB keeps at most twice the limit across two files, and Windows leaves reply logging off (#3666).

Fixes and changes you may notice

  • Prompt and draft state: Inkling 2 Mini prompt-cache snapshots retain the DSpark drafter's drafting state on warm hits (#4542). Nemotron on HIP keys the token after an MTP prompt-cache state, preventing a shared drafted row from being overwritten and resuming such prompts from an earlier state without changing tokens (#5003, fixes #4999).
  • Inkling 2 on Metal: DSpark pipeline checks allow a valid drafter to load (#5041), prompt-attention shaders build on pre-M5 GPUs under MSL 4.0 (#4980, part of #4961), and six shaders declare their reserved threadgroup sizes and guard partial rows (#4981). Arithmetic is unchanged in all three.
  • LFM3-VL logging and planning: request logs redact image URLs in image and input_image parts as they already did for image_url, and per-stream image rows count toward the memory plan with --vision (#5121).
  • Desktop and Windows: Room turns use an idle watchdog re-armed by streamed chunks or CLI activity instead of a fixed three-minute limit (#4977, fixes #3415). The attachment diagnostic label meets WCAG AA contrast in both themes (#5086, refs #4717). The download check accepts GLM-5.3-Flash and Flash Next TFQ3 checkpoints, and Metal TFQ3 capabilities and records are reported correctly (#5038, reported in #5033). Windows on ARM64 compiles again, with x86_64 unchanged (#4991, fixes #4967).
  • DeepSeek-V4.1 on Metal: the alre...
Read more

TensorFold 1.3.5

Choose a tag to compare

@ashhart ashhart released this 25 Nov 07:49

TensorFold 1.3.5

1.3.5 adds TFQ3, TensorFold's own quantized weight format, for GLM-5.3-Flash and Flash Next on Metal, and brings Inkling 2 Mini to native serving on CUDA and Metal, with images on Metal and large decode speedups on both. New models and paths include SenseNova-Loop-9B on Metal, Ripple-65B-Preview on CUDA, speech input for Nemotron 3.5 Transcribe, ZONOS3 Mini text to speech and Idol end to end on M5. The contributing rules now say exactness is bit for bit: a changed reduction order or rounding point must keep every output bit, by default and with any switch on (#4888).

TFQ3

TFQ3 is TensorFold's own quantized weight format: .tffpw record files and a shared pw_v3_tables.bin beside a checkpoint, loaded zero-copy and run by native Metal kernels. A checkpoint without TFQ3 records takes the same paths as before. Within TFQ3, a repeat equals its prefill and 1-row decode equals multi-row decode, while prompt and decode may differ in the last bits.

  • GLM on Metal: TFQ3 weight loading (layer_XX.tffpw, nonmoe.tffpw, pw_v3_tables.bin) with decode and prefill kernels for M5 and earlier Macs, plus 8-bit/64 KDA split-parts and window kernels. On an M5 Ultra, GLM-5.3-Flash-TFQ3 (139.55 GB on disk) loads in 8.4 s, matches depth 0 == depth 3 bit-identically, prefills p2048 at 1,567 tok/s and decodes at 69.2 tok/s (B=1), 87-104 tok/s with live MTP streaming. Non-TFQ3 checkpoints compile no TFQ3 kernels (#4953).
  • Flash Next on Metal: checkpoints with TFQ3 routed MoE sidecars (pw_v3_tables.bin, layer_XX.tffpw, mtp_00.tffpw) run native TFQ3 kernels for decode (B=1 and deduplicated B=2..16) and prompt prefill; non-TFQ3 checkpoints stay on the existing MLX affine paths. --ple-on-ssd works with TFQ3 and an incompatible --ssd-experts is refused. On an M5 Ultra, Qwen3.8-Flash-Next-TFQ3 (78.99 GiB) reaches 5.996 combined PPL (against 6.007 for the 8-bit source and 6.644 for MLX 4-bit), 3,855 tok/s p2048 prefill, 82.9 tok/s B=1 decode and 154.5 tok/s at MTP depth=3, with bit-exact depth 0 == depth 3 parity (#4964).
  • Release fixes: GLM decode windows of 8 to 16 rows give each row the same bytes as 1-row decode (the prompt pass alone uses the MMA kernels), GLM refuses misaligned 4-bit records, a stray pw_v3_tables.bin no longer turns TFQ3 on for a checkpoint without TFQ3 records (GLM and Flash Next), and Flash Next checks its table file as GLM does (#4996).

Speed

  • Inkling 2 Mini on Metal: routed experts and the combine run a thread per output with the same serial arithmetic, so one-stream decode is about 16x faster on an M5 Ultra and 17x on an M3 Ultra (#4894). The router's and loop gates' dots do the same, so prompts reach the first token about 42% sooner and four streams decode about 64% faster on an M5 Ultra (#4912). DSpark drafting uses the 1/sqrt(128) attention scale and reads kappa as FP32, so one-stream draft acceptance on an M3 Ultra rises from 3% to 55% and drafted decode is about 56% faster (#4447). Tokens and replies are unchanged in each.
  • Inkling 2 Mini on CUDA: expert weights staged a warp at a time make one-stream decode about 70% faster on GB10, four streams about 60% faster and long prompts reach the first token about 25% sooner (#4728); the loop gate as a down and an up half adds about 28% one-stream (#4697), and decode experts a warp over 8 columns about 3% more (#4729). Tokens are identical.
  • Lanes (host sampler): Flint, Llama, Kimi K3 and MiniMax-M3's draws keep a draw's best 1,024 candidates in one bounded heap pass instead of sorting the row, bit for bit the full sort's. On an M4 Pro a sampled stream of a 201,058-token-vocabulary model decodes at 29.2 tokens a second where it did 21.2, and four streams at 56.1 where 33.5; greedy is unchanged (#4744).
  • GLM on Metal: one-Mac GLM-5.3-Flash prefills short remaining work first by default, cutting a short reply beside a long prompt from 6.11 s to 3.56 s with long-prompt TTFT within 1.2% (#3903).
  • Qwen3.8-27B on Metal: Macs with tensor units that are not Ultras take 8-bit prompt chunks in row blocks, as Ultras already did (#3280). On M1-M4 a prompt that runs alone takes the prompt frame's rows per pass (512 by default) instead of 128 (#2916). On M5 and later, row projections take the wide kernel from 8 rows instead of 4 (#4617), and pick their narrow or wide kernel per chip, so an M5 Max no longer runs 8-row and wider windows on the kernel that is slower there (#4730).
  • XPU: Qwen3.8-27B decode attention computes a key's twelve exponentials as one 16-lane vector exp, with every output byte unchanged; on an Arc Pro B70 served drafted decode gains 1.3% at 7,588 prompt tokens, 3.0% at 28,946 and 4.9% at 121,022, and plain decode is level (#4651).
  • Streams beside long prompts: Nemotron on CUDA (#4700) and Gemma 4 on Metal (#3025) fill a new prompt a chunk at a time between other streams' decode rounds, so a long prompt no longer stalls replies already streaming.
  • CUDA: Kolibri-1 decode rounds of two or more rows replay a CUDA graph captured once a shape, with tokens unchanged; TENSORFOLD_KOLIBRI_GRAPHS=0 keeps them eager (#4884). Flash Next on one GPU skips a non-final prompt chunk's last-layer MLP stream and experts, which nothing reads (#4885), and its MTP draft rows' best value, first id and log-sum-exp run over 32 one-warp blocks a row with the same bytes (#4632).
  • Lanes (pricing): drafted lone streams in families that opt in to copy pricing are priced as in 1.3.3 again, up to 2.5% faster at 4 code streams on M3 and M5 Ultra with the DFlash2 drafter (#4688); a lone stream with a fixed-block drafter is priced for its full block (#4457).
  • Other kernels: H3 on Metal runs transformer products on h3_gemm_32x64 with sums unchanged (#4641), Flint draws a shared round's sampled rows in one launch (#4780), HIP decode weighs each slot's rows from one read (#4754), HIP Qwen uses the policy prompt step on lone RDNA 3.5 iGPUs (#4207), the 4-rank RoCE ring relay forwards each half as it arrives, bytes unchanged (#4798), and long H3 image renders on Macs give way to live speech on the GPU (#4650).
  • Opt-in switches, off by default (each PR's line says what it keeps): Nemotron CUDA TF_NEMOTRON_WIDE_ROUNDS=1, decode rounds of up to 16 streams, +2% to +6% at 16 streams on a GB10 (#4741); Qwen3.8-27B Metal TF_Q27_DFLASH_ABSORB_BATCH=1 (#4629), TF_Q27_DFLASH_ADAPTIVE_BLOCK=1 (#4628) and TF_Q27_MTP_GPU_PICK=1 (#4570); Qwen3.5/3.8 CUDA TF_Q35_DFLASH_ABSORB_BATCH=1 (#4648), TF_Q35_GROUP_PROJ=1 (#4515) and TF_QWEN35_ATTN_ALL_ROWS=1 (#4496); Flash Next Metal TF_FN_GX_GATEUP_MB2=1 (refs #1486), TF_FN_GX_SHARED=1 (#4834) and TF_FLASHNEXT_BATCH_GDN_WIDE=1 (#4489); Flash Next CUDA TF_FLASHNEXT_GDN_CHAIN_TPR=1 (#4484) and TF_FLASHNEXT_WINDOW_GRAPH_PARITY=1 (#4492); MiniMax-M3 CUDA TF_MINIMAX_GRAPHS=1 (#4610); Gemma 4 CUDA TF_GEMMA4_ARGMAX_GRAPH=1 (#4616); DFlash2 CUDA TF_DFLASH_QL_SPAN=1 and TF_DFLASH_GRAPH=1 (#4516); GLM TP=2 TF_GLM_WIDE_EXPERT_TILE=1 (#4565); CUDA qmmf TF_QMMF_HALF_BN=1 (#4533); CUDA TF_CUDA_POOL_AFTER_WARMUP=1 (#4591).

New

  • SenseNova-Loop-9B on Metal: served natively through the qwen27 lane backend in BF16 and AWQ 4-bit (group size 128), with its looped 56-step schedule, two-stream mHC, 512K YaRN context and vision, and drafts with its published mtp.safetensors (#3868, carries #3859, fixes #3781).
  • Inkling 2 Mini: native serving on CUDA (one rank, NVFP4 and MXFP8 experts) and Metal, with kernel contracts on both (#4387). On Metal it serves images under --vision (PNG, JPEG and WebP), with the vision tower and projector on the GPU; without --vision images stay refused by name (#4704). Its startup line breaks the serve's demand into weights, dense layers, scratch and stream state (#4705). Inkling 2 on HIP has attention kernels under the kernel contract (#4633).
  • Ripple-65B-Preview: serves on the native CUDA engine from the publisher's NVFP4 release, with lane rounds as CUDA graphs, kept states and the prompt cache; the bf16 release is refused by name, and structured output and forced tool calls are refused until masked sampling lands (#2302, fixes #2300). On Metal, --drafter takes the publisher's DFlash2 drafter beside either release, with drafted replies equal to plain ones (#2260, fixes #2259).
  • Nemotron 3.5 Transcribe on CUDA: chat requests take speech as 16 kHz mono WAV in OpenAI input_audio and vLLM audio_url parts, up to an hour a request, with clips keyed in the prompt cache (#1632, closes #1549).
  • ZONOS3 Mini text to speech on CUDA: named voices, reference codes and cloning from a clip (#3720). Drama 3 on CUDA gains semantic guidance (--cfg-gamma and the other guidance flags), as on Metal (#4153).
  • Idol on M5 Metal: tf-idol-generate runs end to end from one preprocessed picture to a 3DGS PLY and camera; on an M5 Ultra it takes 29.1 s against 95.4 s for the SDK's pipeline on MPS, at a 2.71 GB peak footprint against 12.88 GB (#1780).
  • Qwen on Metal: the 9B's DFlash (v1) drafter is served with --drafter beside DFlash2, its ring keeping fused rows (8 KiB a token instead of 64 KiB), and TF_Q27_KV_GROW=<rows> starts K/V slots at that many rows and grows them with their streams, with byte-identical replies (#1896). Qwen3.6-35B-A3B's text-only checkpoint serves on the routed expert path (#3239).
  • CUDA: an sm_110 target serves Qwen3.8-27B text on one Thor GPU (#4796), Flash Next takes a top-5 checkpoint with a 1280-wide shared expert as well as top-10 (#3523), and GLM-5.3-Flash with --learn-conversations keeps conversation states on disk, so after an eviction or a restart the next turn reads its state back (#1411).
  • More hardware and placement: Qwen 3.8-27B on XPU opens Arc Pro B60 cards when no B70 is found (#4802), and Ling-3.0-tiny gets an exact decoder for the published 4-bit GGUF on aarch64 Linux (#4266). GLM, MiniMax and Ne...
Read more

TensorFold 1.3.4

Choose a tag to compare

@ashhart ashhart released this 22 Nov 20:53

TensorFold 1.3.4

1.3.4 makes tensorfold pull work through proxies: it honours the proxy environment on every hop of a redirect, bounds every connect and read, and resumes a stalled file from its partial bytes. It hardens tool-call parsing and grammar compiles, which now bound their work, and cluster launch, session restore, Hub pulls and Web pairing now fail closed on malformed input; the json_object grammar is fixed to work on large vocabularies under the new limits. On CUDA, GLM at TP=2 does less work per prompt by default, and with TF_GLM_PAIR_EXPERTS=1 its prompts are 15% faster at 2K on two GB10s, while the server takes n up to 16 and cache_salt and Ripple-65B-Preview runs on M5 Macs. This release is not slower than 1.3.3 anywhere: copy-only decode on AMD Strix Halo keeps 1.3.3's lone-stream copy pricing.

Speed

  • Flash Next on Metal (M5): the 4-bit expert scale and bias index is now built on Macs with tensor units too. One-stream decode is 2-5% faster on an M5 Ultra, with the same tokens (#4547).
  • Qwen3.8-27B on Intel GPUs (decode attention): decode attention merges its slices with 16 subgroups a head instead of one, adding them in the same order, so every output byte is unchanged (token hashes match main, drafted and plain, bf16 and int8 KV). On an Arc Pro B70, plain decode gains 1.8 to 2.0% at about 8,000 prompt tokens, 14.7 to 16.0% at about 30,000 and 39.8 to 42.2% at 121,022. Drafted decode is level. The kernel contract registers it as a bit-equal replacement with two planted controls (#3960, lands #2799).
  • GLM on CUDA (TP=2 prompts): when a chunk crosses the dense limit, dense attention runs only on the rows sparse attention leaves untouched. Prefill also skips projections nothing reads (the MTP proposal and query-side work). Outputs are unchanged (#4499).
  • GLM on CUDA (TP=2 paired experts): opt-in TF_GLM_PAIR_EXPERTS=1 runs one grouped routed-expert pass per prompt pair with 128-row items, so experts with many tokens read their weights once. Each rank passes its own FFN partial under the default split reduction, so tokens match the unpaired path. On two GB10s, prompts are 15% faster at 2K and about 5% faster at 8K and 32K. Off, nothing changes (#4493, #4619).
  • GLM on CUDA (TP=2 index split): TF_GLM_INDEX_SPLIT=32768 keeps indexer scores, pools and token rows local on each rank below that position, with no blocking all-gathers, and own partials are read in place. Outputs are unchanged, and the default stays 2048 (#4510).
  • GLM-5.3-Flash on CUDA (EXL3 experts): TF_GLM_MOE_DIRECT=1 (off by default) runs a decode window's EXL3 experts without their two row copies and the shared expert's slot write. It sums the slot rows bit-equal to the default path, so replies are unchanged (#3659, for #3570).
  • Flash Next on CUDA (fused split): opt-in TF_FLASHNEXT_FUSED_SPLIT=1 runs decode projections that split K over a cluster, at 2,048 output columns or more, on the fused form. It adds the K slices in the cluster's order, so the bits are unchanged. Unset, blank or 0 keeps the current kernels, and Metal and HIP refuse 1 at startup (#3475).
  • Flash Next on CUDA (n-gram gather): TF_FLASHNEXT_GATHER_EARLY=1 (default 0) gathers a shared decode pass's n-gram rows for every lane in one pooled call instead of one call a stream, for passes of at most 64 lanes. Wider passes keep the per-stream call. Which rows are read and how a row is dequantized do not change, so replies are unchanged. The measured mean decode gain on one GB10 rises to +2.10% at eight streams (#4009).
  • Flash Next on CUDA (follow-up turns): after a chat reply, a quiet background pass keeps its state, so the next turn resumes past the reply instead of prefilling it. The pass runs on one rank and yields when a request arrives (#3219).
  • HIP (DFlash2 holds): a DFlash2 hold runs only the rows its drafts need: a frame takes its deepest stream's drafts plus the pending row, within the block. A draft's marginal cost is measured at load to price holds (0.56 ms a draft on gfx1151 against the full block's 1.73 ms), so the depth rule prices shared rounds at what a hold costs. The 27B recipe's DFlash2 figures are refreshed on current main, and nothing changes without --drafter (#3918, fixes #1563).
  • DeepSeek-V4.1 on Metal (cold prompts): cold prompts read the early Engram rows beside the first rows of a chunk, the Engram row cache keeps more records by default, and the keepalive probes residency while a request runs. Prompt bits stay equal to decode bits (#3459).
  • DeepSeek-V4.1 on Metal (draft pricing): TF_DSV41_CALIB=measure, off by default, times a draft cost table on the loaded model at start, reports it and prices the draft depth from it. Other values store or read a table. Tokens are unchanged, and unset or blank times nothing and keeps the built-in table (#2952, refs #2984).
  • Host draw: greedy and masked rows scan 64-logit blocks and skip blocks whose mask word allows nothing, on both the row draw and the bounded top-k path. A test-host-draw-timing step times a row outside test and CI (#2846).

New

  • Ripple-65B-Preview on Metal: the native engine serves ricursiveAI's NVFP4 and bf16 releases as published, on M5 or later Macs, with bf16 caches. M1 to M4 are refused by name. --context defaults to and stops at 262,144 tokens, and a thinking_budget is refused for this model. Every model's /v1/models capabilities gain a reasoning_optional field, false for all but Ripple (#2231, fixes #2171).
  • Qwen3.8-27B on HIP (DFlash2): serve with --drafter runs Qwen3.8-27B's DFlash2 drafter on the HIP engine through the lane core, where it was refused. The drafter's weights and per-stream contexts count in the memory plan (#3665, refs #1563).
  • Qwen3.8-27B on Metal (MTP on M1 to M4): --mtp-drafts N loads the checkpoint's MTP head from mtp-4bit.safetensors and drafts chains of up to N tokens for every stream, alone or in shared rounds. --mtp-confidence stops a chain below its floor. Before, the Metal build refused both flags (#2464, refs #2368).
  • Qwen3.5 family on CUDA (MTP): dense MTP drafting is enabled for Qwen3.5-family targets with compatible checkpoint tensors (#3582).
  • MiniMax-H3-Image on Metal (server): tf-h3-image-server loads the prompt encoder, transformer and decoder once and serves one text-to-image request per input line, keeping the weights resident between pictures (#3718).
  • Idol on Metal (DINOv3 encoder): Idol's DINOv3 ViT-H+/16 image encoder runs natively on M5 Metal, from one 1024 x 1024 image to the denoiser's feature1 in bf16, as idol-sdk's ImageEncoder makes it. It uses the ungated timm weights (DINOv3 License), which tools/zig/idol_case.py dino shows to be Meta's gated checkpoint byte for byte and feature for feature. On an M5 Ultra an encode takes 0.120 s against the SDK's 0.261 s on torch MPS, with a 2.28 GB peak footprint. On torch's own input, feature1 and each of the 32 blocks sit as close to a float32 ruler as torch's bf16 run, within the 2x gate. tf-idol-dino runs those gates, and its eight kernels pass the kernel contract (#1775, after #1766, for #1757).
  • Qwen3-ASR on CUDA (tools): tf-qwen3-asr runs a WAV clip through the 0.6B or 1.7B checkpoint: the audio tower, then greedy decode through the Qwen3 CUDA pass the embedding engine runs. tf-qwen3-asr-forced teacher-forces a clip on a reference case, and test-qwen3-asr-host and tf-qwen3-asr-check cover config admission, tensor names, log-mel rows and a float64 tower without a GPU. It is not served yet (#2239, refs #2105).
  • GLM-5.3 on CUDA (shapes): GLM-5.3-Flash's latent cache and indexer accept full GLM-5.3's shapes, slice (a) of #3063 (#3949).
  • Runtime LoRA overlays (core): exact runtime LoRA overlays, with adapter config, target and identity checks. They are not yet wired to a flag (#4384).

Server and API

  • Several choices (n): chat and completions take n from 1 through 16. Each choice is its own engine request on the one prompt, with its own index and tensorfold.seed. Choice 0 keeps the request's seed, so n: 1 replies are unchanged, and usage counts the prompt once. A request with n above 1 takes n places under --max-inflight and --max-inflight-per-key, all or none, and gets 400 with logprobs or a required tool call. /v1/responses and /v1/imprint still refuse n other than 1 (#3148, closes #3114).
  • Cache salts: cache_salt on chat, completions, Responses and Messages, and serve --cache-salt-per-key, keep kept prompt states apart by salt or API key. A request without a salt is keyed exactly as before, and no reply's tokens change. Salts preserve every bit of image words after the first key word, a high-bit first word is refused before it can alias text, and salted states stay in RAM only (#3222, fixes #3196).
  • Sampling penalties on Metal: Qwen3.8-Flash-Next and Qwen3.8-27B accept presence_penalty and frequency_penalty, counting each reply row and its own draft path, so drafted replies match undrafted ones. At zero the default path is unchanged. With --instruct-sampling card they now also take the card's presence_penalty of 1.5, so sampled replies under that flag differ from 1.3.3 (#3145).
  • Speech formats: /v1/audio/speech adds wav24, wav32f and flac, with an optional sample_rate and channels: 2. The default wav and pcm replies stay byte-identical, and mp3, opus and aac are refused by name (#3138).
  • Hardening (parsers and grammars): tool-call parsing, streaming parsers and grammar compiles bound their work and validate arguments before emitting them (#4378).

Desktop and Web

  • Hardening (sign-in and input): TensorFold Web addresses no longer sign in with ?token=; the browser gets a one-time sign-in code instead. Cluster launch, session restore, the app's shell policy, Hub pulls, Web pairing and media downloads fail closed on...
Read more

TensorFold 1.3.3

Choose a tag to compare

@ashhart ashhart released this 21 Nov 20:58

TensorFold 1.3.3

1.3.3 makes GLM faster. On CUDA, GLM-5.3-Flash drafted decode after a 1,040,384-token prompt is 13.8% faster at TP=4. On Macs without tensor units, GLM cold prompts take 5.17% to 5.68% less time. It adds picture generation for MOSS-Image on CUDA through POST /v1/images/generations, GLM-OCR on HIP, DFlash2 drafting for GLM-5.3-Flash on Metal, EXL3 mcg experts at 1 to 8 bits for GLM-5.3-Flash on CUDA, structured output for DeepSeek-V4.1 on CUDA, and Idol's image encoder on Metal. The server gains an opt-in execution witness, a prompt-cache flush route, per-request deadlines (deadline_s), structural tags, deferred and namespace tools, and TENSORFOLD_PARALLEL. By default, long prompts on CUDA now share their steps with running replies, each image takes a fixed share of the visual-token budget, and LFM2-MoE, LFM3, MiniMax-M3 and Qwen3.5-2B on Metal fill new prompts between other streams' decode rounds. The speed changes below keep the same tokens, bits or bytes where their bullets say so.

Speed

  • GLM-5.3-Flash on CUDA (long-context decode): drafted decode after a 1,040,384-token prompt takes its DSA index scores from tf_glm_index_scores. It is 13.8% faster at TP=4 (172.39 against 151.51 tok/s median), with byte-identical scores and the same tokens. Shorter windows keep tf_glm_scores (#3689).
  • GLM-5.3-Flash on CUDA (TP=3, 5, 6 or 7): at these widths a rank's fused KDA input is not a multiple of eight columns. The stack is now padded at load to its own width rounded up to eight columns and stays row-major bf16, so prompt windows take the staged B16 tiles with every byte as before. TF_GLM_KDA_PAD=1 still tiles the stack for glm_mm (#3697, for #3516).
  • GLM-5.3-Flash on CUDA (split drafter): TF_GLM_DRAFT_SPLIT=1 splits the DFlash2 drafter's MLP across three ranks or more where each share is 256-aligned, without TF_ROCE=1. The ranks must set it alike, two ranks split as before, and unset changes nothing. On three GB10s whose gathers stay on NCCL, decode with --drafter is about 5% faster at one stream (four streams within their start-to-start spread), with the same replies and the same tokens a round on the measured prompts. As with TF_ROCE=1, the split drafter adds its down projection's rank shares in another order, so its proposals can differ at near-ties (#3616, for #3581).
  • GLM on Metal before M5 (prompts): vectorized prompt, KDA and indexer kernels on Macs without tensor units cut cold prompt time 5.17% to 5.68% (2K to 64K tokens), with 0/64 token differences. (#3921, refs #3152).
  • GLM on Metal (DFlash2): decoding skips inactive draft rows and their tap capture, and the tap mean writes into its ring in place. This cuts sampling overhead without changing verified tokens (#4257).
  • DeepSeek-V4.1 on Metal (multi-stream decode): a decode round over several streams runs each per-stream stage (window key, compressed rows and index keys, ratio-2 pooling, decode attention, index scores, candidate blocks and the top 512) as one dispatch over a table of the streams' state. There is one barrier between stages instead of one a stream, and the bits are the same (#2954, refs #2984).
  • DeepSeek-V4.1 on Metal (sampling and drafts): DSpark drafts are selected over the whole vocabulary on the GPU with an adaptive block size (#3405). Sampling keeps its scratch between picks and scans greedy logits in vectors, choosing the same IDs (#3288).
  • DeepSeek-V4.1 on CUDA (copy drafter): opt-in TF_DSV41_COPY_DRAFTER=1 turns on the lookup planner with a copy drafter that ranks matches within a length band by how much continuation they offer. It offers 8 drafts, widens to 15 after a round that keeps every copy, and offers a copy only when it is expected to keep at least as many tokens as the other drafter. It is refused when TF_DSV41_LOOKUP is off or blank, and unset leaves TF_DSV41_LOOKUP_PLAN=1 as it was (#2638).
  • Flash Next on CUDA (draft head): a bf16 language head's draft rows load as 4-bit affine groups of 32 by default. TF_FLASHNEXT_DRAFT_HEAD=bf16 keeps them as stored, and a malformed value stops the start by name. Replies are unchanged because drafts are verified (#3477, refs #1870).
  • Flash Next on CUDA (--tp 2 control link): a rank's control-link wait polls with a 50 µs timeout for its first 50 ms and then blocks as before, so drafted rounds pick up the next header sooner. Replies are unchanged (#2971).
  • Flash Next on HIP (prompts and load): on one GPU, a prompt's first token goes out before its last chunk's kept prompt states are saved, and they are saved before any later step writes the stream's caches. Kept-state copies pass through one pinned 32 MiB buffer, and on Linux each kept state sits on small pages of its own (#3647). With the prompt cache on, a prompt chunk runs on through the cache marks its side buffers can hold, writing each marked row's state aside, instead of ending at the first mark (#3646). The first stream's caches are made at load, so the first prompt no longer waits on allocating them. Each layer's weights are read past the page cache by threads, with the next layer's read under way, and the n-gram gather spreads over all of the pool's parts instead of at most 32 (#3644).
  • Flash Next on XPU: prompt and decode passes run on Xe2 DPAS tile kernels, with prompt chunks sized to the solo stream and MTP chains that stop when draft confidence falls. Replies stay bit-exact across chunk sizes (#3603, refs #3583).
  • Qwen3.8-27B on Intel GPUs (attention): decode and verify attention (attn_decode) runs on a (rows, heads, slices) grid, so the tree rows of one key slice run back to back. Each work group's arithmetic is unchanged, so replies keep their tokens. The XPU kernel contract holds attn_decode and attn_merge to the previous kernels' bytes, with a planted control for the launch order (#2595, refs #2543).
  • Qwen3.8-27B on Metal (sampled drafts): a lone sampled stream's DFlash2 draft tree ranks its candidates with the stream's own keyed draw, so the drafts follow what the target samples. The target still decides every token, and greedy and multi-stream rounds are unchanged (#3978).
  • Qwen 3.5/3.6/3.8 on CUDA (prompt chunks): a prompt chunk before the last that nothing reads (no last-layer tap, learning, MLP or pocket reader, prompt int8 path or image) stops its last layer after its keys, values and RoPE. It skips that layer's query projection, attention, output projection, MLP and head, with the same reply tokens. The final chunk is unchanged (#3060, fixes #2941).
  • CUDA (images on resume): a resumed prompt encodes only the images its kept state does not hold (Gemma 4, Qwen3.5 and Flash Next on one rank), so a follow-up turn skips the vision tower for images the restored prefix already holds. A resume never cuts an image, and Flash Next at --tp 2 keeps encoding every image as before (#3164).
  • CUDA (long prompts beside replies): a long prompt now shares its steps with running replies by default. A filling prompt with more than 32,768 rows left takes a decode share of 0.25 and the 512-row chunk hint, as --decode-share 0.25 does, while a shorter prompt fills whole as before. --decode-share and TENSORFOLD_PREFILL_SHARE keep their meanings (#3486, refs #3397).
  • Nemotron and LFM2 MoE on CUDA (message starts): the prompt cache keeps a state at each message start by default. The next request in a conversation resumes from where its last message began instead of reading the conversation again, within the existing prompt-cache budget and slots (#3696, part of #3617).
  • Nemotron on HIP (MTP drafts): at --tp 1, --mtp-drafts takes up to 15, widening a lone stream's verify window up to 16 rows. Unset or at 3 or fewer, the window stays at four rows. Rounds shared by several streams chain at most three drafts a stream, and above --tp 1 more than three is refused by name (#3613, refs #3394).
  • Metal (new prompts beside replies): LFM2-MoE (#3058), LFM3 (#3088, part of #3021), MiniMax-M3 (#3089, part of #3021) and Qwen3.5-2B (#3090, refs #3021) fill a new prompt a chunk at a time between other streams' decode rounds, instead of stalling those replies for the whole prefill. On LFM3, MiniMax-M3 and Qwen3.5-2B, chunks are cut as before, so replies are unchanged, and a cancel keeps the state at the last chunk's end. On MiniMax-M3, a stepping drafter absorbs each chunk before the next. LFM2-MoE declares prefill_step and cancel_prefill beside reports_fill.
  • MiniMax-M3 on Metal (drafters): the DFlash2 and DSpark drafters hold up to eight streams' blocks in one pass and one wait, instead of a pass per stream, and absorb no longer waits for the GPU. Drafted replies are unchanged (#3121).
  • LFM2-MoE and LFM3 on Metal (rounds): a keep that drops no rows skips the conv-state and logits copy in Cache.keep, since commit and run already wrote those bytes; a partial keep still restores through a new take() (#3078). On LFM3, every stream's qk in a shared round runs in one dispatch instead of once per stream per attention layer, with the same arithmetic per row, so replies are unchanged (#3079).
  • Spark 2.5 on CUDA: gate and up load as one stacked weight and decode in one launch on every CUDA chip instead of two launches, with the bits unchanged. Only 4-bit checkpoints take this path (#3130).
  • HIP (routed prompts): a routed prompt plan keeps the stacked shared expert whole up to the GEMM tile instead of cutting it into 8-row items. On gfx1151, a prompt pass of 33 rows or more takes the GEMM tile for every expert. Decode, lane rounds and the MTP draft head keep the 8-row tile, and outputs keep their bytes (#3521, fixes #3161).
  • Lane host (identical prompts): concurrent identical prompts join a leader that is filling a prompt state it will keep, so they reuse its whole fill and return the same tokens they would alone. A prompt whose state would not be kept, ...
Read more

TensorFold 1.3.2

Choose a tag to compare

@ashhart ashhart released this 20 Nov 19:27

TensorFold 1.3.2

1.3.2 brings faster DeepSeek-V4.1 decode and prompts on Metal (6 to 17% faster decode at one and two streams on an M5 Ultra), faster GLM-5.3-Flash, MiniMax-M3.1-Flash, Flash Next and Qwen3.8-27B paths on CUDA, and wider Flash Next verify windows on HIP. It adds image input for DeepSeek-V4.1 on Metal and dots.mocr on CUDA, Idol's octree and Gaussian decoders on M5 Metal, Muse Spark Open on two GB10s, Qwen3.8 Flash Next on Intel Xe2, PDFs on POST /v1/ocr, DFloat11 checkpoints, gated Hugging Face pulls and the new tensorfold chat and tensorfold log commands. 1.3.2 also includes everything in 1.3.1 (Hy4-flash on Metal). The speed changes below keep the same tokens, bits or bytes where their bullets say so; the --thinking-reserve reordering on Qwen3.8-27B is the one that trades timing, letting a reasoning reply stream faster beside a long cold prompt while that prompt fills more slowly.

Speed

  • DeepSeek-V4.1 on Metal (routed experts): in decode launches of 2 to 16 rows, an expert's MXFP4 weights are read and decoded once for all the rows it takes instead of padding every expert's rows to passes of four, so each row's bits equal the one-row kernel's. On the release weights, with #2973 under it, decode is 6 to 17% faster at one and two streams and 2 to 3% faster at three and four on an M5 Ultra, and 5 to 17% and 2 to 5% faster on an M3 Ultra, with every token unchanged (#2983, part of #2984).
  • DeepSeek-V4.1 on Metal (dense FP8): decode's dense FP8 projections of 1 to 5 rows load their weights before the sums and meet each output's tile roots in one simdgroup, and wide ones with K in whole 1024s take one column a simdgroup; every output bit is unchanged, and on an M5 Ultra one stream decodes 46.4 to 49.5 tok/s without drafts and 82.2 to 84.3 greedy (#3287, part of #2984).
  • DeepSeek-V4.1 on Metal (long prompts): indexer passes skip key blocks that no row's candidate mask reaches, add up the first top-k pass's bin-3 counts per simdgroup before one atomic add and score 128 index rows at a time instead of 64 (ix_rows), with the same tokens in the author's runs (#3669, refs #2984).
  • DeepSeek-V4.1 on Metal (prompt projections): the prompt layer's compressor, indexer key and weight and MoE gate projections run on a new simdgroup-matrix kernel (tf_dsv41_mv_mma) at 16 or more rows, bit-equal to the matrix-vector kernel it replaces (#3668, refs #2984).
  • Qwen3.8-27B on CUDA: drafted decoding past 64K cached tokens uses the MT2 attention tile for 2-16-row windows up to 131,071 cached tokens, with the same tokens and about 5% faster on an RTX 5090 at 129K (#4149).
  • Flash Next on M5: kept DeltaNet states (as M1-M4 have) and the half-nibble 4-bit converts M3 and M4 use are enabled with tensor units too; one stream measured about 6.5% faster on an M5 Ultra (16 prompts of 512 tokens, the two builds alternating with one server each), with tokens equal on 32 of 32 replies (#3271).
  • MiniMax-M3.1-Flash on CUDA: with two or more streams, the drafter takes several streams' DSpark blocks in one pass, as many as a decode window's 16 rows hold, instead of one pass a stream; replies are unchanged (#1426).
  • GLM-5.3-Flash on CUDA (launches): GLM's kernels and qmmf's decode linears launch as programmatic dependent launches, so a decode token's kernels lose most of their launch gaps; experts, the router plan and the RoCE exchange stay plain launches, a prompt chunk's KDA chain launches plain from 64 rows, and TF_GLM_PDL=0 launches everything plain (#3776, refs #3652).
  • GLM-5.3-Flash on CUDA (expert forms): the load races the classic and factored expert forms, which give the same bits, at each of its ten timed decode window widths and keeps the faster one at each (classic unless factored is more than 1% faster) instead of one form for every window; TF_GLM_EXPERT_FORM names one form for every width (#3249).
  • GLM on CUDA (EXL3 experts): a decode window's EXL3 routed experts launch on the 16-pair item plan instead of the group kernel's grid of mostly idle blocks, with the same output bytes (#2044).
  • Flash Next on CUDA (prompts): a prompt pass holds 3,072 rows while other streams decode (it held 1,536), so a long prompt beside running streams takes half as many passes (#3726). TF_FLASHNEXT_READOUT_FUSED=1 (off by default) runs a prompt pass's BF16 hyper-connection read-out from 768 rows in three launches instead of five, with every output byte the same (#3413, refs #3392).
  • Flash Next on HIP: the verify window holds eight rows instead of four, so a stream alone in a round can land copy drafts of up to seven tokens a round; rounds shared by several streams keep three-token copies, MTP still drafts at most three, and each stream's window snapshots take more device memory, which admission counts (#2730).
  • HIP on RDNA3.5 (gfx1151): single-round (K up to 1,024) plain fp32-output routed 4-bit stream launches whose largest item holds 3 or 4 rows skip the lane folds of rows past the item's count (Routing.item_rows), with the same output bytes (#3559, refs #3305).
  • Qwen3.8-27B on Metal (prompt tail): on a prompt's last chunk, the last layer's q and o projections, MLP and final norm run only over the 128-row block that holds the row the head reads, while every row still writes its keys, values and recurrent state; a chunk whose last layer has another reader (drafter taps, images, MoE, a tensor-parallel pair, the ANE share) runs every row as before, and test-qwen27-prompt-tail checks the block byte for byte against an every-row pass (#2826, refs #2165).
  • Qwen 3.5/3.6/3.8 on HIP (prompt tail): a prompt chunk before the last stops its last layer after the keys and values, and the final chunk runs that layer only over the rows that are read, through the shared prompt-tail rule CUDA and Metal use (#2845, for #2829).
  • Qwen 3.5/3.6/3.8 on CUDA: TF_QWEN35_CHUNK_SOLO=8192 lets a foreground prompt pass take up to 8,192 rows while no other stream decodes, back to 4,096 once one does and in background warm passes; unset or 4096 is off, and tokens match it off (#3294).
  • Qwen3.8-27B on Metal before M5: decode rounds read their cached keys through the prefix kernels, as on an M5, and prompt passes size their memory the same way; TF_QWEN27_SHARED_PREFIX=0 keeps cached keys on the tail kernel (#3677, refs #3604).
  • Qwen3.8-27B on Metal with --thinking-reserve: the shorter-reply-first order estimates a reply that is still reasoning as its answer quota plus the reasoning left, taken from the think blocks this server has seen close, instead of counting the whole limit the reserve gave it; replies are the same tokens. On an M5 Ultra, once the server has seen a think block close, a reasoning chat reply beside a 110,000-token cold prompt streams 7.3 chunks a second instead of 2.0, and the prompt's fill takes 17% longer. Before a think block has closed, and for requests without --thinking-reserve or with thinking off, nothing changes (#3371, fixes #3270).
  • Thinking follow-ups: the next turn's background prefill puts the reply's reasoning into its guess when the client sends reasoning back, so thinking requests resume from the real next prompt instead of redoing the pass from before the reply; clients whose history drops reasoning keep the old guess (#3264).
  • CUDA sampler: with a small top_k, the fallback selects and sorts only that many candidates instead of 1,024, with the same tokens and probabilities (#4099, fixes #3712).

New

  • Nemotron 3.5 Bolt on Metal: nemotron_h_puzzle (MLX affine 4-bit) serves text on M1 to M4 Macs, with its per-layer expert counts, latent MoE, bf16 head and Bolt-width Mamba kernels under the kernel contract; an M5 refuses it by name before any weight file is opened, and images and drafts stay deferred (#4162, lands #1038).
  • DeepSeek-V4.1 images on Metal: with --vision, the server loads the checkpoint's vision tower (a checkpoint without vision.* tensors stops at load), and chats with PNG, JPEG or WebP image parts put the tower's rows into the prompt, within --vision-image-tokens (4,096 by default) and --vision-max-images (4). An image's span is prefilled in one chunk, the prompt cache keys image rows by the image's hash, text that spells the image token stays text, and a vision config with zero heads, a zero max_wh_ratio or a downsample_ratio below 2 is refused by name (#3926, part of #1676).
  • Idol on M5 Metal: Idol's octree and Gaussian decoders run natively, from the denoiser's latent to the 3DGS PLY and camera. On an M5 Ultra, 262,144 Gaussians decode in 0.343 s against the SDK's 0.739 s, and 1,048,576 in 1.963 s against 4.653 s, at a 2.43 GB peak footprint against 5.64 GB. Given the SDK's probabilities and draws, every octree level's counts match and the PLY's header and rows equal the SDK's, and both decoders sit as close to an fp32 run as the SDK's own; tf-idol-decode runs those gates from a tools/zig/idol_case.py decode case, and the decoders' nine kernels are registered with the kernel contract (#1773, after #1766, for #1757).
  • Muse Spark Open on CUDA: served on two GB10s from a 1.8-bit EXL3 pack with the prompt cache on, on the shared EXL3 code with its own attention, norm, router and head kernels; any other GPU or number of GPUs is refused by name, and the recipe serves it without a drafter (#1295).
  • dots.mocr images on CUDA: --vision serves images through the image tower instead of refusing them, within the request's --vision-image-tokens budget; text-only replies keep their pinned hashes, and the GB10 runner gains tf-cuda-test dots-text (three prompts served with and without --vision, against pinned reply hashes) and dots-invariants (image prompts cut into chunks against the uncut run) (#2771, refs #1927).
  • Qwen3.8 Flash Next on XPU: serves with MTP and prompt snapshots on Intel Xe2, with 24 reported concurrency and sampling cells m...
Read more

TensorFold 1.3.1

Choose a tag to compare

@ashhart ashhart released this 20 Nov 13:39

TensorFold 1.3.1

1.3.1 is 1.3.0 plus native Hy4-flash on Metal. Nothing else changes: every other model, flag and default is as in 1.3.0.

New

  • Hy4-flash on Metal: tensorfold-native serve takes Tencent's Hy4-flash (hy_v4_flash) 4- and 8-bit MLX checkpoints (TensorFold/Hy4-flash-MLX-4bit-MTP, TensorFold/Hy4-flash-MLX-8bit-MTP) with DFly2 drafts and contexts to 256K tokens (128K by default). Past 2,048 tokens the compressed indexer recalls 2,048 keys a sparse layer, and a following prompt that starts with the last one's tokens prefills only the rest. Drafted output equals plain decode, and a resumed prompt gives the same tokens as a fresh one (#3941, refs #3797).
  • Kernel contract: Hy4-flash's Metal kernels (indexer, MLA projections and attention, hyper-connections, routing, experts, row windows and Engram) and its lane projection variants register under gates 1 to 5, each group with a planted control. Building the records found and fixed a row-window library that failed to compile on Apple chips before the M5 (#4022).

What changes by default

  • Nothing for existing models: the shared Metal code Hy4-flash adds (an 8-bit register layout, in-kernel group sums, mapped expert gathers) is used only by Hy4-flash, and the other models' kernels are built from the same source text as in 1.3.0.
  • Hy4-flash was measured on an M5 Ultra; other Apple chips build its kernels but were not run with the model.

TensorFold 1.3.0

Choose a tag to compare

@ashhart ashhart released this 19 Nov 23:04

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).
  • *...
Read more

TensorFold 1.2.10

Choose a tag to compare

@ashhart ashhart released this 18 Nov 23:01

TensorFold 1.2.10

1.2.10 brings faster DeepSeek-V4.1 prompts on Metal, faster Qwen3.8-27B decode, background responses, tensorfold rm
and tensorfold launch, Qwen3-Embedding and Unlimited-OCR-2 on Metal, and fixes for wrong and empty replies. Every
speedup below keeps replies unchanged; the GLM-5.3-Flash FP8 figure compares two expert formats.

Speed

  • DeepSeek-V4.1 on Metal:
    • Cold prompts run about 5-7% faster on an M5 Ultra (2K tokens 600 to 631 tok/s, 8K 855 to 917, 30K about 1,000 to
      1,063), now that the target's own buffers join the weights' residency set, inside its load limit (#3321).
    • A cold prompt's first chunk reads its Engram rows while the GPU runs the layers before each Engram layer, so on an
      M5 Ultra cold prompts start about 0.3 s sooner at 2K tokens, 0.55 s at 8K and 0.8 s at 30K (#3318).
    • On M5 GPUs (generation 17, macOS 27) the prompt's routed experts run on the tensor units, bit-equal to the decode
      kernels: on an M5 Ultra a 4096-row chunk of a layer takes 155 ms instead of 185 ms. Other Macs keep the simdgroup
      kernels (#3330).
    • The dense FP8 prompt projections take 14 to 19% less time on an M5 Ultra; a 4096-row prompt chunk of release layer
      2 drops from 185 to 175 ms (#3322).
    • Decode launches of 6 to 16 rows run the dense FP8 projections on a simdgroup-matrix tile, so two drafted streams
      decode 3.7 to 5.5% faster on an M5 Ultra and 3.6 to 5.4% faster on an M3 Ultra; other stream counts are level
      (#2973).
    • The server keeps the model's ~300 GiB of weights wired between requests. On an M5 Ultra the first request after a
      restart reaches its first token in 0.28 s instead of 1.8 s, and a cached follow-up after 15 s idle in 0.02 s
      instead of 1-2.5 s (#3384).
    • The prompt cache also keeps a prompt's state before its first user turn (once the system part before it is 256
      tokens or more) and, for a thinking prompt, before its final <think>. A new conversation with the same system
      prompt and tools resumes after them, and the next turn of a thinking conversation resumes from the last one instead
      of reading the whole conversation again (#3345).
    • TF_DSV41_CALIB_FILE now prices draft depth from a cost table measured on the serving machine; with a measured
      table, prose decode on an M5 Ultra rose 0.7% greedy and 2.4% sampled (#3365).
  • Qwen3.8-27B:
    • On CUDA with paged KV and the shared prompt store, streams resumed from one prompt read each shared prefix key tile
      once a forward instead of once a stream: at a 32K shared prefix on a GB10, decode is 57% faster at eight streams
      and 28% at four. Every other forward runs the same kernels as before (#3653).
    • On Metal before M5, a drafted window's rows run the decode attention in pairs over the keys below the window: at a
      32K prompt on an M3 Ultra, drafted decode is 24% faster at one stream and 29% at eight. TF_QWEN27_JOIN=0 keeps
      the unpaired pipelines (#3661).
    • On M1 to M4, the 4-bit prompt matrix multiply reads each input row's group sums and half-precision operands from a
      prepass, bit-equal to the existing tiles: prompts run 3% to 4% faster on an M3 Ultra from 2K to 64K tokens, with
      decode level (#3215).
    • On Intel XPU, the prompt gdn_out kernel takes 22.6% less time on an Arc Pro B70 (736.3 to 570.2 ms over a 32K
      prompt), with byte-identical outputs, its fallback included (#2921).
  • Qwen3.8-Flash-Next:
    • On Metal (M1 through M4), the scale index is now the default for 4-bit experts in groups of 32;
      TF_FLASHNEXT_SCALE_INDEX=0 turns it off. On an M3 Ultra with the MLX 4-bit checkpoint, memory in use once loaded
      falls from 129.6 to 122.5 GiB, drafted decode on one stream is 2.0% to 4.2% faster (prose 138.6 to 142.0 tok/s, a
      copy-heavy edit 282.0 to 293.8), four streams are 2.6% faster (203.1 to 208.3 tok/s) and a cold prompt's first
      token arrives about 1% sooner; load takes about 0.7 s longer (#2805).
    • On HIP (gfx1151), the tf_fn_idx_scores kernel's time falls from 276.0 ms to 141.5 ms at 8K and from 2,873.9 ms
      to 2,091.4 ms at 32K (#3601).
    • On HIP, when several streams draft in one round, the MTP head drafts them together, as on CUDA and Metal: on a
      Strix Halo iGPU, distinct-prompt decode is 2.8-3.9% faster at 2 streams and 6.6-7.1% at 4, with one stream
      unchanged (#2696).
    • At TP=2 on CUDA, the draft head, head-group and rollback passes replay as CUDA graphs on both ranks: with NVFP4 and
      MTP on GB10s, decode is 1.2-1.4% faster and prompts 0.5-2.1% faster (#2837).
    • On two GB10s, the CUDA recipe now lists both RDMA devices of each ConnectX-7 port in NCCL_IB_HCA, with
      NCCL_IB_ADDR_RANGE covering both. On two GB10s joined by one cable, this setting made cold 2,048 to 32,768-token
      prompts at --tp 2 26.5% to 28.1% faster (1,147 to 1,469 tokens/s at 8,192), with decode speed and tokens
      unchanged (#2969).
  • GLM-5.3-Flash on Metal: checkpoints whose routed experts are not 4/64 read each expert once a drafted window for
    every row that picked it, and the shared expert once: on an M5 Ultra, an 8-bit build's greedy decode goes from 50.0
    to 53.0 tok/s and sampled from 46.5 to 48.8 (#3631).
  • Flint on Metal: --drafter takes the published incoai/Flint-DFlash2 draft model through the DFlash2 runtime the
    27B uses, and every reply equals drafts off: greedy decode on an M5 Ultra goes from 174.6 to 233.0 tok/s at one
    stream and 221.4 to 289.7 at two (#3511).
  • Nemotron 3.5 Bolt on CUDA: the shared expert runs on the side stream in decode windows, as on Super, so decode on
    a GB10 is 2.9-3.0% faster at one stream and 1.4-2.1% at four (#2847).
  • Prompt cache, opt-in: TF_CACHE_EVICT=decayed_resume (off by default) gives a resumed snapshot bounded recency
    credit when the RAM store evicts, so agent conversations that keep returning outlive one-off prompts. Through the
    real store at 16 GiB, agent traces rebuild 24.4-34.5% fewer prompt rows, and at 4 GiB 3.8-8.0% fewer (interleaved
    chats 17.7% fewer), with none worse (#3258, #3241).
  • Follow-ups and busy servers:
    • Qwen3.5 on CUDA (qwen3_5 and qwen3_5_moe) declares warm turns, so the server prefills a follow-up's prompt in
      the background and the next turn resumes past the previous reply (#2824). Qwen3.5-2B on Metal declares them too,
      so a follow-up that re-renders earlier rows resumes instead of prefilling the whole conversation again (#3662).
    • Qwen 3.5, 3.6 and 3.8 on CUDA: a background prompt fill stops between chunks when a foreground request is waiting,
      keeps the prefix it has filled and resumes from there (#2873).
    • Nemotron on Metal fills a new prompt a chunk at a time between other streams' decode rounds, instead of stalling
      them for its whole prefill (#3054).
  • Fewer launches and less repeated work:
    • CUDA: a dense Qwen 3.5 MLP's NVFP4 prompt gate, up and activation run in one launch for prompt rows past 16
      (#3252); Spark 2.5 and MiniMax-M3 run a prompt's last layer only on the rows something reads, as Qwen's already did
      (#3122); Nemotron 3.5 Super at TP=2 sends rank 1 one header a decode window and one exact-size message a layer, so
      it queues a window's layers with no host read between them (#2839).
    • Metal: on chips with tensor units, core row projections over windows of 4 or more rows run 8 rows at a time, then
      4, 2 and 1, so each weight code is unpacked once for up to eight rows (#3129); Qwen3.8-27B's projections on M1-M4
      drop their inner barriers, and XS sums compile out before tensor units (#2913, #2900).
    • HIP: at head size 256 on spans of 16,384 keys or more, the planned decode walk scores keys in its own kernels
      without per-element tests or a per-key branch, for Qwen3.6-35B-A3B and Qwen3.8-27B (#3508); on gfx1151, a plain
      prompt of 1 or 2 rows takes the 2-row K-parallel tile (#3273).

Models and features

  • Unlimited-OCR-2 on Metal: Baidu's Unlimited-OCR-2 is served natively from its BF16 release on M5-class Macs, page
    images through serve --vision, with the family's chat template built in. On five reference pages, every departure
    from the release's own reply is a one-step tie (#2074).
  • Qwen3-Embedding on Metal: 0.6B, 4B and 8B serve through /v1/embeddings on chips with tensor units, with the same
    refusals and MRL widths as CUDA; vectors match an FP32 reference within 0.001 cosine distance, and a batch equals its
    single inputs bit for bit (#3494).
  • Nemotron 3.5 Transcribe on CUDA: the language model loads from the bf16 release as published, with exact bf16
    caches and no conversion, and the audio encoder (log-mel, the ASR encoder, the streaming speaker encoder and its
    cache, fusion and projection) runs on the GPU. The server does not take audio input for it yet (#1631).
  • Qwen3.8-27B drafts on its own: serve drafts with DFlash2 when z-lab/Qwen3.8-27B-DFlash2 is already in the
    Hugging Face cache, and one line names it. Nothing is downloaded, a drafter that does not open leaves the target
    serving alone, and --drafter none serves without it. The target checks every drafted token, so replies are the same
    tokens (#3204).
  • GLM-5.3-Flash:
    • On Metal, routed experts stored in the official FP8 checkpoint's format (E4M3 codes, 128 x 128 f32 block scales)
      load as stored, and a combined checkpoint can point at whole FP8 shards. On an M5 Ultra, FP8 experts beside the
      8-bit backbone decode prose at 60.8 tok/s against 55.7 with MLX 8-bit experts; the two expert formats match on
      prompt per-token loss (0.542561 against 0.542376, inside the 0.070% standard error) (#3682).
    • On Metal, a checkpoint that stores layers.45.shared_head.head drafts MTP tokens through it on one Mac while
      lm_head verifies every token, so replies are unchanged (#3632).
    • On CUDA, NVFP4_NZ5 checkpoints load, their block-32 routed experts reading E2M1's code 0b1000 as +5; every...
Read more

TensorFold 1.2.9

Choose a tag to compare

@ashhart ashhart released this 15 Nov 01:22

TensorFold 1.2.9

1.2.9 brings faster decode and long prompts, an Ollama-compatible API, and fixes for a wrong reply and a hang. Every
speedup below keeps replies unchanged.

Speed

  • Nemotron on Metal (without an MTP head): concurrent streams share one round. On an M5 Ultra, two streams decode
    about 20% faster, four about 75%, eight 2.3 to 2.5 times and 24 streams 3.2 to 3.5 times (#3005).
  • GLM-5.3-Flash on CUDA:
    • Long prompts' first token comes 0.6% to 13.7% sooner at TP=3 from 131,072 to 2,000,000 tokens, and 6.7% sooner at
      TP=2 at 1,000,000; shorter prompts at TP=2 stay within about 2% either way (#3159).
    • After a 1,040,384-token prompt, decode rounds are 5.05%, 9.36% and 11.36% shorter at 1, 4 and 8 streams (#2722).
  • Qwen3.8-Flash-Next on HIP (gfx1151): one stream decodes about 6% faster, four streams 2.8% to 4.6% (#2697).
  • Fewer CUDA launches for Flash Next draws (#2927), Nemotron 3.5 draws (15 a level instead of about 112, #3124) and
    Qwen3.8-27B prompts (#2925).

Models and features

  • An Ollama-compatible API: /api/chat, /api/generate, /api/embed, /api/tags, /api/show, /api/ps and
    /api/version on the same engine paths as the OpenAI routes (#3342).
  • tensorfold serve --config FILE.toml reads serve flags from a file, so a launch can be checked in (#2885).
  • Linux: an opt-in memory-pressure governor driven by PSI, TENSORFOLD_MEMORY_PRESSURE=1 (#2156).
  • Groundwork, not used by any served model yet: a CUDA image path for the dense engine (#2768), dots.mocr's vision
    kernels (#2767), and HIP's TCP fabric for two hosts without RDMA (#2961).
  • An experimental Living Weights v2 controller in tools/living_weights_v2 (#3320).

Server and API

  • /v1/models lists each model's input_types. A video sent to a model without video is a 400, not a 500 (#3019).
  • Logprobs work with tools, stop strings and reasoning, and on the Responses API (#3206).
  • With thinking off, a request's reasoning effort reaches the template (#3017).
  • Replies say when they kept a tool call as text, in tensorfold.kept_tool_calls and two /metrics counters (#2814).
  • Streams can carry the committed token IDs, opt-in (#3285).

Fixes

  • Nemotron Omni on CUDA: a failed image request no longer leaks into the next reply (#2985).
  • GLM-5.3-Flash at TP=3: prompt_logprobs over about 100 tokens no longer hangs (#1571).
  • Living Weights: the drift gate no longer refuses a lesson over the writer's own wording (#2929).
  • CUDA: the release server refuses a GPU it has no kernels for, by name, at startup (#2914).

For developers

What changes by default

  • GLM on CUDA: the TF_GLM_INDEX_CUDA kernels and TF_GLM_DSEL are on by default.
  • Flash Next on CUDA: sampled draws are batched by default; TF_FLASHNEXT_BATCH_DRAWS=0 restores per-stream draws.
  • Flash Next on HIP: on one RDNA 3.5 GPU (gfx1150 to gfx1153) serving alone, MTP drafts stop under a 0.8
    confidence floor; other HIP GPUs and families keep 0.3, and --mtp-confidence still overrides it.
  • Server: --reasoning-effort no longer changes a thinking-off prompt.
  • Server: a video_url part sent to a model without video gets HTTP 400 (invalid_request_error), not a 500.
  • CUDA: the release server refuses, by name at startup, a GPU it has no kernels for.

The first three keep replies unchanged. The fourth changes the prompt of a thinking-off request when the server sets
--reasoning-effort. The last two turn a failure into a named refusal.

Thanks

@Bizuayeu, @Defilan, @garvrao80, @gilby, @jimthedj65, @jishnuvenugopal, @laudney, Mia's AI Lab (@MiaAI-Lab),
@Nipale-ai, @Shoestring-dev, @ss-cong, @tarsnake and @WebReflection.

TensorFold 1.2.8

Choose a tag to compare

@ashhart ashhart released this 13 Nov 22:47

TensorFold 1.2.8

1.2.8 adds new models and hardens the server.

  • Models: Recursive's Flint 40B-A2.5B on M5-class Macs; DeepSeek-V4.1 natively on Macs (experimental); the Qwen3 embedding and reranker families on CUDA; OCR through POST /v1/ocr on HIP.
  • Server: you can cancel a request by its id. Request bodies, connections, templates, tokenizer patterns and grammars get fixed limits.
  • Speed: most of the work is on prompts. Flash Next at --tp 2 on CUDA fills prompts 26.5% to 33.9% faster; Qwen3.8-27B MLX 8-bit prompts on an M5 Ultra are about 33% faster; GLM-5.3-Flash's MTP head drafts only as deep as it pays.

Where a speedup was checked for equal output, its entry says so. Some changes alter limits, refusals or startup by default; they're listed under What can change for you.

  • New:
    • Recursive Flint 40B-A2.5B on M5-class Macs, natively from RecursiveSI/flint-int4;
    • DeepSeek-V4.1 on Metal for text prompts (experimental, TF_EXPERIMENTAL=deepseek);
    • Qwen/Qwen3-Embedding-* (/v1/embeddings) and Qwen/Qwen3-Reranker-* (/v1/rerank) on CUDA from the published BF16 weights;
    • POST /v1/ocr in Mistral's OCR contract on the native HIP engine;
    • POST /v1/requests/{id}/cancel;
    • --max-connections, --max-connections-per-address and --trusted-proxy;
    • opt-in TF_GLM_CONTEXT_CEILING, TF_DSPINE_WINDOW and TF_PROMPT_INTERMEDIATE.
  • Speed and memory:
    • Flash Next on CUDA at --tp 2: cold prefill of 2k to 32k tokens is 26.5% to 26.8% faster on two GB10s and 30.9% to 33.9% faster on two RTX PRO 6000s.
    • Qwen3.8-27B MLX 8-bit on an M5 Ultra: cold prompts are about 33% faster.
    • Qwen3.8-27B with DFlash2 on an M5 Ultra: a copy-heavy greedy reply runs at about 792 tok/s instead of 241.
    • GLM-5.3-Flash with its MTP head: one greedy stream decodes 16% to 28% faster at TP=2 and 22-46% faster at TP=3.
    • GLM-5.3-Flash with TF_ROCE=1: decode is about 6% faster at one and two streams on three GB10s, and up to 12.9% faster on four.
    • Flash Next on HIP: cold decode at 4 streams is about 45% faster sampled and 18% greedy on a Radeon 8060S.
    • Video input decodes 2.1x to 3.4x faster on frame threads.
  • Fixes:
    • Qwen 3.5 on CUDA no longer refuses at startup with --prompt-cache-disk or --learn-conversations.
    • GLM-5.3-Flash at four ranks on a switchless ring names the setting that fixes its start-up.
    • A later --compact-at replaces an earlier one.
    • A token id past the embedding table is refused on HIP and XPU.
    • libtfvideo.so links FFmpeg's x86_64 assembly.

New models and backends

  • Recursive Flint on Metal: Flint (40B-A2.5B MoE) is served natively from RecursiveSI/flint-int4 on M5-class Macs, with its kernels and 2048-wide router under the kernel contract, a 262,144-token window, copy drafts and the prompt cache. FLINT_LOAD_LIMIT_GB caps its memory (#1177, fixes #1175). Thanks to @BobClawblaw.
  • DeepSeek-V4.1 on Metal (experimental): with TF_EXPERIMENTAL=deepseek, tensorfold-dsv41 (zig build dsv41-metal-serve) serves the release checkpoint natively for text prompts, with DSpark drafts and the prompt cache.
    • On an M3 Ultra and an M5 Ultra with 512 GB, drafts make one stream 1.21x to 1.50x faster than --no-drafts and two streams up to 1.13x faster; three and four streams are level.
    • token_sha256 is equal in every cell (#1720, part of #1676). Thanks to @gilby, and to @3utsu for an independent M5 Ultra receipt.
  • Qwen3 embeddings on CUDA: Qwen/Qwen3-Embedding-0.6B, -4B and -8B serve /v1/embeddings from the published BF16 weights.
    • On one GB10 the worst cosine distance to float32 is 1.55e-4, 1.34e-4 and 1.08e-4, against transformers' own BF16 at 1.88e-4, 1.79e-4 and 1.77e-4.
    • A request's vectors equal each input sent alone (#2285). Thanks to @Arminova.
  • Qwen3 rerankers on CUDA: Qwen/Qwen3-Reranker-0.6B, -4B and -8B serve /v1/rerank, scoring a request's documents as one decision whose shared start runs once a pass.
    • On one GB10 the worst score from float32 is 5.5e-5, 6.2e-4 and 2.9e-4 on 16 documents of up to 2,579 tokens, against transformers' BF16 at 3.4e-5, 2.8e-4 and 2.2e-4.
    • A document scored alone equals its score in a request of 16 (#2995, part of #2261). Thanks to @Arminova.
  • OCR on HIP: the native HIP engine reads page images through POST /v1/ocr in Mistral's OCR contract, so Mistral's Python and TypeScript SDKs work, with dots.mocr's reader giving a box for each layout block.
    • PDF documents, pages and content-changing options it can't apply are refused.
    • A page cut at the context limit fails with HTTP 422.
    • docs/api.md lists the fields, statuses and limits (#2570, #2440). Thanks to @laudney.
  • dots.mocr's text decoder on CUDA: it serves text prompts on a GB10 from the publisher's BF16 weights, on a new shared engine for dense GQA decoders. --vision, prompt caching and fp8 caches are refused by name (#2673, part of #1927). Thanks to @laudney.
  • MOSS-Image on Metal: tf-moss-image-generate makes a picture from options alone (--prompt, --negative, --width, --height, --steps, --seed, --guidance) at the card's defaults (#2719, for #1531). Thanks to @devopsfortunato.
  • Groundwork that no served model selects yet:
    • a DFlash2 draft engine for chains in HIP's qwen3_5 engine: in the drafter test with Qwen3.8-27B on gfx1151, 0.86 of first drafts are right and a round makes about 5 tokens greedy (#2726, part 4 of #1563). Thanks to @AbrahamCete.
    • a bf16 grouped-experts format in the CUDA kernels (#1630). Thanks to @BobClawblaw.
    • a TCP transport for tensor parallel on hosts without RDMA, checked bit for bit over two hosts (#2718, part of #2065). Thanks to @Shoestring-dev.
    • pipelined rounds in the shared stage driver, with tokens checked equal to one engine (#2579, part of #2005). Thanks to @jschmied.

Server and API

  • Cancel a request: POST /v1/requests/{id}/cancel cancels a running or queued request by its chatcmpl-, cmpl- or resp_ id. The reply ends cancelled with the tokens it had, and other streams are unchanged.
    • With API keys only a full or [admin] key may cancel.
    • A server without keys answers only direct loopback callers (#3193, fixes #3172).
  • Connections: under connection pressure (96 of 128 slots open), one client address holds at most a quarter of the slots, and an idle keep-alive connection gives its slot up only when every slot is taken.
    • New flags: --max-connections, --max-connections-per-address and --trusted-proxy.
    • Below pressure nothing is refused (#3048).
  • Limits on untrusted input:
    • a request body no route reads is capped at 64 KiB (#3029);
    • a chat template is held to a nesting depth, step count, stack depth and scratch memory, and renders byte-identically and as fast as before (#3072);
    • a tokenizer split pattern gets a work allowance of 2,048 instructions a byte (#3071), and a token id above 2^24 is refused at load (#3033);
    • a grammar's exploration stops at 2^38 steps, with no time limit, so the answer doesn't depend on the machine (#3037).
  • Media, files and sessions:
    • a media URL whose host resolves to many addresses no longer hangs the fetch (#3035);
    • compaction notes and the fact graph are written owner-only through a renamed temporary file (#3031);
    • a crafted session chunk is refused, and the disk tier's files are owner-only (#3030);
    • pull refuses repository files under the engine's reserved names (#3032).
  • Cluster:
    • on a real host, a node takes only the nodes its cluster file names (#3039);
    • a file pulled whole is checked against the manifest's hash (#3043), and a pull that would leave a file held only in part is refused unless allowed. No shipped command calls the cluster loader yet (#3074).
  • Prompt cache:
    • Intermediate checkpoints (opt-in for Flash Next on CUDA): with TF_PROMPT_INTERMEDIATE=1, a bounded ladder of intermediate checkpoints lets a compacted prompt resume inside its retained prefix. On one GB10 with drafts off, a 104K-token request that kept its first 100K resumed 65,536 tokens instead of 2, cutting time to first token from 50.7 s to 19.9 s with the same tokens (#1953, fixes #1909). Thanks to @javierbits.
    • Shared pages: on the core pool, the radix store holds each pool page once, and a snapshot save can no longer make reclaim prune the leaf it is writing to (#2875, part of #2444). Thanks to @laudney.
  • Settings:
    • TF_GLM_CONTEXT_CEILING (opt-in) opens GLM-5.3-Flash windows past 1,048,576 tokens (#2765). Thanks to @Bizuayeu.
    • TF_DSPINE_WINDOW=N (16 to 8,192, opt-in) narrows a Qwen3.8-27B DSpine drafter's window without editing the checkpoint (#2705). Thanks to @jschmied.
    • --profile fast refuses as not planned, and --profile fast-exact names the token gates it still needs (#2794). Thanks to @devopsfortunato.
  • Cortheon:
    • page links survive whitespace around href or inside the URL (#3006). Thanks to @ppardus.
    • DuckDuckGo results are kept, with their ads still skipped, whatever the markup's spelling (#2750). Thanks to @ppardus.
  • Startup lines:
    • Qwen3.8-27B on Metal says how many streams draft (#2806).
    • GLM-5.3-Flash with --vision and no video library says what --vision-video-tokens sets aside: 128 MiB a stream at the default 16,384, or 512 KiB at 64 (#2813). Thanks to @Bizuayeu.
    • DeepSeek-V4.1 prints its transport on both ranks (#2877).
    • The DFlash2 drafter for GLM-5.3-Flash gives its licence as Apache-2.0 (#3084).

Speed and memory

  • Flash Next on CUDA at --tp 2: a prompt pass wider than 64 rows reduce-scatters its routed experts' slots, and replies keep their tokens.
    • On two GB10s, rank 0 sends 3.43 MiB a prompt token instead of 5.81, and cold prefill of 2k to 32k tokens is 26.5% to 26.8% faster.
    • On two RTX PRO 6000s it is 30.9% to 33.9% faster (#2977). Thanks to @swbiggar...
Read more