Skip to content

train 1205111551: #6372 #6477 (CI only) - #6483

Closed
ashhart wants to merge 6 commits into
mainfrom
lead/train-1205111551
Closed

ashhart wants to merge 6 commits into
mainfrom
lead/train-1205111551

Conversation

@ashhart

@ashhart ashhart commented Dec 5, 2026

Copy link
Copy Markdown
Owner

CI for a landing train: #6372 #6477 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.

…e refusal per geometry check

zig/tests/fixtures/qwen4_fp8 holds the unedited config.json of
Qwen/Qwen4-35B-A3B-FP8@4d35041fcd017a5608bd83bb65388757919d029c and
facts.json, an extract of the index and all 33 shard headers that the
checker reads (expert and PLE tensor names, dtypes, shapes, counts and
the PLE tensors' offsets) with the sha256 of each full file.

test-flashnext-xpu-host now parses the published config to the FP8
shape, binds it to its digest, and refuses one case per check, each
varying only that field: no head_dim, vocab_size one past, layer_types
missing or one short, a field that is not an integer, and a PLE layer
list other than [2]. Removing each check fails its case.
…he host tests, every PLE chunking checked

xpu-flashnext --check-checkpoint printed from code in xpu_main.zig that
no host test reached. The check now lives in xpu_checkpoint.zig and
returns what it read; --check-checkpoint prints it as before.
test-flashnext-xpu-host builds a sparse checkpoint at the published
names, dtypes and shapes (facts.json), with the hash vectors the config
derives and non-zero codes in the rows the check gathers. It passes
(30720 expert matrices, 128 PLE shards of 1250028 x 128) and runs each
reachable refusal: an expert missing or of another dtype or shape (by
name), the PLE scale or a hash vector missing or misshapen, an empty
head, a gap between heads, a table one row short, a NaN, zero or
negative scale, a misshapen n-gram shard, all-zero gathered rows and a
refused geometry. Expert refusals pass a Why instead of logging, and
the n-gram shape refusal's error log is skipped under test, so the
host tests can reach them.

The chunk check keeps the EOS seam and adds every split of the same
tokens into non-empty chunks (32, ordinary seams 1 and 5 among them),
each required to equal one whole call in rows and history. A planted
history reset at an ordinary seam fails it.
The Qwen4 engine never uploads its PLE n-gram tables: device_weights
`take` skips every table role and `lookup` reads the needed rows from the
read-only mapping each step. `tensorfold device` still compared the whole
snapshot with the weight budget, so a 64 GB Mac read the Qwen4-35B-A3B TFQ
packs (53 to 63 GiB on disk, 17.5 to 26.9 GiB resident) as too large.

models.onDisk now also returns the resident bytes: the snapshot's size
less the `.ple.ple_embedding.ngram_embedding.` tensors in its safetensors
headers, for qwen4 and qwen4_text only. The device verdict uses that, and
the report line names both sizes when they differ. Load, kernels and
output tokens are unchanged; other families keep their whole size.
`tensorfold info` still printed a Qwen4 checkpoint's whole snapshot as
its weights and priced the memory floor on it, while `tensorfold device`
now uses the resident bytes. For qwen4 and qwen4_text, info now takes
the same resident.residentBytes: the weights line names the bytes held
in GPU memory, a new "on disk:" line names the snapshot's size and the
PLE lookup tables left on disk, and the floor adds the margin to the
resident bytes. Every other family prints byte for byte as before.
Load, kernels and output tokens are unchanged.
@ashhart

ashhart commented Dec 5, 2026

Copy link
Copy Markdown
Owner Author

Stopped at #6372.

@ashhart ashhart closed this Dec 5, 2026
@ashhart
ashhart deleted the lead/train-1205111551 branch December 5, 2026 11:36
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.

1 participant