Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
202 commits
Select commit Hold shift + click to select a range
7495b0a
DeepSeek-V4.1-Flash on Metal: the EXL3 2.9bpw lane — trellis-decoded …
EugeneClaw Nov 6, 2026
3219a00
zig fmt the branch (21 files; the formatter gate must be clean before…
EugeneClaw Nov 6, 2026
04197e7
Merge branch 'upstream-main-0d7152' into contribution/dsv41-exl3
EugeneClaw Nov 6, 2026
2741976
CI: the dev-tools and Windows graphs compile again
EugeneClaw Nov 6, 2026
e5e0182
Hygiene: the review-out files leave, the glue set loses its temp name
EugeneClaw Nov 6, 2026
b3822a7
Hygiene: the reference MLX gather leaves (headers, kernel, test, bench)
EugeneClaw Nov 6, 2026
f56343b
Hygiene: the round history leaves the comments; core keeps no DSV4.1 …
EugeneClaw Nov 6, 2026
c4da0a7
Hygiene: seven over-600 files split by concern
EugeneClaw Nov 6, 2026
f8f904d
Attention: the trunk drops the comparator q-RMS arms; comments cite t…
EugeneClaw Nov 6, 2026
54a3170
Oracle: the teacher comparison reports KL beside NRMS and greedy agre…
EugeneClaw Nov 6, 2026
3ed1d16
Hygiene: the shared affine_mm and gemm_nax carry no diff; the gate GE…
EugeneClaw Nov 6, 2026
e5b35d1
Draft: the MTP round re-expresses from the release's forward_spec
EugeneClaw Nov 6, 2026
b87aa9e
EXL3: the prefill and decode provenance is the lane's own; the histor…
EugeneClaw Nov 6, 2026
9ca89a1
Hygiene: the rewrite-set comments lose the round history and the meas…
EugeneClaw Nov 6, 2026
67e8331
Copy rule: the HC boundary cites the release; the port claim and the …
EugeneClaw Nov 6, 2026
775c879
EXL3: the prompt tile and the scalar prefill own their job and window…
EugeneClaw Nov 6, 2026
f8143b3
EXL3 decode: the register-only single and pair bodies own their job a…
EugeneClaw Nov 6, 2026
a71f6ef
EXL3 decode: the funnel, wide and multi-row bodies own their job and …
EugeneClaw Nov 6, 2026
16635f5
Hygiene: the lane comments read as prose again
EugeneClaw Nov 6, 2026
a948274
Hygiene: the lane comments lose the last round labels and measured fi…
EugeneClaw Nov 6, 2026
6183707
Copy rule: the partial files state the earlier provenance instead of …
EugeneClaw Nov 6, 2026
a9102c5
Copy rule: the HC boundary is written from the release; the two-launc…
EugeneClaw Nov 6, 2026
7155a68
Attention: the pass runs in the release's own stages
EugeneClaw Nov 6, 2026
4793790
Draft: the drafter's attention runs in the release's DSparkAttention …
EugeneClaw Nov 6, 2026
2114798
Draft: proposeTokens runs the release forward_spec stages
EugeneClaw Nov 6, 2026
271ca4e
Draft: the stage methods are members of the round context
EugeneClaw Nov 6, 2026
dcd7811
EXL3: the host names its own body plan; the unused paired decode leaves
EugeneClaw Nov 6, 2026
a08d6da
EXL3: the dead prefill experiments and the variant bench leave; the h…
EugeneClaw Nov 6, 2026
b1fc015
EXL3: restore the shared prompt templates the broad prune overran; th…
EugeneClaw Nov 7, 2026
4dbba61
EXL3: the partly covered prompt files state their provenance
EugeneClaw Nov 7, 2026
d93c8f2
Backend: the /tmp snapshot toggle leaves the lane
EugeneClaw Nov 7, 2026
4dd66e8
EXL3: the named non-default prefill variants leave; the prompt files …
EugeneClaw Nov 7, 2026
288a66f
EXL3: the dead prefill arms leave; the multi-row pick requires its pi…
EugeneClaw Nov 7, 2026
671b680
EXL3: the GPU qualification tests split by decode and prefill
EugeneClaw Nov 7, 2026
b1e1e42
Reference: the stage diff separates its capture from its runner
EugeneClaw Nov 7, 2026
99fe143
Reference: the EXL3 projection checks split by arithmetic path
EugeneClaw Nov 7, 2026
64d45fc
EXL3: the projection kernel sources split at their top-level entries
EugeneClaw Nov 7, 2026
1a36bee
EXL3: the projection host separates its views, plan and encode entries
EugeneClaw Nov 7, 2026
ceb9a28
Attention: the pass separates its stage state, window and encode entries
EugeneClaw Nov 7, 2026
9883c41
Draft: the model separates its options, hash and pipeline support
EugeneClaw Nov 7, 2026
ccd53fa
Draft: the routed-expert block lives in its own module
EugeneClaw Nov 7, 2026
b8034f7
Draft: the forward pass lives in its own module
EugeneClaw Nov 7, 2026
d2a632f
Draft: the drafter block attention lives in its own module
EugeneClaw Nov 7, 2026
5597287
Draft: the proposition round and its stage context leave the model file
EugeneClaw Nov 7, 2026
51f5637
Draft: the model lifecycle and snapshot methods move out
EugeneClaw Nov 7, 2026
6ca6b4a
Draft: the model hash, stage and drafter helpers move out
EugeneClaw Nov 7, 2026
5763240
Draft: the forward module keeps only the aliases it uses
EugeneClaw Nov 7, 2026
afca95b
Core: the projection knobs live in the family; the core carries no V4…
EugeneClaw Nov 7, 2026
620cadf
Lanes: the served DeepSeek config opts into the plain shared round
EugeneClaw Nov 7, 2026
7711666
Contract: the dsv41 gate GEMMs compile their own source; the fp32 twi…
EugeneClaw Nov 7, 2026
240b6ce
Hygiene: the gate, scan and repack benches leave; no engine test read…
EugeneClaw Nov 7, 2026
33dba27
DSpark: the release form is the default; the earlier placement is the…
EugeneClaw Nov 7, 2026
ef1be39
Hygiene: dead sources, helpers, dumps, labels and the unreachable rou…
EugeneClaw Nov 7, 2026
1957f0b
EXL3: the projection keeps only the bodies its default path selects
EugeneClaw Nov 7, 2026
e8abbf1
Comments: the one-line rewrite clears the lean gate
EugeneClaw Nov 7, 2026
08303b7
Tests: the fused one-row QKV and the few-keys identity are pinned
EugeneClaw Nov 7, 2026
61cd514
Tests: the identity equivalence keeps its own file under the lean limit
EugeneClaw Nov 7, 2026
6624e3e
Comments: the reviewed one-line rewrite restores the lost conditions
EugeneClaw Nov 7, 2026
4e8072a
Review: the adversarial pass finds four blockers and they leave
EugeneClaw Nov 7, 2026
9385089
Review: the four spaced module-doc markers become real //! headers
EugeneClaw Nov 7, 2026
92d79fb
Review: the residual should-fix assertions land
EugeneClaw Nov 7, 2026
59aed6d
Reference: the trunk attention follows the release (no per-head q RMS)
EugeneClaw Nov 7, 2026
b9b1fb3
Oracle: the whole-model FP64 clause is the floor-relative band
EugeneClaw Nov 7, 2026
b152954
Oracle: the FP64 receipt carries the contract capture's own figures
EugeneClaw Nov 7, 2026
fd19bf4
Oracle: the floor binds the checkpoint metadata identity, and the rel…
EugeneClaw Nov 7, 2026
a9f6758
Tests: the trimmed-directory identity fixture builds its payload as b…
EugeneClaw Nov 7, 2026
0c58036
Review: the floor binds the token map and the streamed source, and th…
EugeneClaw Nov 7, 2026
923edb5
Docs: the full release-quality window reads 1.647x, so the 16-token c…
EugeneClaw Nov 7, 2026
76b819b
Docs: state the full-window band result as measured and keep the 16-t…
EugeneClaw Nov 7, 2026
1ba7fe0
Docs: a cold 16-token rerun also fails the zero-read residency clause
EugeneClaw Nov 7, 2026
245d135
Docs: the band floor is not rounding-level at the first token
EugeneClaw Nov 7, 2026
06518d5
Receipt: the oracle window starts after the operator self-check
EugeneClaw Nov 7, 2026
39fc808
Docs: the resident window starts after the operator self-check
EugeneClaw Nov 7, 2026
5bff047
Docs: the cold 16-token run still fails the residency clause
EugeneClaw Nov 7, 2026
a757035
Receipt: the residency receipt names the Engram stream's own reads
EugeneClaw Nov 7, 2026
f874f4f
Docs: the cold 16-token read is the stream at page granularity
EugeneClaw Nov 7, 2026
95d8e11
Review: the lane comments are one line so the lean CI counts none new
EugeneClaw Nov 7, 2026
3b93783
Merge upstream main 964f98b0ba64 into contribution/dsv41-exl3
EugeneClaw Nov 7, 2026
1223407
Lean: the re-blended shared files stay under 600 lines
EugeneClaw Nov 7, 2026
8cc69ac
Merge fix: the LFM3 encoder passes the recorder metadata word
EugeneClaw Nov 7, 2026
08c638e
Comments: the reference window and glue reference lose their last sta…
EugeneClaw Nov 7, 2026
ad325ab
Merge upstream main f4af83077 into contribution/dsv41-exl3
EugeneClaw Nov 7, 2026
dfbb025
Lean: the re-merged shared files stay under 600 lines
EugeneClaw Nov 7, 2026
a944501
Docs: the kernel count and standing rates are the final head's own nu…
EugeneClaw Nov 7, 2026
577d89b
Docs: the standing rates are rounded run-to-run figures; the kernel s…
EugeneClaw Nov 7, 2026
2972ae7
Lean: engine_api leaves two lines of headroom under 600
EugeneClaw Nov 7, 2026
1303e91
Comments: the last local-workaround note and three round-history asid…
EugeneClaw Nov 7, 2026
f2e28e9
Merge upstream main 5874551fa: lanes.zig keeps the lane's shared_plai…
EugeneClaw Nov 8, 2026
acfb1d4
EXL3: the routed prompt tile keeps its 64-column default (nax59), rec…
EugeneClaw Nov 8, 2026
a342024
Build: restore the family-neutral kv_state and drop the draft debug
EugeneClaw Nov 8, 2026
6d47441
Merge upstream main 5cfbc8880 into contribution/dsv41-exl3
EugeneClaw Nov 8, 2026
bec140d
Lean: the lane's existing switches and projection-knob parser are listed
EugeneClaw Nov 8, 2026
f848668
Metal EXL3: accelerate exact decode with tiled half-FMA bodies
BlivionIaG Nov 14, 2026
54c9114
Metal EXL3: fuse exact attention and expert projection chains
BlivionIaG Nov 14, 2026
a298334
Metal EXL3: qualify pipelines and reject invalid NAX tile widths
BlivionIaG Nov 14, 2026
86e69be
DeepSeek EXL3 Metal: batch decode attention and yield between prompt …
BlivionIaG Nov 14, 2026
49605ca
DeepSeek EXL3 Metal: retain exact suffix-cone prefill per prompt
BlivionIaG Nov 14, 2026
c4d5e48
DeepSeek EXL3 Metal: overlap Engram staging and bound head scratch
BlivionIaG Nov 14, 2026
0d3a303
DeepSeek EXL3 Metal: size prefill chunks by memory and live decoders
BlivionIaG Nov 14, 2026
e37bb2b
Metal EXL3: integrate validated controls and preserve backend chunk h…
BlivionIaG Nov 14, 2026
9be9ce5
Document the EXL3 Metal optimization follow-up and qualification scope
BlivionIaG Nov 14, 2026
59535da
Metal EXL3: keep failed-open allocation cleanup single-owned
BlivionIaG Nov 14, 2026
0870c86
Metal EXL3: make cone verification independent and fail closed
BlivionIaG Nov 14, 2026
e070123
Metal EXL3: retain generic indexed widths and align small dense reduc…
BlivionIaG Nov 14, 2026
128cfe7
Metal EXL3: size shared-down check scratch for every encoded stage
BlivionIaG Nov 14, 2026
6aa834f
Qualify EXL3 Metal projections and correct batched merge strides
BlivionIaG Nov 14, 2026
efdf7a4
Metal EXL3: fix last-row expansion, Sinkhorn reduction order and look…
BlivionIaG Nov 14, 2026
26592f0
Record the final qualification of the EXL3 Metal follow-up source tree
BlivionIaG Nov 14, 2026
3d56a5f
CHANGELOG: name the follow-up pull request
BlivionIaG Nov 14, 2026
a4320a2
CHANGELOG: name the follow-up pull request on the bullet's first line
BlivionIaG Nov 14, 2026
e9e06ee
Metal EXL3: read the drafter switch through the registry in the lane …
BlivionIaG Nov 14, 2026
d83fdf4
Record the final qualification, cold prompt speed and decode of the E…
BlivionIaG Nov 14, 2026
dd80dd7
Metal EXL3: drop the per-fusion kill switches
BlivionIaG Nov 14, 2026
a80eddd
DeepSeek EXL3 Metal: keep tile groups, chunked prefill and Engram loo…
BlivionIaG Nov 15, 2026
581d738
Record the settings sweep, resumed, 128k, M4 and local CI results of …
BlivionIaG Nov 15, 2026
a99384b
Record the eight-stream comparison against the parent
BlivionIaG Nov 15, 2026
fb87fa3
dsv41 indexer: one-shot radix select in row sub-blocks when the tile …
BlivionIaG Nov 17, 2026
771f7c9
dsv41 sparse nax: reuse the key fragments as the value fragments
BlivionIaG Nov 17, 2026
7fb707c
dsv41 sparse nax: reciprocal-corrected epilogue, offset-only key vali…
BlivionIaG Nov 17, 2026
46474a7
dsv41 indexer: row scorer on 32-row threadgroups with all four simdgr…
BlivionIaG Nov 17, 2026
d307e95
CHANGELOG: indexer one-shot select past 4096 keys (#3734)
BlivionIaG Nov 17, 2026
e659453
CHANGELOG: sparse nax scan (#3735)
BlivionIaG Nov 17, 2026
f522fdf
CHANGELOG: indexer row scorer (#3736)
BlivionIaG Nov 17, 2026
ad1b101
tests: the indexer's one-shot select in row sub-blocks picks what the…
BlivionIaG Nov 17, 2026
c2136dd
tests: the tensor-unit prompt kernel against the scalar kernel with a…
BlivionIaG Nov 17, 2026
bb0e891
tests: the indexer's row scorer scores every visible key as the tenso…
BlivionIaG Nov 17, 2026
47a6943
Merge upstream/main into the EXL3 Metal branch
BlivionIaG Nov 21, 2026
27ff6df
Metal EXL3: resolve the GLM MoE rows launches and keep the shared fil…
BlivionIaG Nov 21, 2026
73d03f7
Metal EXL3: the dsv41 device and select-probe test roots take the eng…
BlivionIaG Nov 21, 2026
413f2d2
Merge the refreshed EXL3 Metal branch into the indexer select stack
BlivionIaG Nov 21, 2026
4c419e0
Merge the refreshed EXL3 Metal branch into the sparse nax scan stack
BlivionIaG Nov 21, 2026
67fa212
Merge the refreshed EXL3 Metal branch into the indexer row scorer stack
BlivionIaG Nov 21, 2026
5aadb23
Merge remote-tracking branch 'upstream/main' into pr/dsv41-exl3-metal…
BlivionIaG Nov 21, 2026
f90ead4
Merge remote-tracking branch 'upstream/main' into pr/dsv41-exl3-index…
BlivionIaG Nov 21, 2026
7447d0c
Merge remote-tracking branch 'upstream/main' into pr/dsv41-exl3-index…
BlivionIaG Nov 21, 2026
eda5062
Merge remote-tracking branch 'upstream/main' into pr/dsv41-exl3-spars…
BlivionIaG Nov 21, 2026
0b8e41a
Merge remote-tracking branch 'upstream/main' into pr/dsv41-exl3-index…
BlivionIaG Nov 21, 2026
3dded36
Merge remote-tracking branch 'upstream/main' into pr/dsv41-exl3-index…
BlivionIaG Nov 21, 2026
2717941
Merge remote-tracking branch 'upstream/main' into pr/dsv41-exl3-spars…
BlivionIaG Nov 21, 2026
692dec5
Merge upstream/main into pr/dsv41-exl3-metal-optimizations
BlivionIaG Nov 21, 2026
f6e5fdd
Merge upstream/main into pr/dsv41-exl3-indexer-select
BlivionIaG Nov 21, 2026
a024a4d
Merge upstream/main into pr/dsv41-exl3-indexer-row-scorer
BlivionIaG Nov 21, 2026
b77ed91
Merge upstream/main into pr/dsv41-exl3-sparse-scan-nax
BlivionIaG Nov 21, 2026
8fc0a28
Merge upstream/main into pr/dsv41-exl3-metal-optimizations
BlivionIaG Nov 21, 2026
eadedbe
Merge the refreshed EXL3 Metal branch into the indexer select stack
BlivionIaG Nov 21, 2026
ecd65ed
Merge the refreshed EXL3 Metal branch into the indexer row scorer stack
BlivionIaG Nov 21, 2026
e0cec18
Merge the refreshed EXL3 Metal branch into the sparse nax scan stack
BlivionIaG Nov 21, 2026
e6b44ca
Merge upstream/main into pr/dsv41-exl3-metal-optimizations
BlivionIaG Nov 23, 2026
877d666
native metal: group the lane-host callbacks so the family additions f…
BlivionIaG Nov 23, 2026
a5710e4
dsv41 metal: compile early and markov after keyed, and assert the new…
BlivionIaG Nov 23, 2026
d280065
Merge upstream/main into pr/dsv41-exl3-metal-optimizations
BlivionIaG Nov 23, 2026
cf9e31e
Merge the refreshed EXL3 Metal branch into the indexer select stack
BlivionIaG Nov 23, 2026
63d42bd
Merge the refreshed EXL3 Metal branch into the indexer row scorer stack
BlivionIaG Nov 23, 2026
7d50523
Merge the refreshed EXL3 Metal branch into the sparse nax scan stack
BlivionIaG Nov 23, 2026
bcda7b8
Keep the changelog entry under Unreleased; drop a stray comment
BlivionIaG Nov 23, 2026
79a3459
Merge the refreshed EXL3 Metal branch into the indexer select stack
BlivionIaG Nov 23, 2026
626e3b4
Merge the refreshed EXL3 Metal branch into the indexer row scorer stack
BlivionIaG Nov 23, 2026
afaec53
Merge the refreshed EXL3 Metal branch into the sparse nax scan stack
BlivionIaG Nov 23, 2026
01d70c6
DeepSeek V4.1: restore main's neutral checkpoint owners beside the Me…
BlivionIaG Nov 23, 2026
be8b577
Merge upstream/main into pr/dsv41-exl3-metal-optimizations
BlivionIaG Nov 23, 2026
2de03fb
Merge the refreshed EXL3 Metal branch into the indexer select stack
BlivionIaG Nov 23, 2026
e12f3a2
Merge the refreshed EXL3 Metal branch into the sparse scan nax stack
BlivionIaG Nov 23, 2026
b2650bd
Merge the refreshed EXL3 Metal branch into the indexer row scorer stack
BlivionIaG Nov 23, 2026
b79e344
Restore the token map's module doc and MIT attribution
BlivionIaG Nov 23, 2026
4507efa
Merge the refreshed EXL3 Metal branch into the indexer select stack
BlivionIaG Nov 23, 2026
22a53a6
Merge the refreshed EXL3 Metal branch into the sparse scan nax stack
BlivionIaG Nov 23, 2026
30c904f
Merge the refreshed EXL3 Metal branch into the indexer row scorer stack
BlivionIaG Nov 23, 2026
e1bf0e3
Merge upstream/main into pr/dsv41-exl3-metal-optimizations
BlivionIaG Nov 23, 2026
4123bac
DeepSeek V4.1: name only the proposal rows as core in the proposal host
BlivionIaG Nov 23, 2026
69f9335
Merge upstream/main into pr/dsv41-exl3-metal-optimizations
BlivionIaG Nov 23, 2026
6ca5fa4
Merge the refreshed EXL3 Metal branch into the indexer select stack
BlivionIaG Nov 23, 2026
4030c23
Merge the refreshed EXL3 Metal branch into the sparse nax scan stack
BlivionIaG Nov 23, 2026
2cf7738
Merge the refreshed EXL3 Metal branch into the indexer row scorer stack
BlivionIaG Nov 23, 2026
d62498c
EXL3 Metal: the register-only body serves a window's whole fused gate…
BlivionIaG Nov 23, 2026
a6730a4
changelog: DeepSeek V4.1 four-draft windows decode as plain decode again
BlivionIaG Nov 23, 2026
61cd8d8
test(exl3): the dense bodies keep every one-row bit at two to four rows
BlivionIaG Nov 23, 2026
c56e962
fix(dsv41): the concurrent decode encoder orders the sparse scan and …
BlivionIaG Nov 23, 2026
73842f3
Merge upstream/main into pr/dsv41-exl3-indexer-select
BlivionIaG Nov 24, 2026
3761138
Merge upstream/main into pr/dsv41-exl3-sparse-scan-nax
BlivionIaG Nov 24, 2026
cf560a7
Merge upstream/main into pr/dsv41-exl3-indexer-row-scorer
BlivionIaG Nov 24, 2026
5d1f3d6
Merge upstream/main into pr/dsv41-exl3-metal-optimizations
BlivionIaG Nov 24, 2026
e5f1590
Merge the refreshed EXL3 Metal branch into the indexer select stack
BlivionIaG Nov 24, 2026
7267b21
Merge the refreshed EXL3 Metal branch into the sparse scan nax stack
BlivionIaG Nov 24, 2026
c7e943c
Merge the refreshed EXL3 Metal branch into the indexer row scorer stack
BlivionIaG Nov 24, 2026
31b2116
Merge upstream/main into pr/dsv41-exl3-metal-optimizations
BlivionIaG Nov 24, 2026
b60e70d
Merge pr/dsv41-exl3-metal-optimizations into pr/dsv41-exl3-indexer-se…
BlivionIaG Nov 24, 2026
c8290e1
Merge pr/dsv41-exl3-metal-optimizations into pr/dsv41-exl3-sparse-sca…
BlivionIaG Nov 24, 2026
a5d3cbd
Merge pr/dsv41-exl3-metal-optimizations into pr/dsv41-exl3-indexer-ro…
BlivionIaG Nov 24, 2026
e01285c
fix(merge): keep main's config_number module on the metal graphs
BlivionIaG Nov 24, 2026
b3bebac
build(dsv41): the checkpoint numbers are the module every graph declares
BlivionIaG Nov 24, 2026
9a44e99
build(dsv41): the family reads checkpoint_metal by path, like its sib…
BlivionIaG Nov 24, 2026
bab2613
Merge upstream/main into pr/dsv41-exl3-metal-optimizations
BlivionIaG Nov 24, 2026
e0040ad
Merge upstream/main into pr/dsv41-exl3-indexer-select
BlivionIaG Nov 24, 2026
96416f1
Merge pr/dsv41-exl3-metal-optimizations into pr/dsv41-exl3-indexer-se…
BlivionIaG Nov 24, 2026
6cd6901
Merge upstream/main into pr/dsv41-exl3-sparse-scan-nax
BlivionIaG Nov 24, 2026
89e9a11
Merge pr/dsv41-exl3-indexer-select into pr/dsv41-exl3-sparse-scan-nax
BlivionIaG Nov 24, 2026
6abe3cd
Merge upstream/main into pr/dsv41-exl3-indexer-row-scorer
BlivionIaG Nov 24, 2026
e880b33
Merge pr/dsv41-exl3-sparse-scan-nax into pr/dsv41-exl3-indexer-row-sc…
BlivionIaG Nov 24, 2026
b76bf77
docs(dsv41-exl3): record current projection suites and served-result …
BlivionIaG Nov 24, 2026
090ae78
Merge pr/dsv41-exl3-metal-optimizations into pr/dsv41-exl3-indexer-se…
BlivionIaG Nov 24, 2026
3ecda8e
Merge pr/dsv41-exl3-indexer-select into pr/dsv41-exl3-sparse-scan-nax
BlivionIaG Nov 24, 2026
2dc7128
Merge pr/dsv41-exl3-sparse-scan-nax into pr/dsv41-exl3-indexer-row-sc…
BlivionIaG Nov 24, 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
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ zig-out/

# Versioned GUI build resources, generated app engines stay ignored in app/.gitignore.
!app/build/
# mHC fp64 qualification receipts.
/receipts/

# The full E4B per-layer input oracle outputs (tools/zig/gemma4_e4b_layer_input_oracle.py --full); the committed fixture is the .json of SHA-256 prints.
tools/zig/fixtures/e4b_layer_input_mlx.bin
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel

## Unreleased

- DeepSeek V4.1 on Metal: the EXL3 register-only decode body now serves every speculative window's fused gate+up call, up to the eight-token window; a four-draft window no longer switches to the tensor-unit compact body for its seventy rows, so its replies match plain decode again (the 8 reference and the 10 code prompts, four-draft against plain), its 5-row round's event p50 falls from ~104 ms to 61 ms, and the default config's hashes and timings are unchanged.
- Metal: DeepSeek V4.1's concurrent dispatch mode (`TF_DSV41_CONCURRENT=1`) put the attention sparse scan before the dense-table pass and the split merge before the scan that feeds it; both barriers are now explicit, so the mode no longer changes the reply.

- Ripple-65B-Preview on Metal: `--drafter` takes the publisher's DFlash2 drafter (`ricursiveAI/Ripple-65B-Preview-DFlash2`) beside either release, with drafted replies equal to plain ones; with the drafter the server opens two streams unless `--parallel` is named, and refuses a named `--parallel` above 2 (#2260, fixes #2259). Thanks to @BobClawblaw.

- Inkling 2 Mini: `enable_thinking: false` and `reasoning_effort: "none"` now reach the chat template as thinking effort 0 instead of the default 0.9; thinking-on replies are unchanged (#4876).
Expand Down Expand Up @@ -236,6 +239,26 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel
- Qwen3.5/3.8 on CUDA: `TF_Q35_DFLASH_ABSORB_BATCH=1` (opt-in) absorbs a DFlash2 round's streams in one pass, reading the drafter's weights once a round; about 1-2% faster at 4 streams on GB10, tokens unchanged.


- DeepSeek-V4.1 EXL3 on Metal: the indexer row scorer runs on 32-row threadgroups with all four simdgroups live, 1024 rows x 32k keys in 2.64 ms instead of 2.98 ms on an M5 Ultra, with bit-identical scores (#3736).
- DeepSeek-V4.1 EXL3 on Metal: the sparse-attention prompt scan reuses its key fragments as value fragments and divides by a verified reciprocal product, 4096 rows x 16k keys in 6.93 ms instead of 10.02 ms on an M5 Ultra, with bit-identical output (#3735).
- DeepSeek-V4.1 EXL3 on Metal: the indexer's one-shot select also runs for prefill chunks past 4096 keys, in row sub-blocks, instead of the one-thread-per-row heap select, with the same selected indices (#3734).
- DeepSeek-V4.1 EXL3 on Metal: exact tiled half-FMA decode, fused projection chains, batched decode attention (#3382),
per-prompt suffix-cone prefill, next-chunk Engram staging and bounded vocabulary-head scratch.
Prompt chunks adapt to admitted memory and live decoders; incompatible shapes retain the generic projection body.
Small dense, filtered and indexed projections retain matching reduction orders and logical output bounds.
Attention tiles stop at their split boundary instead of counting some keys twice, and packed NaNs survive BF16 decoding.
Draft embedding IDs grow without replacing Markov picks; unload releases host state, Markov IDs and drafter scratch.
MTP-only configurations no longer depend on lookup drafting; proposal depth is capped at the four-ID capacity.
Adaptive trained depth remains available with lookup disabled; suffix lookup reads the committed stream context.
Matching suffix proposals take precedence over paid trained proposals.
The diagnostic runner honors an explicit prefill-workspace setting without changing its unset default.
GPU profiling starts deferred mHC spans only when work is encoded, avoiding empty counter samples.
Last-row logits expand the selected final stream row rather than row zero of a multi-row window.
Fused mHC Sinkhorn uses the unfused split's FP32 row and column reduction order.
Stacked on #2373; whole-model qualification is still incomplete.
See [scope and qualification limits](docs/deepseek-v41.md#exl3-optimization-follow-up)
and [full-window fidelity](docs/receipts/dsv41-exl3-metal/fidelity-128.json).

## 1.3.4

- Lanes: #3728's lone-stream copy pricing applies only to a family that opts in and serves without a model drafter (Qwen3.5/3.8 on HIP with copies only), so copies-only decode on AMD Strix Halo keeps 1.3.3's speed, while streams with a model drafter price their drafts as before; tokens are unchanged.
Expand Down
9 changes: 8 additions & 1 deletion THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ MIT License, Copyright © 2025 Turboderp. TensorFold's decoders and kernels are
checked bit for bit against ExLlamaV3's dequantization.

The native `zig/src/core/exl3_format.zig` reference decoder, the `zig/src/core/exl3_projection*.zig` decoder and
`zig/kernels/metal/core/exl3_projection.metal` separately implement the same format and codebooks
`zig/kernels/metal/core/exl3_projection_core.metal` and `_wide.metal` separately implement the same format and codebooks
under the Turboderp attribution above. So do the native checkpoint scan (`zig/src/core/exl3_load.zig`,
`exl3_metal_load.zig`), the CUDA kernels (`zig/kernels/cuda/exl3_*.cu`, `exl3_decode.cuh`, `exl3_candidate.cuh`) and
their Zig side (`zig/src/cuda/exl3*.zig`), and GLM's reader of its EXL3 experts (`zig/src/families/glm/cuda_exl3.zig`).
Expand Down Expand Up @@ -294,6 +294,13 @@ Bolt's GGML checkpoints (`zig/kernels/cuda/ggml.cu`, `zig/src/cuda/ggml.zig`) ar
TensorFold ships no model weights. The `z-lab/Qwen3.8-27B-DFlash2` model card states Apache-2.0.
The optional `incoai/GLM-5.3-Flash-DFlash2` model card states Apache-2.0 too. 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
6 changes: 3 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub fn build(b: *std.Build) void {
@import("zig/build/quant_geometry_host.zig").steps(b, test_step);
@import("zig/build/stage.zig").steps(b, test_step);
if (b.graph.host.result.os.tag == .macos) {
const step5_mods = metalEngineModules(b, b.graph.host, .Debug, draft_ids);
const step5_mods = metalEngineModules(b, b.graph.host, .Debug, draft_ids, b.createModule(.{ .root_source_file = b.path("zig/src/core/tokenizer/tokenizer.zig"), .target = b.graph.host, .optimize = .Debug, .link_libc = true }));
const empty = b.addWriteFiles().add("step5-compile-only.metallib", "");
step5_mods.sources.addImport("nemotron_packed_metallib", embedded(b, empty, "nemotron_packed.metallib"));
@import("zig/build/step5_host.zig").steps(b, step5_mods.metal, step5_mods.engine, step5_mods.lanes);
Expand All @@ -132,7 +132,7 @@ pub fn build(b: *std.Build) void {
@import("zig/build/lfm3_host.zig").steps(b, test_step);
@import("zig/build/qwen3_asr_host.zig").steps(b, test_step);
if (b.graph.host.result.os.tag == .macos) {
const budget_mods = metalEngineModules(b, b.graph.host, .Debug, draft_ids);
const budget_mods = metalEngineModules(b, b.graph.host, .Debug, draft_ids, b.createModule(.{ .root_source_file = b.path("zig/src/core/tokenizer/tokenizer.zig"), .target = b.graph.host, .optimize = .Debug, .link_libc = true }));
const budget_empty = b.addWriteFiles().add("budget-compile-only.metallib", "");
budget_mods.sources.addImport("nemotron_packed_metallib", embedded(b, budget_empty, "nemotron_packed.metallib"));
@import("zig/build/metal_prompt_sources.zig").steps(b, budget_mods.metal, budget_mods.engine, test_step);
Expand Down Expand Up @@ -199,7 +199,7 @@ pub fn build(b: *std.Build) void {
const gemma4_contract_host = @import("zig/build/gemma4_host.zig").tests(b, gemma4_host_sources);
gemma4_contract_host.dependOn(@import("zig/build/glm_rows_contract.zig").host(b, gemma4_host_sources));
if (b.graph.host.result.os.tag == .macos) {
const gemma4_host_mods = metalEngineModules(b, b.graph.host, .Debug, draft_ids);
const gemma4_host_mods = metalEngineModules(b, b.graph.host, .Debug, draft_ids, b.createModule(.{ .root_source_file = b.path("zig/src/core/tokenizer/tokenizer.zig"), .target = b.graph.host, .optimize = .Debug, .link_libc = true }));
gemma4_host_mods.sources.addImport("nemotron_packed_metallib", embedded(b, b.addWriteFiles().add("gemma4-compile-empty.metallib", ""), "nemotron_packed.metallib"));
@import("zig/build/gemma4_host.zig").compileHost(b, gemma4_host_mods.metal, gemma4_host_mods.engine, gemma4_host_mods.lanes, gemma4_host_mods.sources);
@import("zig/build/qwen27_host.zig").compileHost(b, gemma4_host_mods.metal, gemma4_host_mods.engine, gemma4_host_mods.lanes);
Expand Down
103 changes: 103 additions & 0 deletions docs/deepseek-v41-mhc-fp64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"scope": "mHC (hyperconnection mix) stage fp64 qualification: rounding level, Metal deltas and 1-ULP input amplification. Independent CPU reference parameterized comptime (math.zig MixOf/denseOf/mixesOf/splitOf/inverseOf/collapseOf/expandOf, f32 source-contract path bit-identical, f64 ideal path); harness zig/tests/deepseek_v41_reference/operator_hc_fp64.zig; fixtures hc_attention_rms.json and hc_fp64_rows.json (retained inputs only).",
"nrms_definition": "sqrt(sum(delta^2)/sum(ref^2)) in f64; ULP = |delta| / fp32 spacing at the fp64 reference value.",
"inputs": [
"token671_attention (retained token-671 embedding, four copies)",
"token1_ffn (retained token-1 FFN stream and branch, real hc_ffn scale/base)",
"eight_teacher_rows (the eight retained teacher embeddings)",
"wide_dynamic_range (copy magnitudes 2^24..2^-12, rotating signs)",
"split_args (16 retained unary arguments incl. 1.4393715858459473, controlling post argument, integer exp sweep -32..32, plus sigmoid/softmax spans)",
"cancellation fixtures (half-ULP terms after 1.0)"
],
"rounding_level_fp32_reference_vs_fp64": {
"inverse_statistic_nrms": [
2.7e-09,
2.8e-08
],
"projection_dense_nrms": [
2.2e-08,
2.9e-08
],
"pre_sigmoid_nrms": [
1.1e-08,
4.2e-08
],
"post_nrms": [
3.9e-08,
7.2e-08
],
"comb_sinkhorn_nrms": [
1.4e-08,
6.8e-08
],
"collapse_bf16_unequal_cells": 0,
"post_expand_bf16_unequal_cells": [
0,
5
]
},
"metal_vs_fp64": {
"inverse_max_ulp": 0.6,
"projection_max_ulp": 0.5,
"pre_max_ulp": 2.75,
"post_max_ulp": 2.29,
"comb_max_ulp_near_cancelled_cells_only": 34.2,
"comb_max_abs": 1.5e-07,
"post_controlling_exponent_row_max_ulp": 1.61,
"exponent_sweep_minus32_to_32_worst_stage_nrms": 9e-08,
"bf16_unequal_cells": {
"token671": 0,
"token1_ffn": "3 of 20480",
"eight_teacher_rows": "8 of 163840",
"wide_dynamic_range": 0
},
"verdict": "every sub-stage sits at the fp32 source-contract rounding level; Metal exceeds the fp32 reference by at most ~1 ULP at the documented Metal exp boundary"
},
"cancellation_boundaries": [
{
"fixture": "collapse_half_ulps",
"metal": "0x3500",
"f32_ref": "0x3500",
"f64_ideal": "0x34c0"
},
{
"fixture": "post_half_ulps",
"metal": "0x0",
"f32_ref": "0x0",
"f64_ideal": "0x3400"
},
{
"fixture": "branch_product",
"metal": "0x3500",
"f32_ref": "0x3500",
"f64_ideal": "0x34c0"
}
],
"amplification_1ulp_input": {
"method": "perturb one bf16 stream cell (or branch cell) by 1 ULP, propagate the ideal fp64 stage, output NRMS growth = sqrt(sum(dy^2)/sum(y^2)) / (|dx|/sqrt(sum(x^2))); 256 sampled cells per row; 8 teacher positions plus the token-1 FFN row",
"analog_fp64_gain_mean_per_row": [
0.182,
0.76
],
"analog_fp64_gain_max_overall": 0.762,
"collapse_gain_mean": 0.5003,
"collapse_gain_max": 1.944,
"bf16_visible_gain_mean_per_row": [
0.74,
2.382
],
"bf16_visible_gain_max": 34.5,
"bf16_rows_changed_fraction": "224-250 of 256 perturbations change at least one of 20480 output cells",
"mean_changed_cells": "8.1-13.1 of 20480",
"statistic_relative_shift_mean": 3.6e-07,
"comb_nrms_shift_mean": 3.6e-08,
"metal_confirmation_row0": {
"amp_mean": 1.886,
"fp64_bf16_amp_mean": 1.945,
"mean_changed_cells": 12.06
}
},
"gate_reading": "A single-ULP input difference is attenuated by the mix in exact arithmetic (gain < 1) and appears as 1-bf16-ULP flips on about 0.06 percent of output cells; the stage's own rounding-level output NRMS is 0 to 2.5e-5. Hyperconnection mixing therefore cannot turn fp32 ULP noise into the observed 4.096 percent whole-model NRMS; a specific operator-level difference elsewhere (sparse/compressed attention candidates) remains the plausible cause.",
"kernel_changes": "none required; no tolerance relaxed, no source coefficient injected",
"receipts": "gitignored receipts/ (mhc-fp64-run.log, mhc-fp64-parsed.json, build-summary.log); commit contains code, fixture and this summary"
}
Loading