Repository navigation
Conversation
…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.
8 of 9 tasks
Owner
Author
|
Stopped at #6372. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.