Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
234 commits
Select commit Hold shift + click to select a range
629f564
dsv41 metal: price drafts from a cost table timed on the loaded model
gilby Nov 11, 2026
bf66320
dsv41 metal: time a sparse set of windows and a warm pass for the cos…
gilby Nov 12, 2026
495e81d
dsv41 metal: refuse a malformed timing setting, and key a stored cost…
gilby Nov 12, 2026
221ad2d
dsv41 metal: measure the cost table over a two-row prompt, and time e…
gilby Nov 12, 2026
16016e6
dsv41 metal: time the pass back to back, and refuse a pass that canno…
gilby Nov 12, 2026
f2f3cc8
dsv41 metal: the slot term's windows keep their repeats whatever the …
gilby Nov 12, 2026
97e7597
dsv41 metal: report the timed cost table and keep pricing by the defa…
gilby Nov 12, 2026
abfd1ad
dsv41 metal: time nothing unless TF_DSV41_CALIB names a source
gilby Nov 12, 2026
da25f35
dsv41 metal: the TF_DSV41_CALIB refusal names the Metal default as it is
gilby Nov 12, 2026
ffb29d6
docs: the TF_DSV41_CALIB row describes each mode once
gilby Nov 13, 2026
f8bb49b
docs: the optimization ledger's row for DeepSeek-V4.1's measured cost…
gilby Nov 13, 2026
c8b87c2
dsv41 metal: keep TF_DSV41_CALIB_FILE active when TF_DSV41_CALIB is u…
gilby Nov 16, 2026
d4f6574
Keep Metal calibration helpers with the calibration runner
ashhart Nov 21, 2026
8ff2d83
changelog: #2952 under Unreleased
ashhart Nov 21, 2026
0ae79e5
changelog: #2952 under Unreleased
ashhart Nov 21, 2026
769b8fc
drama3: a host test pins the codec schedules' call lists over a recor…
jschmied Nov 12, 2026
b6701e5
changelog: #2962 under Unreleased
ashhart Nov 21, 2026
596c059
dsv41 metal: decode attention bf16 widened through bfloat, keys prefe…
ashhart Nov 14, 2026
530f60c
dsv41 metal: TF_DSV41_PROMPT_PROF reports each Engram layer's rows by…
ashhart Nov 15, 2026
e5c5477
dsv41 metal: Engram records decoded on up to 8 threads and finished b…
ashhart Nov 15, 2026
4fe1d12
dsv41 metal: a cold prompt chunk's first Engram span in two runs of r…
ashhart Nov 15, 2026
fa9dd7a
dsv41 metal: the Engram row cache defaults to 4194304 records a layer
ashhart Nov 15, 2026
3f85553
dsv41 metal: the keepalive probes the residency set while a request runs
ashhart Nov 15, 2026
1d97f96
dsv41 metal: a prompt run in pieces reports the full profile
ashhart Nov 21, 2026
5506728
dsv41 metal: the encoder chunk's buffers in prompt_chunk.zig
ashhart Nov 21, 2026
a4ea27a
changelog: #3459 under Unreleased
ashhart Nov 21, 2026
ad68bd4
lanes: the host row draw scans 64-logit blocks and skips mask words t…
ashhart Nov 11, 2026
959ff32
qwen draw: the bounded top-k skips blocks its mask word allows nothin…
ashhart Nov 11, 2026
19922bb
tests: test-host-draw-timing times the Qwen host draw a 248,320-logit…
ashhart Nov 11, 2026
2be9b69
tests: test-qwen35-metal-host runs the bounded keyed draws, which gua…
ashhart Nov 11, 2026
74a1bc4
Keep manual host draw timing outside automatic host CI
ashhart Nov 14, 2026
39c7715
changelog: #2846 under Unreleased
ashhart Nov 21, 2026
8d6f8db
changelog: #2846 under Unreleased
ashhart Nov 21, 2026
45534ce
Flash Next on CUDA: TF_FLASHNEXT_FUSED_SPLIT runs wide split-K lane c…
BadAd84 Nov 14, 2026
0f6a2ab
receipts: TF_FLASHNEXT_FUSED_SPLIT on main 2ba55ec7d3, with the noise…
BadAd84 Nov 15, 2026
4a5d9de
Flash Next on CUDA: launch records for the fused split-K instances at…
BadAd84 Nov 15, 2026
147c1d3
Flash Next: test-flashnext-fused-split-host runs fused_split.zig's te…
BadAd84 Nov 15, 2026
fea03cf
receipts: TF_FLASHNEXT_FUSED_SPLIT on main 41a72fd257, with the setti…
BadAd84 Nov 15, 2026
6552768
receipts: TF_FLASHNEXT_FUSED_SPLIT's five-SM kernel-contract-limits run
BadAd84 Nov 15, 2026
a701263
receipts: TF_FLASHNEXT_FUSED_SPLIT's arms describe the merge of main …
BadAd84 Nov 15, 2026
8879ef2
receipts: limits.txt keeps the summary, the controls, this change lau…
BadAd84 Nov 16, 2026
1f1803e
Fused split: pin the current main weight-first decode sources
ashhart Nov 20, 2026
64cfd64
flashnext: keep fused split scheduling on the owning CUDA lane
ashhart Nov 21, 2026
36a3c43
gradient serving: pin the lane-owned Flash Next fused split source
ashhart Nov 21, 2026
308d5e1
changelog: #3475 under Unreleased
ashhart Nov 21, 2026
8a1302e
perf(xpu): attn_merge with 16 subgroups per head and batched partial …
Mirrdhyn Nov 10, 2026
8098066
XPU contract: register attn_merge as a bit-equal replacement with two…
Mirrdhyn Nov 10, 2026
8df85c0
docs(receipts): XPU attn_merge 16-subgroup merge, bit-identical, A-B-…
Mirrdhyn Nov 10, 2026
e8acff2
XPU attn_merge: zero the values past the last slice instead of reload…
Mirrdhyn Nov 11, 2026
b7ce820
docs(receipts): attn_merge final-tree checks, corp_code rebuilt from …
Mirrdhyn Nov 11, 2026
8c84334
XPU contract: the planted attn_merge control re-weighs the last slice…
Mirrdhyn Nov 11, 2026
c175ff3
Drop the trailing blank line in compare.out (git diff --check) and le…
ashhart Nov 19, 2026
aa114d1
adapt attn_merge launch to main's shape-generic XPU forward
ashhart Nov 21, 2026
6059084
test(xpu): keep the attention pair launch aligned with the merge repl…
ashhart Nov 21, 2026
2ce240c
changelog: #3960 under Unreleased
ashhart Nov 21, 2026
afe0fc8
flashnext cuda: warm turns on one GPU, so the next turn resumes past …
ashhart Nov 17, 2026
61550b7
native cuda: fold the --record note into its line, keeping cuda.zig w…
ashhart Nov 17, 2026
b2d7a09
Apply maintainer fixes: keep main's warm_quiet, move otherWork, add c…
ashhart Nov 17, 2026
93ff1a4
Hand interrupted warm prefixes to queued follow-ups without refilling…
ashhart Nov 18, 2026
acc9f2c
Skip Flash Next CUDA image warm passes before cache admission
ashhart Nov 18, 2026
62ff1d4
tests: re-pin the two Flash Next serving sources the last commit chan…
ashhart Nov 18, 2026
7c93ba2
Adapt warm handoff to cancelled-promise semantics
ashhart Nov 21, 2026
6181ed1
fmt: cap CUDA lanes and refresh its serving pin
ashhart Nov 21, 2026
6dbd8c7
Protect unrelated cache entries during warm handoff
ashhart Nov 21, 2026
1eed88b
changelog: #3219 under Unreleased
ashhart Nov 21, 2026
d344b00
tests: Flash Next env table counts #3475's TF_FLASHNEXT_FUSED_SPLIT (…
ashhart Nov 22, 2026
31b7d54
changelog: tests: Flash Next env table counts #3475's TF_FLASHNEXT_FU…
ashhart Nov 22, 2026
65843ef
ci: install PyYAML for the root pytest job
ashhart Nov 22, 2026
2558607
changelog: ci: install PyYAML for the root pytest job
ashhart Nov 22, 2026
a059335
lanes: conformance tests, fresh = resumed cache, tree = chain = plain…
ashhart Nov 22, 2026
0b10b2c
docs: the conformance ledger, seven invariants and the host tests tha…
ashhart Nov 22, 2026
3a02038
changelog: tests: lane-core conformance suite and decode invariant le…
ashhart Nov 22, 2026
de767a4
contract: H3's registration moves into its own Suite, so metal_main.z…
BobClawblaw Nov 6, 2026
203c0dc
engine_api: the lone driver's contract moves into engine_lone.zig, so…
BobClawblaw Nov 10, 2026
560f48c
ricursive: Ripple-65B-Preview on native Metal (NVFP4 and bf16 releases)
BobClawblaw Nov 5, 2026
3619175
ricursive: cap --context at 262,144, the longest checked; credit the …
BobClawblaw Nov 5, 2026
2d01c1e
ricursive docs: KL against the release's own bf16 code; the bf16 rele…
BobClawblaw Nov 5, 2026
325c439
ricursive contract: llama's projections at o_proj's reduction (k 10,240)
BobClawblaw Nov 5, 2026
3dd9305
Fit Ripple integration under the code file cap
ashhart Nov 21, 2026
29b3572
server goldens: GET /v1/models/{id}'s ten goldens publish reasoning_o…
ashhart Nov 21, 2026
d216170
changelog: #2231 under Unreleased
ashhart Nov 22, 2026
0586ac6
tests: prove lane batch composition invariance
ashhart Nov 22, 2026
e167d58
tests: retain committed lane draw positions
ashhart Nov 22, 2026
6f047cc
tests: keep restored fake prefixes draftable
ashhart Nov 22, 2026
0d27909
tests: draft from restored fake history
ashhart Nov 22, 2026
7d24325
changelog: tests: lane-core batch-composition invariance gate
ashhart Nov 22, 2026
1cbf861
lanes: bound delayed third-stream service
ashhart Nov 22, 2026
c35d9f7
changelog: tests: a third request at two slots starts promptly and ge…
ashhart Nov 22, 2026
fa1a22f
metal: presence and frequency penalties on Flash Next and Qwen3.8-27B…
ashhart Nov 13, 2026
50d3b09
metal penalties: register the measured launch and exact in-place cont…
ashhart Nov 17, 2026
c33d325
contract: keep metal_main.zig at 600 lines with the penalties suite o…
ashhart Nov 21, 2026
211cd86
changelog: #3145 under Unreleased
ashhart Nov 22, 2026
3b8a596
changelog: #3145 under Unreleased
ashhart Nov 22, 2026
eebfe0c
server: n of 1 through 16 choices on chat and completions, each its o…
ashhart Nov 13, 2026
a16626a
server: reuse prompt_list's fan for n choices; adapt its n=2 test
ashhart Nov 17, 2026
9beabc5
server: keep fanned choices on the request's outer trace
ashhart Nov 21, 2026
db5b001
tools tests: the pairing scope test's refused request is n 17, now th…
ashhart Nov 21, 2026
34af03a
changelog: #3148 under Unreleased
ashhart Nov 22, 2026
393b217
cuda: keep 1.3.2's unified budget without dropping the checkpoint's p…
ashhart Nov 21, 2026
dc8177e
cuda: restore 1.3.2's unified budget with a just-read checkpoint guard
ashhart Nov 21, 2026
53d6072
cuda: stop dropping the checkpoint pages before a GB10 load
ashhart Nov 21, 2026
881833e
test: follow the unified CUDA checkpoint budget
ashhart Nov 22, 2026
311749c
changelog: #4427 under Unreleased
ashhart Nov 22, 2026
ff64ef9
GLM CUDA: skip sparse-overwritten dense rows
ashhart Nov 22, 2026
37db5c5
GLM CUDA: skip unread prefill projections
ashhart Nov 22, 2026
71f9999
changelog: glm cuda tp2 prefill: skip sparse-overwritten dense rows a…
ashhart Nov 22, 2026
640add0
changelog: #4499's line from lines/4499.txt in place of its own
ashhart Nov 22, 2026
61d4a48
glm cuda: opt into local indexer rows through 32K
samegu93 Nov 22, 2026
71fdfb2
glm cuda: read prefill own partials in place
samegu93 Nov 22, 2026
d5d5b1a
changelog: glm cuda tp2 prefill: local indexer rows via TF_GLM_INDEX_…
ashhart Nov 22, 2026
f23c76e
tests: re-pin glm_glue_rows.cuh, which this PR's in-place own-partial…
ashhart Nov 22, 2026
e7aba1a
changelog: #4510's line from lines/4510.txt in place of its own
ashhart Nov 22, 2026
7051a7b
qwen3-asr: host config, tensor map, mel rows and a float64 tower (#2105)
jschmied Nov 5, 2026
9da80b5
qwen3-asr: the tower and Qwen3 schedules, generic over a backend bind…
jschmied Nov 5, 2026
2d8169e
qwen3-asr case tool: each greedy step's top two and margin, and an id…
jschmied Nov 5, 2026
1cb6082
qwen3-asr case tool: layer 0's steps as stages (#2105)
jschmied Nov 5, 2026
240ac33
qwen3-asr: the CUDA binding, tower and Qwen3 LM, greedy on one stream…
jschmied Nov 5, 2026
ade1edc
Follow main extracted CUDA help for the original ASR contract command
ashhart Nov 21, 2026
d4ed7c3
qwen3-asr: zig fmt
jschmied Nov 5, 2026
a39630a
qwen3-asr: mel.zig's comments describe the computation, not the refer…
jschmied Nov 5, 2026
7b7a5b0
qwen3-asr: a lone chunk under 100 frames is convolved at its own leng…
jschmied Nov 6, 2026
fb9d8b9
qwen3-asr: tf-qwen3-asr-check opens a sharded checkpoint through core…
jschmied Nov 6, 2026
9544e77
qwen3-asr: the host and CUDA checks are gates with a non-zero exit (#…
jschmied Nov 6, 2026
6f4423d
qwen3-asr: admission requires the tower's rows at the LM's width and …
jschmied Nov 6, 2026
764f437
qwen3-asr: drop prompt.split, which claimed parse_asr_output without …
jschmied Nov 6, 2026
1f40b85
qwen3-asr: tf-qwen3-asr-check --ids-only, as tf-qwen3-asr has (#2105)
jschmied Nov 6, 2026
8fe21e1
qwen3-asr: the tower dumps conv_out, and tf-qwen3-asr compares it (#2…
jschmied Nov 6, 2026
37472b0
qwen3-asr: windowed attention is the decision, and a --global-attenti…
jschmied Nov 6, 2026
e40ccc2
qwen3-asr: one-line comments for the lean check (#2105)
jschmied Nov 6, 2026
1cafc39
qwen3-asr: a decode step's logits equal the prompt pass's rows, and a…
jschmied Nov 10, 2026
da4cfea
qwen3-asr: tf-qwen3-asr-forced, the teacher-forced tie rule, and the …
jschmied Nov 10, 2026
aa1d7f0
qwen3-asr: tf-qwen3-asr-forced takes an exact reference tie either wa…
jschmied Nov 10, 2026
494fa37
qwen3-asr: the exact-tie order of the reference's topk pair moves int…
jschmied Nov 10, 2026
f1b695e
qwen3-asr: the language model runs qwen3's CUDA pass (#2285) with a s…
jschmied Nov 12, 2026
6a26833
qwen3 cuda: forwardFrom refuses a start or head without one input and…
jschmied Nov 12, 2026
9ee2efc
tests: re-pin prefill_attention.cu, vit.cu and vit.zig for Qwen3-ASR'…
jschmied Nov 12, 2026
d0d879a
tests/cuda: Qwen3-ASR's contract set runs under kernel-contract's wor…
jschmied Nov 17, 2026
3adb9ea
Follow main extracted CUDA help when the original ASR command retires
ashhart Nov 21, 2026
1247c95
qwen3-asr: tower_ref.zig's header and chunks.zig's rows test describe…
jschmied Nov 17, 2026
7fb9fc6
changelog: #2239 under Unreleased
ashhart Nov 22, 2026
5cf8287
prompt cache: compare the full salt identity
ashhart Nov 22, 2026
4da2ef1
device caches: isolate snapshots by exact salt
ashhart Nov 22, 2026
2e12ca6
disk identity: hash tokenizer and template files
ashhart Nov 22, 2026
9a30c51
qwen27: isolate standing slots by salt
ashhart Nov 22, 2026
13df254
Qwen HIP: singular page ownership on faults
ashhart Nov 22, 2026
b1f6267
Nemotron HIP: make page adoption transactional
ashhart Nov 22, 2026
9f210c2
qwen3_5 cuda: the prefill test double's keep takes the cache salt too
ashhart Nov 22, 2026
4bb72df
qwen3_5 test: cache-salt parameter in the prefill-widths keep double
ashhart Nov 22, 2026
15163ef
changelog: #4504 under Unreleased
ashhart Nov 22, 2026
de1686d
KIA16: precreate GLM prompt profiling traces before readiness
ashhart Nov 22, 2026
4658b04
KIA18: initialize GLM snapshot fixture profiling state
ashhart Nov 22, 2026
e6094de
changelog: #4511 under Unreleased
ashhart Nov 22, 2026
601ff14
contract: fix GLM nonfinite kernel semantics
ashhart Nov 21, 2026
6d63baf
metal: cast raw GLM codes to bfloat
ashhart Nov 21, 2026
defacc2
glm: carry exact nonfinite affine through g128
ashhart Nov 21, 2026
a0a8624
contract: prove GLM finite-output bit identity
ashhart Nov 21, 2026
53a590b
contract: restore affine bias uploads
ashhart Nov 21, 2026
718aac9
changelog: #4396 under Unreleased
ashhart Nov 22, 2026
68205a1
Merge remote-tracking branch 'upstream/main' into feat/190-merge-upst…
plotarmordev Nov 22, 2026
bcdbe79
Merge remote-tracking branch 'upstream/main' into feat/190-merge-upst…
plotarmordev Nov 22, 2026
febcf50
persistence tests: tokenizer and template edits move the disk namespa…
plotarmordev Nov 22, 2026
0029431
lanes test: the lone fake hands streams back as handover.zig asks, an…
ashhart Nov 22, 2026
89331bc
changelog: tests: lane host lone-driver test honours the hand-back co…
ashhart Nov 22, 2026
d7f1f40
changelog: #4568's line from lines/4568.txt in place of its own
ashhart Nov 22, 2026
b95c8c5
flashnext metal: scale index on Macs with tensor units too
ashhart Nov 22, 2026
e5627e1
changelog: flashnext metal: scale index on Macs with tensor units too
ashhart Nov 22, 2026
5c1fea6
changelog: #4547's line from lines/4547.txt in place of its own
ashhart Nov 22, 2026
93f6378
glm: stage borrowed conversation rows before backend expiry
ashhart Nov 9, 2026
6fc84a7
rows: restore the row-store doc comments; withAt moves to rows_chain.zig
ashhart Nov 12, 2026
4d55332
Preserve borrowed disk keeps across staging pressure
ashhart Nov 12, 2026
b8081eb
Keep the borrowed permit fixture comment concise
ashhart Nov 10, 2026
642b19d
docs: GLM on Metal stages every resident keep, whatever --spill-gib i…
ashhart Nov 12, 2026
a7d5ac7
rows: explain borrowed-state recovery under staging pressure
ashhart Nov 17, 2026
f39cef7
changelog: #2755 under Unreleased
ashhart Nov 22, 2026
2eecb96
changelog: 1.3.4 corrections and sixteen lost lines
ashhart Nov 22, 2026
3bbd71f
fix adversarial protocol and grammar handling
ashhart Nov 21, 2026
85a1f7b
server: move protocol helpers and queue metrics test into separate files
ashhart Nov 21, 2026
eb7ecb2
server: avoid shadowing the response item type
ashhart Nov 21, 2026
5db1d8d
fix MiniMax optional tool grammar compilation
ashhart Nov 21, 2026
6b5d8f1
server: stream a tool call's closer cut by a feed, and keep each repl…
ashhart Nov 22, 2026
86ae2a5
changelog: #4378 under Unreleased
ashhart Nov 22, 2026
211970e
feat(hip): serve Qwen3.8-27B with its DFlash2 drafter
AbrahamCete Nov 5, 2026
601b0da
test(qwen35): check --drafter runs the lane invariants under DFlash2
AbrahamCete Nov 5, 2026
47cdf9c
test(hip): pin the DFlash2 drafter's attach paths
AbrahamCete Nov 5, 2026
1fa4826
fix(hip): a resumed stream's DFlash2 features start at its resume point
AbrahamCete Nov 6, 2026
905584f
test(qwen35): check --drafter compares a resumed drafted stream with …
AbrahamCete Nov 6, 2026
7a5bcaa
fix(hip): --drafter refuses BF16 qwen3_5 checkpoints before they load
AbrahamCete Nov 16, 2026
cd545e5
native hip: keep hip.zig at 600 lines with main's merged refusal test…
ashhart Nov 20, 2026
9de96df
native hip: pass the family to the DFlash2 refusal test's checkGroup …
ashhart Nov 21, 2026
c344c3d
native hip: keep hip.zig at 600 lines with the DFlash2 drafter on mai…
ashhart Nov 21, 2026
030efd8
hip lanes: the engine module import is engine_mod, so main's copies-o…
ashhart Nov 21, 2026
7ef2b42
changelog: #3665 under Unreleased
ashhart Nov 22, 2026
0b06e1e
glm/cuda: TF_GLM_MOE_DIRECT=1 runs a decode window's EXL3 MoE without…
ultradaoto Nov 17, 2026
8dc889c
gradient-serving: re-pin glm_glue_moe.cuh and glm_glue_rows.cuh for T…
ultradaoto Nov 19, 2026
20cb27d
glm/cuda: follow main's dependent-launch prologue for combine_tail (#…
ashhart Nov 19, 2026
e20ea30
cuda contracts: tear down glm_moe before idol_decoder
ashhart Nov 21, 2026
0729e04
changelog: #3659 under Unreleased
ashhart Nov 22, 2026
42ba41f
speech: wav24, wav32f and FLAC replies, a sample_rate and stereo, eac…
ashhart Nov 13, 2026
9e1aecc
server: speech_format_http_test runs over a Unix socket pair, so it i…
ashhart Nov 16, 2026
bd803eb
server: shorten Drama Metal import comment
ashhart Nov 21, 2026
00ed97f
fix: resolve the shared audio resampler within its owning module
ashhart Nov 21, 2026
e9b32a3
changelog: #3138 under Unreleased
ashhart Nov 22, 2026
da45bad
pull: proxy settings, connect and no-progress timeouts, and a clear m…
ashhart Nov 20, 2026
36ec216
pull: honor proxy routing and timeouts on Windows
ashhart Nov 20, 2026
fc38d38
pull: bound DNS and TCP with one deadline
ashhart Nov 21, 2026
2dde9e7
pull: persist buffered body bytes before read failures
ashhart Nov 21, 2026
f453136
changelog: #4140 under Unreleased
ashhart Nov 22, 2026
a3606d7
server: build the tokenizer memo on a dense dedicated allocator
bikepresentball Nov 22, 2026
b112ad6
changelog: #4455 under Unreleased
ashhart Nov 22, 2026
2106f54
qwen3.5: report the loaded CUDA prompt pass size
ashhart Nov 22, 2026
eb07ee9
changelog: #4600 under Unreleased
ashhart Nov 22, 2026
50f09d4
changelog: #4600 under Unreleased
ashhart Nov 22, 2026
77f428e
prompt cache: fork marks read only the request salt's kept prompts
ashhart Nov 22, 2026
af42d4e
changelog: #4601 under Unreleased
ashhart Nov 22, 2026
6b0dbc0
Merge remote-tracking branch 'upstream/main' into feat/190-merge-upst…
plotarmordev Nov 22, 2026
7685450
h3: MiniMax-H3-Image's prompt rules on the host
ashhart Nov 10, 2026
06c5776
h3: MiniMax-H3-Image's prompt path on Metal, on any Apple GPU
ashhart Nov 10, 2026
73f7e80
docs: MiniMax-H3-Image's prompt path in its recipe; one line less in …
ashhart Nov 10, 2026
27b23bf
h3: the image decoder's host rules: its tensors, a tile's sequence an…
ashhart Nov 10, 2026
8382da3
h3: the image decoder on Metal in bf16, and a float64 reference of it…
ashhart Nov 10, 2026
3b4d0e0
h3: tf-h3-image-decoder, a latent to a PNG on any Apple GPU, and its …
ashhart Nov 10, 2026
22d9a77
docs: MiniMax-H3-Image's decoder in its recipe; one line less in meta…
ashhart Nov 10, 2026
bb0c2fd
h3: MiniMax-H3-Image's text to image end to end: the prompt tool writ…
ashhart Nov 10, 2026
0a569c8
picture: LANCZOS gives Pillow 13's bytes, shrinking, enlarging, both …
ashhart Nov 10, 2026
d286600
h3: MiniMax-H3-Image's prompt encoder, transformer and decoder reside…
plotarmordev Nov 17, 2026
09560b0
docs: the resident H3-Image server in the Metal recipe
plotarmordev Nov 17, 2026
c843038
h3: keep main Metal tool registration beneath resident additions
ashhart Nov 21, 2026
129094d
changelog: #3718 under Unreleased
ashhart Nov 22, 2026
102a53a
Merge remote-tracking branch 'upstream/main' into feat/190-merge-upst…
plotarmordev Nov 22, 2026
b61ad2c
h3: resident server keeps main's idle ticker and fail-closed startup …
plotarmordev Nov 22, 2026
7ffebe9
docs: the resident H3-Image server's idle ticker and fail-closed star…
plotarmordev Nov 22, 2026
ab69618
changelog: card 200, the resident server's idle ticker and fail-close…
plotarmordev Nov 22, 2026
590234a
Merge pull request #137 from plotarmordev/feat/200-merge-upstream-mai…
plotarmordev Nov 22, 2026
c445206
Merge remote-tracking branch 'origin/main' into feat/190-merge-upstre…
plotarmordev Nov 22, 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: 1 addition & 1 deletion .github/workflows/no-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- name: pytest from the root, as an outside evaluator runs it
run: |
python3 -m venv "$RUNNER_TEMP/pytest"
"$RUNNER_TEMP/pytest/bin/pip" install --quiet pytest
"$RUNNER_TEMP/pytest/bin/pip" install --quiet pytest pyyaml
"$RUNNER_TEMP/pytest/bin/python" -m pytest -q -p no:cacheprovider
zig:
if: ${{ !(startsWith(github.head_ref, 'lead/train-') && github.event.pull_request.head.repo.full_name == github.repository) }} # a landing train's tip: see the note above jobs
Expand Down
109 changes: 101 additions & 8 deletions CHANGELOG.md

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions RUNBOOK.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,19 @@ After a memory refusal, reduce the context or reply limit, or choose a smaller q
`--learn` writes a shared prompt state to disk only while the disk keeps `--learn-min-free-gib` free, 4 GiB by default.
Below that, learning pauses with a log line and serving goes on; a refused write is tried again after 1 to 60 seconds, sooner when space comes back.
Each learned file carries a checksum over its header and contents, so a damaged, truncated or older file is refused and learned again.
`--prompt-cache-disk DIR` writes every kept prompt state behind to that directory, while the engine idles,
and a SIGTERM stop writes what waits within 20 seconds. It is equivalent to `--learn-conversations --learn-dir DIR`;
`--prompt-cache-disk DIR` writes kept prompt states to that directory; most families write while idle.
A SIGTERM stop writes what waits within 20 seconds. It is equivalent to `--learn-conversations --learn-dir DIR`;
the old flags remain supported, and `--learn-conversations` alone keeps its existing default directory.
Use either spelling: combining `--prompt-cache-disk` with `--learn-dir` or `--learn-conversations` is refused.
The startup line names the disk directory and the device budget when the engine reports one.
GLM on Metal stages every resident keep, including each planned mark, before its borrowed MLA rows can be reused.
It does so whatever `--spill-gib` is set to: with `--spill-gib`, those keeps are staged when kept, not at eviction.
That moves the gather and its GPU wait into the request path.
A busy staging permit waits and retries; an image larger than the permit finishes through the chunk writer there.
The log names `StagingBusy` when a keep waits, or `StagingFull` when it streams bounded pieces.
Other admission or copy failures are named in the log; that keep remains in RAM only, without an automatic retry.
The synchronous writer finishes at keep; otherwise an owned staged image publishes in the background.
More marks can write more bytes per turn and consume the daily budget sooner; inspect the disk log's byte counts.
Stop a server with SIGTERM, not SIGKILL, so its last turn is kept.
`--learn-daily-gib` caps those writes a day (32 GiB by default); `DELETE /v1/imprint` forgets one model's conversation states.

Expand Down
1 change: 1 addition & 0 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ These follow a model's release code or a library's model code for their math, ro

- `tools/lfm3/ref64.py` and `zig/kernels/xpu/lfm3.cl`: `modeling_lfm3.py` in [LiquidAI/LFM3-1.7B](https://huggingface.co/LiquidAI/LFM3-1.7B). Copyright Liquid AI, LFM Open License v1.0; see [the license text](LICENSES/LFM-Open-1.0.txt).
- `zig/kernels/metal/minimax_m3/glue.metal`: the rounding points of `modeling_minimax_m3_vl.py` in [transformers](https://github.com/huggingface/transformers).
- `zig/src/families/ricursive/` (its layer order and rounding points), `zig/kernels/metal/ricursive/glue.metal` and `tools/zig/ricursive_reference.py`: `modeling_ricursive.py` in [ricursiveAI/Ripple-65B-Preview](https://huggingface.co/ricursiveAI/Ripple-65B-Preview) at revision `240d5966cbe00f0627c699e59ef58560b60303cf`: the scaled embedding, the value residual, the per-head q/k norms, RoPE on sliding layers only, the fp32 sigmoid gate, the clamped SwiGLU and the four norms a layer. The release's SGLang model `inference/server/model.py` computes the same layers; what is in it alone is its serving (the W4A4 kernels, the capture of hidden states for a drafter), which this family does not take. Copyright ricursiveAI, Apache License 2.0; see [the license text](LICENSES/Apache-2.0.txt). The reference's `--release` mode imports the release's own `modeling_ricursive.py` from the checkpoint at run time; TensorFold does not include it.
- `zig/src/vision/qwen_cuda.zig`: `Qwen3_5VisionModel` in transformers.
- `zig/src/core/picture/patches_test.zig`: recorded image-processor output data from `Lfm3VlImageProcessor` and `Qwen2VLImageProcessor` in transformers; the processing implementation is described below.
- `zig/src/families/flashnext/rotary_config.zig`: `_compute_yarn_parameters` in transformers, for the 64 rotary dims.
Expand Down
4 changes: 4 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ pub fn build(b: *std.Build) void {
@import("zig/build/flashnext_budget.zig").steps(b, test_step);
@import("zig/build/flashnext_batch_host.zig").tests(b, test_step);
@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_empty = b.addWriteFiles().add("budget-compile-only.metallib", "");
Expand Down Expand Up @@ -206,6 +207,7 @@ pub fn build(b: *std.Build) void {
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);
@import("zig/build/glm_disk_host.zig").steps(b, gemma4_host_mods.metal, gemma4_host_mods.engine, gemma4_host_mods.lanes, test_step);
@import("zig/build/prefill_widths_metal.zig").compileHost(b, gemma4_host_mods.engine, gemma4_host_mods.lanes);
@import("zig/build/prefill_widths_metal.zig").rest(b, gemma4_host_mods.engine, gemma4_host_mods.lanes);
}
Expand All @@ -223,6 +225,7 @@ pub fn build(b: *std.Build) void {
@import("zig/build/glm_pdl_scan.zig").add(b);
@import("zig/build/living_tools_host.zig").steps(b);
cuda_build.hostTests(b, draft_ids, build_options, test_step, target.result.os.tag != .macos);
@import("zig/build/pull_tests.zig").compile(b, target, draft_ids);
@import("zig/build/env_defaults.zig").steps(b, draft_ids, test_step);
@import("zig/build/no_backend_host.zig").steps(b, test_step);
if (target.result.os.tag != .macos) @import("zig/build/qwen3_cuda.zig").steps(b, target, optimize, cuda_options, test_step);
Expand Down Expand Up @@ -276,6 +279,7 @@ pub fn build(b: *std.Build) void {
@import("zig/build/server.zig").cpuArtefacts(b, b.graph.host, optimize, build_options);
@import("zig/build/mcdma_pair.zig").add(b, target);
@import("zig/build/cache_index_timing.zig").step(b);
@import("zig/build/host_draw_timing.zig").step(b);
// the chat template's nesting, step, stack and memory limits (zig/src/core/template/limits_test.zig), on every host
const template_limits = b.createModule(.{ .root_source_file = b.path("zig/src/core/template/template.zig"), .target = b.graph.host, .optimize = .Debug, .link_libc = true });
b.step("test-template-limits-host", "Chat template nesting, render steps, stack and memory limits without a GPU").dependOn(&b.addRunArtifact(b.addTest(.{ .root_module = template_limits, .filters = &.{"security:"} })).step);
Expand Down
5 changes: 5 additions & 0 deletions changelog.d/200-merge-upstream-main-190-follow-up-keep-u.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# MiniMax-H3-Image: the resident server keeps main's idle ticker and fail-closed startup

- The #190 merge had taken the branch's `tf-h3-image-server` whole, dropping upstream's idle ticker and its refusal to serve unwarmed. Both are back beside `--draft-steps`, `--routed-steps` and `profile`: a keepalive commits every 400 ms between requests so the weights' residency set stays wired, and the server exits when the weights cannot be held resident or the ticker cannot start.
- Upstream's gates come with it: resident/fresh latent parity after an idle pause the ticker spans, and both startup refusals.
- The Metal recipe's resident section now says so; every other conflict in that merge was re-read and kept nothing else of upstream's that the branch lacks.
55 changes: 41 additions & 14 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,11 @@ Unsupported image input, audio, video and non-text output requests receive HTTP

Each native GET /v1/models entry, including every configured alias, includes a capabilities object.
It reports the loaded engine's boolean Info flags: text_generation, context_fitted, call_gates, loop_guard,
thinking_budget, reasoning, answer_limit, structures, logprobs, penalties, prompt_logprobs, prompt_cache, cache_salt
([salts](#prompt-cache-salts)), warm_turns, plain_only, decides, pictures, greedy_only and slide_conversations. The
vision, speech, embeddings, readouts and rerank fields report whether that user feature is present. The last two fields,
thinking_switch and thinking_applicable, are the loaded chat template's and tokenizer's thinking facts (see
thinking_budget, reasoning, reasoning_optional, answer_limit, structures, logprobs, penalties, prompt_logprobs,
prompt_cache, cache_salt ([salts](#prompt-cache-salts)), warm_turns, plain_only, decides, pictures, greedy_only and
slide_conversations. The vision, speech, embeddings, readouts and rerank fields report whether that user feature is
present. The last two fields, thinking_switch and thinking_applicable, are the loaded chat template's and
tokenizer's thinking facts (see
[Reasoning](#reasoning)), set once at startup on the same Info flags. Every field is a JSON boolean, including false,
and no callback details or addresses are exposed.

Expand Down Expand Up @@ -463,7 +464,7 @@ delete runs gets 503, an id that is not a number 400, and an id the graph does n
| `parallel_tool_calls` | False returns at most one completed call | Both |
| `max_tokens`, `max_completion_tokens` | Explicit reply limit; rejected if prompt plus reply exceeds the window | Both |
| `temperature`, `top_p`, `top_k`, `min_p` | Sampling overrides; zero temperature is greedy | Both |
| `presence_penalty`, `frequency_penalty` | OpenAI's, from -2 to 2: before each draw, greedy or sampled, a token the reply already holds loses `presence_penalty` from its logit and `frequency_penalty` once for each time it holds it; the prompt's tokens do not count. Drafted replies equal undrafted ones with them. Applied by Qwen3.8-27B and Qwen3.5-MoE on CUDA; other engines refuse nonzero values with 400; zero, null and omitted values keep working | Native |
| `presence_penalty`, `frequency_penalty` | OpenAI's, from -2 to 2: before each draw, greedy or sampled, a token the reply already holds loses `presence_penalty` from its logit and `frequency_penalty` once for each time it holds it; the prompt's tokens do not count. Drafted replies equal undrafted ones with them. Applied by Qwen3.8-27B and Qwen3.5-MoE on CUDA, and Qwen3.8-27B and Qwen3.8-Flash-Next on Metal; other engines refuse nonzero values with 400; zero, null and omitted values keep working | Native |
| `seed` | Explicit sampling key; native fallback uses configured defaults, then a fresh key (see below) | Both |
| `stream` | Server-sent events; the last event carries usage | Both |
| `stream_options.include_usage` | Usage in its own final event with `"choices": []`, not on the finish event | Both |
Expand All @@ -482,7 +483,15 @@ delete runs gets 503, an id that is not a number 400, and an id the graph does n
| `return_token_ids` | The reply's token ids in the response's `tensorfold.token_ids`, the tokens its `token_sha256` hashes | Native |
| `execution_witness` | Boolean, default false. True binds the reply to the execution witness; see [Reply binding](#reply-binding). A server without `--execution-witness` answers 400, a key with `inference` but not `read` 403 | Both |

`n` must be 1; multiple choices receive HTTP 400.
`n` takes 1 through 16 choices: each is its own engine request on the one prompt, and later choices resume the
prompt the first fills (their `tensorfold.cached_tokens` show it). Choice 0 keeps the request's seed (a request that
names none draws one for all its choices), so `n: 1` is unchanged; choice `i` draws with `mix(seed ^ i)` in 63 bits,
named in its own `tensorfold.seed`, and a solo request with that seed gives its tokens. Each choice has its own
tool-call ids, `stop_sequence` and loop-stop `error`. `usage` counts the prompt once and every choice's reply
tokens. A stream sends every choice's chunks by `index`, then each choice's finish, then one usage chunk when asked.
`n` above 1 with `logprobs` or a required tool call receives HTTP 400, as do `n` above 16 and, on a `--cortheon`
server, a chat its turn loop would take (send `"cortheon": false` for several choices). `/v1/responses` and
`/v1/imprint` serve one reply: `n` other than 1 receives HTTP 400 there.

`modalities` must be absent or `["text"]`, and a truthy top-level `image`, `images`, `image_url`, `input_image`,
`audio`, `input_audio`, `video` or `video_url` key is refused: this server accepts and produces text only.
Expand Down Expand Up @@ -1047,12 +1056,13 @@ A startup capacity estimate is not a measured release capacity.
On a unified-memory GPU (the DGX Spark's GB10), the CUDA server's allocations come out of the host's RAM but are not
charged to a container's memory limit (`docker run --memory`, cgroup `memory.max`): the limit neither caps the
model's weights and cache nor keeps them from crowding other work on the machine. The startup budget is the host's
`MemAvailable`, at most the free memory CUDA reports, less a reserve (a tenth of RAM, at least 4 GiB). CUDA does not
count the page cache as free, so before loading, the server drops the checkpoint's own shards from it. On native CUDA
a stream's window is `--context`, the model's own window at `--context 0`, or, when it is unset, the family's default
capped at the model's own window; on the paged families the streams and pages then fill the budget up to the streams'
windows plus the cache's pages, so once those exceed it, the free memory after load is the reserve. To leave room for
other containers, start the server with a smaller `--context` or `--parallel`.
`MemAvailable`, at most the free memory CUDA reports plus the checkpoint's own cached bytes, less a reserve (a tenth
of RAM, at least 4 GiB). The checkpoint's clean pages stay in the page cache; they are reclaimed when CUDA needs
them, so the first prompt does not fault the weights back in. Other memory on the box still bounds the budget.
On native CUDA, a stream's window is `--context`, the model's own window at `--context 0`, or, when it is unset, the
family's default capped at the model's own window; on the paged families the streams and pages then fill the budget up
to the streams' windows plus the cache's pages, so once those exceed it, the free memory after load is the reserve.
To leave room for other containers, start the server with a smaller `--context` or `--parallel`.
`TENSORFOLD_MEMORY_RESERVE_GIB` replaces that reserve (at least 2 GiB) when you know the machine's headroom: a larger
one leaves more for other work, a smaller one more for KV caches. The reserve also carries CUDA context, NCCL and
workspace memory the estimate does not count, and exhausting a unified GPU's memory can freeze the host, so lower it
Expand Down Expand Up @@ -1159,6 +1169,16 @@ has started, a failure is an `error` event holding OpenAI's error object, then `
already completed stay sent. A client that disconnects, or a write that fails, cancels the picture at its next step,
and no later picture is submitted.

## Speech formats

`POST /v1/audio/speech` answers in `response_format` `wav` (the default: 16-bit mono at the model's rate), `pcm` (the
same samples, little-endian, no header), `wav24` (24-bit), `wav32f` (IEEE float WAV carrying the model's samples bit for
bit at its own rate, unclipped) or `flac` (16-bit FLAC that decodes to the `wav` reply's samples). `mp3`, `opus` and
`aac` are refused by name. `sample_rate` resamples the take to 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000,
88200, 96000, 176400 or 192000 Hz with the band-limited resampler the reference voices use. `channels: 2` writes each
sample on both channels. Without these fields, or with them at the model's rate and 1, `wav` and `pcm` replies are the
same bytes as before. A stream (`stream: true`) stays 16-bit mono PCM at the model's rate and refuses other values.

## Embeddings

`POST /v1/embeddings` takes OpenAI's body: `input` is one text, a list of texts, one list of token IDs or a list of
Expand Down Expand Up @@ -1352,6 +1372,9 @@ from the end of its headers, after the key check and before its body is read or
ends, streams included. Each key counts apart, by its digest, whatever its label; a server without keys counts every
request as one key. A refused request answers 429 with `Retry-After` and the route's error shape (`rate_limit_error`; the
OpenAI-shaped `code` names the limit) and closes its connection without reading the body. A refusal spends no rate.
A chat or completion with `n` above 1 holds `n` places under `--max-inflight` and `--max-inflight-per-key` (one rate
charge): once its body is read it takes the other `n - 1` places, all or none, or answers the same 429 before any
choice starts; it then counts as both accepted and refused in the metrics.

The rate's buckets live in a table of 128 keys. A key's bucket stays until it has refilled, so cycling keys cannot reset a
spent rate; with more than 128 keys starting requests within one refill, a further key is refused
Expand Down Expand Up @@ -1471,10 +1494,14 @@ up to N GiB under `~/.cache/tensorfold/spilled` for every model together, and re
matches resumes from it, token for token as a fresh prompt pass, after a restart too. An eviction stages a copy before
releasing RAM, then the engine continues while the I/O thread writes it. A full staging permit skips that save;
the request prefills if it returns before a saved state is available. This changes cache hits, never reply tokens.
GLM-5.3-Flash also stages each resident state when it is kept, with or without `--spill-gib`, because its slots and
shared pool can reuse those rows before an eviction. A busy permit waits and retries; an oversized image streams
in bounded pieces. The log names the staging reason; other admission or copy failures still skip that save.
An idle unload and a planned stop also save the states still in RAM, newest first, within the same disk cap and
20-second stop budget. The next engine open scans those files and restores them through the same path as evictions.
Older queued saves cannot evict states saved earlier in that close. States that exceed a staging permit, disk cap,
daily budget or free-disk floor are skipped; unfinished writes are cancelled at the deadline.
Older queued saves cannot evict states saved earlier in that close. States that exceed the disk cap, daily budget
or free-disk floor are skipped; ordinary eviction saves also skip images that exceed their staging permit.
Unfinished writes are cancelled at the deadline.
Past N GiB other models' spilled sets go first, then the state this server used least recently. A damaged file is
deleted and its tokens are prefilled, and a write cut off midway leaves nothing a later turn or a restart reads.
`--checkpoint-slots N` sets how many states stay in RAM beside the store, so the next one sends the oldest to disk; it
Expand Down
Loading