Repository navigation
app, native metal: TFQ3 checkpoints pass the desktop download check (#5033) - #5038
Merged
Merged
Conversation
ashhart
force-pushed
the
lead/app-tfq3-download-check
branch
from
November 25, 2026 11:59
b7ee2b4 to
9d85713
Compare
… families whose loaders read TFQ3 records Engine 1.3.5 serves TFQ3 on Metal for GLM-5.3-Flash and Qwen3.8-Flash-Next when the checkpoint holds their .tffpw records, but `capabilities --json` named only their MLX widths, so a client checking formats against it could not admit a TFQ3 checkpoint (#5033). Each family now declares the format beside the rule that turns it on (glm/tfq3.zig, flashnext/tfq3_files.zig, both `hasRecords`), and the native Metal registry takes it from there: glm5_next lists mlx-q4g64 and tfq3, qwen4_exp the MLX affine widths and tfq3. A family that adds a TFQ3 loader adds its entry the same way. The new test-tfq3-metal-capabilities host test pins that only these two families offer tfq3, beside their MLX widths. Only the capabilities list changes; no loader, kernel or token changes.
…w records The published TFQ3 checkpoints carry a plain MLX header in config.json (8-bit, groups of 64 or 32), so the preflight named them mlx-q8g64 or mlx-q8g32 and refused them as "Unsupported format" (#5033). The engine turns TFQ3 on from the checkpoint's .tffpw records, not config.json; the app now does the same. treeTotal, which the preflight already runs at the resolved commit, also returns the root's file names, and checkpointFormat names the format tfq3 when they hold TFQ3 records by the reading family's rule (glm5_next: nonmoe or layer_NN.tffpw; qwen4_exp: layer_NN or mtp_00.tffpw), else formatName's name as before; pw_v3_tables.bin alone is not a record. A TFQ3 checkpoint is ok when the engine lists tfq3 for its model_type, and against an older engine its reason names TFQ3 and a newer engine. describeFormat('tfq3') reads "TFQ3". The library's scan of a downloaded folder uses the same rule. Download check and library only; no token changes.
ashhart
force-pushed
the
lead/app-tfq3-download-check
branch
from
November 25, 2026 14:05
9d85713 to
71b5884
Compare
1 task done
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.
Fixes #5033: the desktop app called TFQ3 checkpoints "Unsupported format" and would not download them.
Why it happened:
TensorFold/GLM-5.3-Flash-TFQ3: 8-bit, group 64;TensorFold/Qwen3.8-Flash-Next-TFQ3: 8-bit, group 32). Its TFQ3 records sit beside it in.tffpwfiles.mlx-q4g64forglm5_nexton Metal, so the check refused the checkpoint even though the engine serves it.Engine (one commit):
capabilities --jsonliststfq3forglm5_nextandqwen4_exp, the two Metal families whose loaders read TFQ3 records.hasRecordsrule (glm/tfq3.zig,flashnext/tfq3_files.zig), so a later family adds its entry with its own loader.affine_widthslist is untouched, so no other family gainstfq3.test-tfq3-metal-capabilities, pins the list.App (one commit):
tfq3when its root holds.tffpwrecords, by the same rule as the family's loader.pw_v3_tables.binalone is not a record.okwhen the engine liststfq3for itsmodel_type. Against an engine that doesn't, the reason names TFQ3 and says it needs a newer engine.cli/hubtest cases cover a GLM TFQ3 tree against both engines, a plainmlx-q4g64tree (unchanged), and a stray tables file with no records (unchanged).Checks so far:
Engine side: fmt, AST, lean (164, unchanged) and the line caps; a type-check of the new step and
tensorfold-nativefor macOS.App side:
npm testandnpm run typecheckrun in this PR's CI.Checked against the Hub: both published TFQ3 repos hold their records at the root, as
layer_NN.tffpwplusnonmoe.tffpw(GLM) ormtp_00.tffpw(Flash Next).Synthena