Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
9e7f502
Restore shared Living Weights and reviewed lesson safety
ashhart Oct 18, 2026
1892084
Restore CUDA lane rounds with the reviewed decode fixes
ashhart Oct 18, 2026
bd5dbfb
Restore shared Flash Next vision with reviewed grammar and cache fixes
ashhart Oct 18, 2026
209ee73
Restore per-engine Flash Next windows and reviewed rotary contracts
ashhart Oct 18, 2026
79af9d6
Place live replay beside its lesson owner
ashhart Oct 18, 2026
dbd5b2f
Match conversation teaching and checks to reader capabilities
ashhart Oct 18, 2026
b2338a8
Keep lesson progress alive through long units
ashhart Oct 18, 2026
88c3443
Keep dense learner reads separate from served graph variants
ashhart Oct 18, 2026
b7e1b27
Batch independent cold teacher prompts without changing lesson order
ashhart Oct 18, 2026
d3509f6
Publish reading progress before the first long learner unit
ashhart Oct 18, 2026
c316b50
Finish shard saving before closing the lesson stream
ashhart Oct 18, 2026
3238979
Size captured Qwen launches for live rows and windows
ashhart Oct 18, 2026
9db03c0
Share startup warmups while measuring each decode width
ashhart Oct 18, 2026
cc85750
Integrate runtime sessions and common EXL3 ownership
ashhart Oct 18, 2026
8fcad83
Admit DeepSeek shared configuration and checkpoint layouts
ashhart Oct 18, 2026
3d75343
Add DeepSeek Engram ownership and token maps
ashhart Oct 18, 2026
f755f4b
Wire common EXL3 CUDA forms and launch contracts
ashhart Oct 18, 2026
127b3ee
Emit the DeepSeek block specialization inventory
ashhart Oct 18, 2026
335aca3
Load DeepSeek runtime forms with checked staging
ashhart Oct 18, 2026
8eccc8c
Add paged split KV and shared session transactions
ashhart Oct 18, 2026
6d33a53
Run DeepSeek forward and prefill through common state
ashhart Oct 18, 2026
1c80298
Draft DeepSeek replies with keyed shared lane sampling
ashhart Oct 18, 2026
b0f4bd8
Serve DeepSeek with owned device drafts and sessions
ashhart Oct 18, 2026
1964746
cuda: retain shared EXL3 resolvers and training image exports
ashhart Oct 18, 2026
eabe96c
cuda: retain lane forwarding and unsupported policy refusal
ashhart Oct 18, 2026
0fe59c4
Install selected contract images through their current common owners
ashhart Oct 18, 2026
2c2d058
Require explicit x3ld specialization on every selected architecture
ashhart Oct 18, 2026
d2d63ca
Stabilize Engram and MiMo allocation-failure controls
ashhart Oct 18, 2026
283d2e5
Register tree-round launches with repaired pending fixtures
ashhart Oct 18, 2026
b44ee9f
Extend row contracts with the reviewed rounding and pending declarations
ashhart Oct 18, 2026
7162134
Serve Kolibri through the current native and shared operator owners
ashhart Oct 18, 2026
76765b5
Batch fresh GLM prompts on the maintained rank owners
ashhart Oct 18, 2026
09d39bd
Keep fixed-K GLM prompts explicit and disabled by default
ashhart Oct 18, 2026
9443d56
Score GLM prompt rows with startup-owned output mappings
ashhart Oct 18, 2026
2b6c7a6
Support GLM grammars with sequence-owned redraws and pending sampling…
ashhart Oct 18, 2026
d267438
Parse the GLM tool markup through maintained protocol owners
ashhart Oct 18, 2026
d2b6470
Version benchmark natural stops with guarded publication commands
ashhart Oct 18, 2026
5841619
Route chat-only benchmark cells from explicit capabilities
ashhart Oct 18, 2026
99b6572
Declare the DeepSeek native family chat-only
ashhart Oct 18, 2026
a4bd65b
Split current Flash Next replay along its ownership seams
ashhart Oct 18, 2026
ebb6bdc
Split current Flash Next loading and served generation
ashhart Oct 18, 2026
fc8502e
Split Metal build construction with the current candidate test wiring
ashhart Oct 18, 2026
105398c
Pin serving guards to the reviewed lane and decode baseline
ashhart Oct 18, 2026
3af275a
Carry the runtime-one AOT fallback after specialized candidates
ashhart Oct 18, 2026
fc6d416
Preserve nospec selection and capture checks before runtime-one fallback
ashhart Oct 18, 2026
f69c7fa
Keep restored catalog and native owners within source limits
ashhart Oct 18, 2026
bb25309
Keep the vision refusal fixture aligned with the shared parser
ashhart Oct 18, 2026
45bb19a
Avoid gathering already contiguous lone drafter mask rows
ashhart Oct 18, 2026
1eb81e5
Build straight CUDA window schedules without the branch planner
ashhart Oct 18, 2026
2090adc
Propagate rotary probe errors through FP32 phases and BF16 endpoints
ashhart Oct 18, 2026
c59e828
Synchronize the halt fixture with the observed halt request
ashhart Oct 18, 2026
7520d4c
Allocate DeltaNet rollback banks for the slots that need them
ashhart Oct 18, 2026
1fe556f
Restore EXL3 unpack helpers and check CUDA source includes
ashhart Oct 18, 2026
8aa29ba
Price lone CUDA windows from their own complete rounds
ashhart Oct 18, 2026
3ad0497
Restrict DeepSeek images to their supported SM targets
ashhart Oct 18, 2026
86567eb
Report request times on completion lines
ashhart Oct 18, 2026
8529473
Draw fresh sampling seeds for native requests
ashhart Oct 18, 2026
443cf3d
Add the host block-CSF scale codec (#1021)
Bizuayeu Oct 18, 2026
6630a1c
Count indexed checkpoint shards and refuse incomplete estimates (#1022)
Bizuayeu Oct 18, 2026
836e952
Describe per-module mixed-precision checkpoint recipes (#1023)
Bizuayeu Oct 18, 2026
9e423aa
Pack FP8 scales from global rank-share origins (#1024)
Bizuayeu Oct 18, 2026
9b78f7b
Read zstd-compressed CUDA resource images
ashhart Oct 18, 2026
caac51d
Fix DeepSeek launch bounds and bind every contract image
ashhart Oct 18, 2026
fb962e2
Share completed CUDA shape warmup passes
ashhart Oct 18, 2026
34ad2ed
Complete CUDA window calibration before starting the lane worker
ashhart Oct 18, 2026
7e652ea
Size drafter scratch for served streams and report startup phases
ashhart Oct 18, 2026
9c11d9d
Cache Qwen CUDA window costs before serving
ashhart Oct 18, 2026
73d0881
fix(cuda): preserve first-token handoff through native host
jrb-ai Oct 18, 2026
3a9b4d8
docs: update contributor links to jrb-ai
jrb-ai Oct 18, 2026
36188d9
Preserve the first-token policy through recorded backends
ashhart Oct 18, 2026
4d1a3f1
Reuse affine-4 weights across 32 GB10 verify rows
ashhart Oct 18, 2026
6b5549a
Describe the composed 1.1.1 release changes
ashhart Oct 18, 2026
eb25143
Report the source release version and guard changelog drift
ashhart Oct 18, 2026
788869d
Require API keys on every private HTTP route
ashhart Oct 18, 2026
9fe5ecf
Reject HTTP requests from untrusted hosts and origins
ashhart Oct 18, 2026
9f61b36
Document efficiency-core pinning for long CUDA runs
ashhart Oct 18, 2026
f70c4b9
Name optional runtime libraries and report their loader availability
ashhart Oct 18, 2026
9c8ce4b
Select precise rotary math and qualify it by complete Metal sweeps
ashhart Oct 18, 2026
4163a8b
Make the optional Neural Engine prompt share opt-in
ashhart Oct 18, 2026
ad87a2d
Document precise Metal rotary math and the GLM NVFP4 regression
ashhart Oct 18, 2026
5b2e274
Gate experimental DeepSeek CUDA serving behind an explicit opt-in
ashhart Oct 18, 2026
c9ff37b
Explain the GLM short-prompt grouping change in the release notes
ashhart Oct 18, 2026
72baf2e
Render the HIP follower dependency refusal once
ashhart Oct 18, 2026
2cfa68c
Refresh explicit serving approvals after verification and runtime fixes
ashhart Oct 18, 2026
9fb530e
Keep Hub fake-IP checks and downloads on one HTTPS endpoint
ashhart Oct 18, 2026
e9ee1aa
Require a complete drive path shape in release payload text
ashhart Oct 18, 2026
574a7fe
Update contributor credit for renamed GitHub account
ashhart Oct 18, 2026
77152dc
flashnext: restore the CUDA column copy and check literal kernel lookups
ashhart Oct 18, 2026
3e3f895
qwen CUDA: keep prompt expert arithmetic independent of verify capacity
ashhart Oct 18, 2026
d2f079b
Refuse unavailable DeepSeek release backends consistently
ashhart Oct 18, 2026
8d4faf5
DeepSeek V4.1: the Engram token map built in Zig, byte-identical to t…
akol1 Oct 14, 2026
e16ec0f
DeepSeek V4.1 Flash: configuration, Engram tables and resident weight…
akol1 Oct 13, 2026
31da5b2
DeepSeek V4.1 Flash: Metal operators with fp64-dot references and the…
akol1 Oct 13, 2026
60a16a3
THIRD_PARTY_NOTICES: the native DS4.1 reference follows DeepSeek-V4.1…
akol1 Oct 13, 2026
0dcf49d
DeepSeek V4.1 load: a shard contributes only the tensors the index ma…
akol1 Oct 13, 2026
466a4c4
DeepSeek V4.1 load: the router gate and bias ride the pack's dtypes
akol1 Oct 13, 2026
3a7d6bb
DeepSeek V4.1 load: the Engram gate weights ride f32 or bf16
akol1 Oct 13, 2026
c69533f
DeepSeek V4.1: the kept-dense EXL3 form, for rank-split repacks
akol1 Oct 13, 2026
a942700
DeepSeek V4.1 reference: the kept-dense apply
akol1 Oct 13, 2026
197e25b
DeepSeek V4.1 load: the shard-plan tests pass the index-ownership arg…
akol1 Oct 14, 2026
5423bf0
DeepSeek V4.1: the rebase residue — one counters binding, the state-w…
akol1 Oct 14, 2026
5805f65
mHC fp64 ideal reference: the mix at rounding level, 1-ULP noise atte…
akol1 Oct 14, 2026
d0af92e
CSA2 reference: FP64-ideal parameterization of the pool, RMS and spar…
akol1 Oct 14, 2026
178dbec
csa2: FP64 stage harness, compressor pool + RMS, six adversarial inpu…
akol1 Oct 14, 2026
f106e35
csa2: FP64 stage harness over the sparse attention kernel, with kerne…
akol1 Oct 14, 2026
bac57d2
csa2: indexer stage harness — FP32/FP64 score comparison and top-k se…
akol1 Oct 14, 2026
d5cebed
csa2: indexer stage receipts — carry the BF16 einsum/score boundaries…
akol1 Oct 14, 2026
53e49d1
csa2: sparse stage reads its own FP32 rounding level before the BF16 …
akol1 Oct 14, 2026
e4347ee
csa2: per-stage harnesses for sinks, tile denominators, output mix an…
akol1 Oct 14, 2026
34d6746
csa2: measure how much score noise the top-k selection absorbs
akol1 Oct 14, 2026
d7aeb04
The fp64 harness ports: dedupe the shared math helpers, fix the shard…
akol1 Oct 14, 2026
054a4ee
The oracle records the indexer's selection margins while it teaches
akol1 Oct 14, 2026
a3b31df
The indexer-margin capture at depth: one diagnostic token's selection…
akol1 Oct 14, 2026
361548e
DeepSeek V4.1: lane slots, each with its own caches and Engram cursor
akol1 Oct 13, 2026
d5347cb
tf-dsv41-run: the counters read the full rusage_info_v4
akol1 Oct 13, 2026
7f3d4f2
DeepSeek V4.1: the lane backend, a stream a slot
akol1 Oct 13, 2026
033bcaa
DeepSeek V4.1: the lane host behind the native server
akol1 Oct 13, 2026
2c839f8
serve: --engram-table-dir reaches the native engine
akol1 Oct 13, 2026
51c76e6
DeepSeek V4.1: the lane host builds the token map when it is missing
akol1 Oct 14, 2026
3fd5b68
DeepSeek V4.1: the family guide
akol1 Oct 14, 2026
3b8fbb6
the generated table through zig fmt
akol1 Oct 14, 2026
1cbe4b8
the operator harnesses through zig fmt
akol1 Oct 14, 2026
ed35475
deepseek-v41: engram_rows, uncached row reads into compact staging
cwschroeder Oct 17, 2026
2f8947c
deepseek-v41: --engram-stream, tables read per chunk instead of wired
cwschroeder Oct 17, 2026
e57eb9d
deepseek-v41: engram_rows misses go through a Fetcher interface
cwschroeder Oct 17, 2026
185caa5
server: DeepSeek V4.1's DSML tool calls (a space after the bar)
cwschroeder Oct 17, 2026
1b28f74
deepseek-v41: tf-dsv41-template-check, a template against a release's…
cwschroeder Oct 17, 2026
9645c69
docs: DeepSeek V4.1 on 256 GB with --engram-stream
cwschroeder Oct 17, 2026
900cedd
tf-dsv41-run: lanes accepts its CONTEXT argument
cwschroeder Oct 17, 2026
72f8875
deepseek-v41: dense dots one column per SIMD group, loads issued ahead
cwschroeder Oct 17, 2026
f346d02
exl3: a two-column matmul for products too small to fill the GPU
cwschroeder Oct 17, 2026
c67e37a
deepseek-v41: the eight wo_a slices as one indexed product
cwschroeder Oct 17, 2026
c5b41cd
deepseek-v41: the shared expert as each token's seventh routed row
cwschroeder Oct 17, 2026
550b8fc
deepseek-v41: batch wo_a and merge the shared expert only for few rows
cwschroeder Oct 17, 2026
7ca779a
exl3: encodeJobs, independent products as one concurrent group
cwschroeder Oct 18, 2026
3dbe151
deepseek-v41: a concurrent forward encoder with independent product g…
cwschroeder Oct 18, 2026
ad6ab78
exl3: borrow output rotation blocks for Metal tensor parallelism
cwschroeder Oct 18, 2026
cc387e3
exl3: partition resident expert descriptors by output blocks
cwschroeder Oct 18, 2026
968f35f
deepseek-v41: add experimental two-rank MoE output partitions
cwschroeder Oct 18, 2026
cb66809
exl3: compare partitioned expert descriptors with full Metal outputs
cwschroeder Oct 18, 2026
b7ea8d2
deepseek-v41: test repeated TP exchanges and poisoned peer channels
cwschroeder Oct 18, 2026
426efd1
deepseek-v41: adapt streamed loading and tokenizer wiring to current …
cwschroeder Oct 18, 2026
c3985f1
deepseek-v41: mirror native lane commands across the TP pair
cwschroeder Oct 18, 2026
c9b2f9a
exl3: stage the GPU qualification binary for remote hardware checks
cwschroeder Oct 18, 2026
9aecfae
deepseek-v41: add bounded TCP window transport for the TP pair
cwschroeder Oct 18, 2026
0f44e3e
deepseek-v41: bound startup pairing separately from TCP message waits
cwschroeder Oct 18, 2026
e18c7cb
deepseek-v41: stage qualification binaries for protected GPU windows
cwschroeder Oct 18, 2026
25926d3
deepseek-v41: place transport comments beside their declarations
cwschroeder Oct 18, 2026
1f1e4e2
Split EXL3 and DeepSeek numerical qualification by operator boundary
cwschroeder Oct 18, 2026
a86286f
Record teacher wall time including tensor-parallel communication
cwschroeder Oct 18, 2026
40d9972
Make Engram Unicode tables reproducible and apply the generated-data …
cwschroeder Oct 18, 2026
2d0079b
docs: preserve token map provenance and normalization caveat
cwschroeder Oct 18, 2026
53071ae
docs: condense DeepSeek operator and loader comments
cwschroeder Oct 18, 2026
c66964b
docs: locate input projection contracts beside their declarations
cwschroeder Oct 18, 2026
d30f550
docs: preserve CSA2 boundary case rationale outside test comments
cwschroeder Oct 18, 2026
bed52ce
docs: document reference precision and rounding boundaries
cwschroeder Oct 18, 2026
c7588b1
docs: clarify selection and retained mHC reference controls
cwschroeder Oct 18, 2026
a8d4e28
docs: preserve execution contracts and satisfy lean comment policy
cwschroeder Oct 18, 2026
c9a31ee
fix: free failed DeepSeek model allocation exactly once
cwschroeder Oct 18, 2026
eede144
test: probe TCP exchanges after configurable idle gaps
cwschroeder Oct 18, 2026
736236a
diagnostics: time DeepSeek TP exchange phases on request
cwschroeder Oct 18, 2026
40cf407
test: exercise DeepSeek framed transport without loading a model
cwschroeder Oct 18, 2026
b83565e
fix: use the runner clock in the framed transport probe
cwschroeder Oct 18, 2026
e84be8a
diagnostics: separate TP packing and Metal submission waits
cwschroeder Oct 18, 2026
8530a87
fix: avoid reserved keyword in TP timing variable
cwschroeder Oct 18, 2026
aa7f09f
diagnostics: distinguish GPU scheduling from completion latency
cwschroeder Oct 18, 2026
8ee5f9b
deepseek-v41: use model-owned resources for TP command buffers
cwschroeder Oct 18, 2026
fe5962a
deepseek-v41: request residency after adding TP descriptors
cwschroeder Oct 19, 2026
b338291
deepseek-v41: add opt-in bounded weight residency sets
cwschroeder Oct 19, 2026
245ff50
deepseek-v41: allow periodic residency requests for immutable weight …
cwschroeder Oct 19, 2026
e7abd3b
deepseek-v41: copy only initialized residency handles
cwschroeder Oct 19, 2026
b27e39a
deepseek-v41: own residency refresh worker within the model module
cwschroeder Oct 19, 2026
b10231b
Interleave stepped GLM CUDA prompt admission with decode
ashhart Oct 18, 2026
5aedc7c
docs: record M3 Ultra TCP pair parity, state checks and slower decode
cwschroeder Oct 19, 2026
47ea1bb
Merge 1.1.1 into main
ashhart Oct 19, 2026
d1018b3
app tests: keep the test certificate's serial a minimal DER integer
ashhart Oct 19, 2026
4e20a5e
deepseek-v41: integrate the Metal capability with current shared fami…
cwschroeder Oct 19, 2026
e183f0d
deepseek-v41: use Zig 0.17 type reflection in the Metal capability view
cwschroeder Oct 19, 2026
0bd7c98
deepseek-v41: enumerate field names through the pinned compiler API
cwschroeder Oct 19, 2026
f6f7c5a
deepseek-v41: share tokenizer ownership and retain template qualifica…
cwschroeder Oct 19, 2026
61ab890
deepseek-v41: prototype parallel key scoring without changing attenti…
cwschroeder Oct 19, 2026
452ee7c
deepseek-v41: prototype whole-slot MoE partition with one exchange pe…
cwschroeder Oct 19, 2026
cdfa520
deepseek-v41: register parallel attention gates and reserve its 256-t…
cwschroeder Oct 19, 2026
8c6e65a
docs: record M3 attention gains and whole-slot TCP partition receipts
cwschroeder Oct 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ zig-out/

# Versioned GUI build resources, generated app engines stay ignored in app/.gitignore.
!app/build/
# mHC fp64 qualification receipts.
/receipts/
*.log
49 changes: 46 additions & 3 deletions CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ It needs glibc 2.28 or newer and an NVIDIA driver providing `libcuda.so.1`. Keep
See the [CUDA runbook](RUNBOOK.md#linux-and-cuda) for runtime libraries and supported GPUs.

```sh
V=1.1.0
V=1.1.1
case "$(uname -m)" in
aarch64|arm64) PLATFORM=linux-aarch64 ;;
x86_64) PLATFORM=linux-x86_64 ;;
Expand Down Expand Up @@ -134,6 +134,7 @@ Conversions are explicitly marked: their upstream weights need the linked conver
| Gemma 4 31B, MLX 4-bit | `tensorfold pull mlx-community/gemma-4-31B-it-4bit@696d436c404745a59f30e4939a658162b0a9e57f`<br>`tensorfold pull z-lab/gemma-4-31B-it-DFlash@eabd648301ce28583cc14757912e5e0f84e152e1` | One M5 Mac; M5 Ultra checked. M1-M4 refused. | [Native 31B](docs/recipes/gemma-4-native.md). Name the drafter with `--drafter`; images with `--vision`. |
| Gemma 4 12B, converted MLX 4-bit | `hf download google/gemma-4-12B-it --revision 707f0a3b8a3c7ad586ed01e27eafbad8a27dd0f7 --local-dir ~/models/gemma-4-12b-hf`<br>`hf download google/gemma-4-12B-it-assistant --revision 46d4c6f13f0ac0ad827b915669b8df9b81c64c51 --local-dir ~/models/gemma-4-12b-assistant` | One M5 Mac; converted text weights 6.3 GB, image weights 100 MB, plus assistant/caches. M1-M4 refused. | [Convert and serve](docs/recipes/gemma-4-12b-native.md). Upstream download needs `hf`; conversion needs Python, mlx and mlx-lm. Serving is native. |
| Step-5-Preview, converted affine | `hf download stepfun-ai/Step-5-Preview --local-dir ~/models/step5-preview-fp8` | One 256 GB Mac; text 166.9 GiB, MTP adds 2.5 GiB and vision 3.7 GiB. | [Convert and serve](docs/recipes/step-5-preview.md). The documented 256 GB setup serves converted affine weights; converting the upstream FP8 download needs Python and mlx. |
| Kolibri-1, block FP8 (research) | `tensorfold pull Aleph-Alpha/Kolibri-1@e52eb4627d11516b0c01de49210ab5a4e4061444` | One NVIDIA GPU; GB10 measured; 74 GB checkpoint. | [Kolibri](docs/recipes/kolibri-1.md). Text only; copy drafts, no EAGLE-3/neural drafter. |
| Liquid AI d1-3B, decisions | Not documented yet. | Native CUDA; RAM minimum not published. | [API section below](#serve-flags). `/v1/systemone` and `/v1/decisions`. |
| Fish Audio Drama 3, speech | Not documented yet. | Native Metal or CUDA; GB10 measured. | [Release audio instructions](CHANGELOG.md#110). `/v1/audio/speech`; checkpoint and `codec.pth` required. |

Expand Down Expand Up @@ -231,6 +232,7 @@ The binary's `capabilities --json` response lists its supported flags and platfo
| `--speed-up FILE` | Rank and link settings for two-Mac Flash Next or GLM serving. |
| `--max-tokens N` | Default reply limit, 4096; requests can override it. |
| `--temperature T` | Sampling temperature; zero requests greedy decoding. |
| `--prompt-seed` | Use native prompt-derived keys instead of the fresh OS fallback; request and configured default seeds still win. |
| `--top-p P`, `--top-k K`, `--min-p P` | Sampling defaults. |
| `--thinking`, `--no-thinking` | Choose whether the chat template opens a reasoning block. |
| `--reasoning-effort LEVEL` | Default template effort: `low`, `medium`, `high` or `xhigh`. |
Expand Down Expand Up @@ -375,7 +377,7 @@ Thank you to everyone who has sent TensorFold a pull request, a measurement or a
[@johnymoo](https://github.com/johnymoo),
[@JordiPosthumus](https://github.com/JordiPosthumus),
[@JRaxworthy](https://github.com/JRaxworthy),
[@jregan-beasley-smc](https://github.com/jregan-beasley-smc),
[@jrb-ai](https://github.com/jrb-ai),
[@jschmied](https://github.com/jschmied),
[@juliankang4](https://github.com/juliankang4),
[@kelchm](https://github.com/kelchm),
Expand Down
2 changes: 1 addition & 1 deletion RELEASE-NOTES-1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Thank you to all 145 public contributors who have sent TensorFold a pull request
[@johnymoo](https://github.com/johnymoo),
[@JordiPosthumus](https://github.com/JordiPosthumus),
[@JRaxworthy](https://github.com/JRaxworthy),
[@jregan-beasley-smc](https://github.com/jregan-beasley-smc),
[@jrb-ai](https://github.com/jrb-ai),
[@jschmied](https://github.com/jschmied),
[@juliankang4](https://github.com/juliankang4),
[@kingjamez](https://github.com/kingjamez),
Expand Down
14 changes: 14 additions & 0 deletions RUNBOOK.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,20 @@ zone at 94 C or more for most of the prompt (97.7 C at the top); `TF_HEAT_HIGH=9
at 93.0 C or under, and the first token came 10% later.
Archives whose names contain `host-only` are CPU verification artifacts and cannot serve CUDA inference.

### GB10 CPU pinning for long CUDA runs

In [#1033](https://github.com/ashhart/TensorFold/issues/1033), @Bizuayeu reports two CPU threads spinning per CUDA rank,
even between requests, heating the CPU during long reply runs. Pinning each rank to efficiency cores reduced that heat.

Logical CPUs `0-4,10-14` are the Cortex-A725 efficiency cores, confirmed on two GB10 units. Verify the CPU layout (`lscpu -e`) on
each host. Add `taskset -c 0-4,10-14` before each rank's existing native launch,
or add `--cpuset-cpus=0-4,10-14` after `docker run` and before the image name in each rank's container launch.
Keep the existing model, GPU, network and rank options.

On GLM-5.3-Flash NVFP4, version 1.0.12 plus #1016-#1018, TP=2, with heat bands of 92/88 C, @Bizuayeu's pinned run
completed 40/40 replies, peaking at 85.1 C; the unrestricted run stopped at the seventh reply at 94.7 C.
Decode throughput fell 1.1% and prefill throughput 2.7%. These are the contributor's measurements, not 1.1.0 results.

## Flash Next and paired Metal serving

Flash Next reads its MLX 6-bit/group-32 checkpoint directly and creates its native layouts locally.
Expand Down
25 changes: 25 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,32 @@ Only the latest release gets security fixes. The Python 0.6.6 engine at the `v0.
Out of scope: what a model writes, a model following instructions in text you gave it, and a client sending the server
more work than its machine can do.


## Native HTTP browser boundaries

When API keys are configured, private native HTTP routes require a valid key by default. Only GET root, `/health`, `/slide`, its eight embedded scripts,
and GET metrics explicitly opened by `--metrics-open` are public exceptions. Public health never resets memory peaks. This policy includes `/systemone` aliases.

A loopback listener refuses a Host outside localhost and loopback IP names, preventing a DNS-rebinding site from
using its own hostname to read the local API. `--allowed-host NAME` is repeatable and adds an explicit trusted name
without changing the bind address. Names have no scheme, path or port; bracket IPv6 literals. Classification uses the
resolved bound address, including mapped loopback addresses, rather than trusting a request header or peer address.

On every listener, a browser Origin must have the same scheme, host and effective port as the request's Host.
The native listener is HTTP. `--allowed-origin ORIGIN` is repeatable and adds a trusted HTTP or HTTPS origin, such as
an HTTPS UI behind a TLS proxy. Origins have no path or userinfo. Opaque `null` origins, malformed values and duplicates
are refused. Both checks run before authentication, body processing and routing, even when a valid API key is supplied.
Their HTTP 403 replies name Host/Origin and the relevant exception flag.

Clients without Origin keep working with a valid Host, and no Content-Type restriction is introduced.
The server sends no CORS headers; an origin exception does not grant cross-origin browser reads.
These browser checks do not replace `--api-key` for network access. See [API headers](docs/api.md#browser-request-headers).

## Release files

Each release's archives have SHA-256 files beside them on the release page, and Homebrew checks the macOS archive's
SHA-256. The Mac app is signed and notarized.

Malformed or folded headers and unsupported request targets are refused before routing. Each request on a pooled
connection is checked afresh. Rejections close before `100 Continue` and unread bodies are not dispatched. Key files
must be regular files without group or other read/write permission; use `chmod 600`.
39 changes: 39 additions & 0 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ Copyright 2026 The Qwen Team and The HuggingFace Inc. team, Apache License 2.0.
See [the license text](LICENSES/Apache-2.0.txt). The same helpers appear in mlx-vlm's
`models/qwen4_exp/language.py`, MIT License, Copyright © 2025 Prince Canuma.

The native engine's image and video input for Flash Next follows transformers' `get_rope_index` positions in
`models/qwen4_exp/modeling_qwen4_exp.py` (`zig/src/families/flashnext/vis_prompt.zig`) and its Qwen3-VL video
processor and processor in `models/qwen3_vl/` (frame sampling, `smart_resize`, pair times and the prompt layout;
`zig/src/core/qwen_vl/video.zig`, `zig/src/server/images.zig`). Copyright 2025 and 2026 The Qwen Team and The
HuggingFace Inc. team, Apache License 2.0; see [the license text](LICENSES/Apache-2.0.txt).

## GLM-5.3-Flash on Apple Silicon

The native GLM-5.3-Flash engine (`zig/src/families/glm/`) runs the Python `glm5_next` family's decode kernels.
Expand Down Expand Up @@ -207,6 +213,13 @@ TensorFold ships no model weights. The `z-lab/Qwen3.8-27B-DFlash2` model card st
The optional `incoai/GLM-5.3-Flash-DFlash2` model card states CC BY-NC-ND 4.0, for non-commercial use
without derivatives; only the Python engine reads that drafter. Each checkpoint keeps its own license.

The native `zig/src/families/deepseek_v41/` implementation and `zig/tests/deepseek_v41_reference/`
follow [DeepSeek-V4.1-Flash's official inference](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash/tree/2cba9e42aa026125f3ed06c6d98c1db82f7ca027/inference),
MIT License, Copyright (c) 2023 DeepSeek: the reference's equations, the Engram normalization,
PCG64 multipliers and prime bucket layout, and the pinned chat template come from that revision.
The EXL3 checkpoint reads through the ExLlamaV3 format covered above; no captured CUDA/Triton
kernel assets, full model shards or binary traces are bundled.

## Structured output: libtfgrammar

`lib/libtfgrammar` in the release archives is `zig/src/grammar/tf_grammar.cc` compiled with the C++ sources of
Expand Down Expand Up @@ -316,3 +329,29 @@ TensorFold ships no Drama 3 weights and no codec weights. [fishaudio/drama-3](ht
and its `codec.pth` are under the Fish Audio Community License Agreement v1.0: research and non-commercial use,
commercial use below its revenue threshold, and no Hosted Service without a separate license from Fish Audio. Users
obtain the checkpoint and accept that license themselves.

## DeepSeek-V4.1 shared checkpoint forms

The DeepSeek-V4.1 config and checkpoint planning combine @jayleaton’s chain (#727) and
@akol1’s #825 admission. The reference is DeepSeek AI’s MIT licensed inference at revision
2cba9e42aa026125f3ed06c6d98c1db82f7ca027, Copyright (c) 2023 DeepSeek.
EXL3 scanning reuses the common checkpoint scanner and retains its ExLlamaV3 attribution.

The shared Engram host code and token-map builder combine @jayleaton’s #668 and @akol1’s
#824, #825 and #826. Normalization, PCG64 and bucket metadata follow the pinned DeepSeek MIT reference
above. nfkd_data.zig is generated Unicode decomposition data from #824; it is kept verbatim.

## DeepSeek-V4.1 CUDA sources

The CUDA sources and loading combine @jayleaton’s #671, #674 and #727 contributions. Source comments retain
the original TensorFold Python-kernel blob receipts. Generic EXL3 variants extend the one
common EXL3 operators and their per-slot epilogues; tile decoding is shared.
The ExLlamaV3 MIT attribution, Copyright (c) 2025 Turboderp, applies as described above.
No external reference, captured cubin, model shard or CUDA compiler is bundled by this patch.

The tensor-parallel fabric also uses the RoCE design described above (`zig/src/fabric/tp/mailbox.cu`, `roce.zig`, `roce_verbs.zig`).

## Shared EXL3 resolver setup

The shared EXL3 resolver split and CUDA lane option forwarding retain work from PR #728 by @ajensenwaud,
with the common EXL3 and DeepSeek contributor credits preserved.
85 changes: 85 additions & 0 deletions app/electron/agent/engine/downloads.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import type { EngineEvent, ModelPreflight, PullProgress } from '../types'
import { assertRepoId, type EngineBinary } from './paths'
import { isLocalModelId } from './library'
import { startPull, type PullHandle } from './pull'
import type { ModelRevisions } from './model-revisions'

export type RunningPull = { handle: PullHandle; last: PullProgress }
interface DownloadOptions {
running: Map<string, RunningPull>
revisions: ModelRevisions
env: NodeJS.ProcessEnv
hub: () => string
binary: () => EngineBinary
assertIdle: (repo: string) => void
cached: (key: string) => ModelPreflight | undefined
preflight: (repo: string, revision: string | null) => Promise<ModelPreflight>
invalidate: (repo: string) => void
invalidateInstalled: () => void
refreshInstalled: () => Promise<unknown>
emit: (event: EngineEvent) => void
pollMs?: number
}

// Completion becomes visible only after the immutable revision selection is durable.
export class EngineDownloads {
private readonly finished = new Map<string, PullProgress>()
private readonly lastPullEmit = new Map<string, number>()
constructor(private readonly options: DownloadOptions) {}
forget(repo: string): void { this.finished.delete(repo) }

list(): PullProgress[] {
const running = [...this.options.running.values()].map((p) => p.last)
return [...running, ...[...this.finished.values()].filter((p) => !this.options.running.has(p.repo))]
}

async pull(repo: string, revision: string | null = null): Promise<PullProgress> {
if (isLocalModelId(repo)) throw new Error('Local library checkpoints load in place and cannot be downloaded by their library ID.')
if (this.options.running.has(assertRepoId(repo))) return this.options.running.get(repo)!.last
await this.options.revisions.read() // Preserve invalid registry bytes and refuse before starting a child.
this.options.assertIdle(repo)
const pre = this.options.cached(JSON.stringify([repo, revision])) ?? await this.options.preflight(repo, revision)
this.options.assertIdle(repo)
if (this.options.running.has(repo)) return this.options.running.get(repo)!.last
if (!['ok', 'installed'].includes(pre.verdict)) throw new Error(pre.reasons[0] ?? `${repo} cannot be downloaded for the built-in engine.`)
if (!pre.resolvedRevision || (pre.drafter && !pre.drafter.resolvedRevision)) throw new Error('Retry the model checks to resolve an immutable checkpoint before downloading.')
const steps = [{ repo, revision: pre.resolvedRevision }, ...(pre.drafter ? [{ repo: pre.drafter.repo, revision: pre.drafter.resolvedRevision! }] : [])]
this.finished.delete(repo)
const handle = startPull({
binary: this.options.binary(),
env: this.options.env,
hub: this.options.hub(),
steps,
totalBytes: pre.totalBytes,
pollMs: this.options.pollMs ? Math.max(50, this.options.pollMs) : 1000,
onUpdate: (progress) => this.onPullUpdate(progress),
})
this.options.running.set(repo, { handle, last: handle.progress() })
this.options.emit({ kind: 'pull', pull: handle.progress() })
void handle.done.then(async (final) => {
if (final.state === 'done') {
try { await this.options.revisions.commit(steps) } catch (error) {
final = { ...final, state: 'failed', phase: 'Failed', message: (error as Error).message }
}
}
this.options.running.delete(repo)
this.finished.set(repo, final)
this.options.invalidate(repo)
this.options.invalidateInstalled()
this.options.emit({ kind: 'pull', pull: final })
if (final.state === 'done') await this.options.refreshInstalled().catch(() => {})
})
return handle.progress()
}

private onPullUpdate(progress: PullProgress): void {
if (progress.state !== 'running') return // Completion is emitted only after the selection is durable.
const job = this.options.running.get(progress.repo)
if (job) job.last = progress
const now = Date.now()
if (progress.state === 'running' && now - (this.lastPullEmit.get(progress.repo) ?? 0) < 250) return
this.lastPullEmit.set(progress.repo, now)
this.options.emit({ kind: 'pull', pull: progress })
}

}
29 changes: 29 additions & 0 deletions app/electron/agent/engine/engine-env.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import os from 'node:os'
import { resolveHubEndpoint } from './hub-network'

const CHILD_ENV_KEYS = ['HOME', 'PATH', 'TMPDIR', 'LANG', 'LC_ALL', 'LC_CTYPE', 'USER', 'LOGNAME', 'SHELL', 'HF_HOME', 'HF_HUB_CACHE', 'HF_HUB_OFFLINE', 'HF_ENDPOINT']

// The engine gets ordinary OS values and the Hugging Face cache settings, never the app's provider keys.
export function engineChildEnv(base: NodeJS.ProcessEnv): NodeJS.ProcessEnv {
const env: NodeJS.ProcessEnv = {}
for (const key of CHILD_ENV_KEYS) if (typeof base[key] === 'string') env[key] = base[key]
if (env.HF_ENDPOINT) env.HF_ENDPOINT = resolveHubEndpoint(env.HF_ENDPOINT)
env.HOME = env.HOME || os.homedir()
env.PATH = env.PATH || '/usr/bin:/bin:/usr/sbin:/sbin'
return env
}

// A child's view of `base`: the Hub origin that authorized its checks, and no Hub token.
export function pinnedEngineEnv(base: NodeJS.ProcessEnv, endpoint: string): NodeJS.ProcessEnv {
const child = { ...base }
delete child.HF_TOKEN
child.HF_ENDPOINT = endpoint
return Object.freeze(child)
}

// Snapshot before filtering so Hub checks and native pulls cannot select different origins.
export function engineLaunchEnv(options: { childEnv?: NodeJS.ProcessEnv; env?: NodeJS.ProcessEnv }) {
const source = { ...(options.childEnv ?? options.env ?? process.env) }
const endpoint = resolveHubEndpoint(source.HF_ENDPOINT)
return { env: pinnedEngineEnv(options.childEnv ? source : engineChildEnv(source), endpoint), endpoint }
}
Loading
Loading