Skip to content

train 1119075501: #3916 #3921 #3514 (CI only) - #3927

Closed
ashhart wants to merge 142 commits into
mainfrom
lead/train-1119075501
Closed

ashhart wants to merge 142 commits into
mainfrom
lead/train-1119075501

Conversation

@ashhart

@ashhart ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

CI for a landing train: #3916 #3921 #3514 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.

Bizuayeu and others added 30 commits November 19, 2026 01:13
…ared gate-up, after its router

Site f read a MoE layer's router alone. The shared expert's gate-up runs on the same window once the routed
experts are done, and its scales and codes now follow the router in the site's rows, inside the same budget.
The table's test gives layer 1 a block FP8 shared gate-up and checks where the 12 MiB budget cuts it.
…age cache after load

Shard 15 of the NVFP4 checkpoint holds the n-gram table beside 3.27 GiB of load-only tensors (embedding, HC,
MTP, vision); the runtimePages guard skipped its release whole, and the final sweep listed only top-level
*.safetensors while this checkpoint keeps its shards under tensors/. Now a shard drops everything but the
n-gram tensors' pages (releaseExcept), and the sweep walks the index's shards (core.checkpoint.shardFiles).
Split ling_mla_gpu.zig past 600 lines by job. One-line comments in mla.metal
and one-line docstrings in the python oracle. Lean new vs main is 0.
Register tf_ling_mla_rope_cache, tf_ling_mla_rope_q and tf_ling_mla_gate_expand
with planted source controls, the way Ling KDA and route were done in #3055.
AutoGPTQ v1 stores a 4-bit symmetric weight as qweight int32 [k / 8, n] with
eight inputs a word, scales fp16 [k / 128, n], and qzeros int32 [k / 128, n / 8]
whose every nibble is 7, so a weight is (nibble - 8) * scale.

core/quant/gptq.zig reads that form. The config side admits quant_method gptq
with bits 4, group_size 128, sym, no act order and a quantized lm_head, and keeps
its dynamic rules in declaration order, so the last rule matching a module
decides whether it is stored quantized. A rule is matched with Python's re.match
over the subset the rules use: literals, '.', '\x' escapes, '*' and '+' after an
atom and a final '$'. A rule outside that subset, an unprefixed rule key and a
rule whose own bits or group_size differ are refused by the rule's name rather
than guessed at. Anything else stops the load naming the field, the rule or the
tensor: bits, group_size, sym, desc_act, lm_head, a missing or malformed
dynamic, a qweight, scales or qzeros of another dtype or shape, a qzeros byte
other than 0x77 with its offset and value, and a non-empty g_idx, because act
order is not read.

read returns the three stored tensors as views and reference writes every
dequantized weight as binary64: q - 8 is an integer and the scale an fp16 value,
so each product is exact.

Host only: no family calls it, no kernel reads it and no setting is added, so
every checkpoint served today takes the path it took before. The test builds a
synthetic GPTQ checkpoint (config.json and a safetensors image packed by the
format's own definition) and checks a binary64 fixture of hand-derived values,
every refusal by name, the matcher on the rules a real export writes, and the
reader on both modules of the checkpoint.

Refs #3368
…nd a non-bool desc_act

A rule's backslash escape was read as the character that followed it, whatever that was,
so ".*layers\.\d+\.mlp.*" matched "layers.d.mlp" here while Python's re matches
"layers.12.mlp" there: a module the rule leaves BF16 could read as int4, or the reverse,
with no error. supported admits an escape only before a non-alphanumeric character, which
is that character itself in Python's re and here, and refuses "\d", "\w", "\s", "\b" and
the rest by the rule's name as "(" and "[" already were.

desc_act went through flag, which answers null for a value that is not a bool, so
"desc_act": "false" was read as false. It is refused by name now, saying what it found in
place of a bool, for the reason sym is.

checkpoint_format was ignored. It is admitted as "gptq" only and refused by name
otherwise, and dialect's doc comment no longer claims every field the reader does not read
is refused.

The tests add the rule above and "\w" and "\s\b" beside it, an escape of a non-alphanumeric
character read as the character, a rule using one admitted, the desc_act refusals, the
checkpoint_format refusals, and checkpoint_format "gptq" on the admitted config.

The published AutoRound export (Qwen3.8-Flash-Next-125B-A5B-INT4-AutoRound, revision
1464274) stores no g_idx tensor: 70 shards, 224454 tensors, none named *.g_idx, so the
refusal of a non-empty one is unchanged.
ashhart and others added 27 commits November 19, 2026 04:12
…shing on the way out

loadVision assigned the tower straight from a failing load, so the model kept a tower tag with no tower behind it
and deinit freed a pointer that was never made (a segfault at 0x18, e.g. on a 12B whose patch embedder is 4-bit).
Both arms now bind the load's result first. A device test fails a 12B embedder load and finds no tower set.
…tower runs (#3614)

Leader.encode sends the idle step before the tower pass, so ranks 1.. wait in tp_watch.sleep, not in an NCCL broadcast
that a net plugin's operation timeout can end (nccl-mesh-plugin: 30 s by default); the image step after the pass wakes
them as any step does. One rank and the steps' order are as before.
#3330 added four "dsv41 xmma units " launch records built only on GPUs with tensor units, without adding a pre-M5 gate in metal_limits.supported. On GPUs without tensor units, Gate 5 failed with LibraryLoad on those four records.

Add metal_dsv41_limits.tensorOnly, gate "dsv41 xmma units " launches through metal_support.tensor in metal_limits.supported, and cover both xmma variants with a host test in metal_mapping_test.
1.2.9's section held a second copy of #3125's line. 1.2.9 was tagged before
#3125 landed, and 1.2.10 is the first release that carries it; 1.2.10's
section keeps its line.
Optimize GLM-5.3-Flash Metal prompt matmul, KDA prep/scan/post, and indexer kernels on !tensorUnits() Apple Silicon GPUs via GLM-scoped TF_GLM_M3_FAST paths and 32-row affine_mm tiling, keeping M5 tensor-unit paths and output tokens bit-identical. Refs #3152.
Save model-aware agent choices, snapshot them before startup, and carry them through Room turns, compaction, ticket workers and delegated child runs. Keep inherited defaults and active-worker composer labels accurate. Split the affected Room modules to satisfy the source-size gate and cover actual HTTP requests, lifecycle boundaries and protected-store reloads. Refs #3328.
Keep worker effort consistent with the Room session even when saved configuration changes during startup. Reuse the typed worker launch contract, extend the real launch regressions, and retain startup guards after the host split. Refs #3328.
@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner Author

Restacking: the train this one was stacked on did not land as tested.

@ashhart ashhart closed this Nov 19, 2026
@ashhart
ashhart deleted the lead/train-1119075501 branch November 19, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.