Skip to content

app, native metal: TFQ3 checkpoints pass the desktop download check (#5033) - #5038

Merged
ashhart merged 3 commits into
mainfrom
lead/app-tfq3-download-check
Nov 25, 2026
Merged

ashhart merged 3 commits into
mainfrom
lead/app-tfq3-download-check

Conversation

@ashhart

@ashhart ashhart commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Fixes #5033: the desktop app called TFQ3 checkpoints "Unsupported format" and would not download them.

Why it happened:

  • The app names a checkpoint's format from config.json alone.
  • A TFQ3 checkpoint's config carries a plain MLX header (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 .tffpw files.
  • The engine listed only mlx-q4g64 for glm5_next on Metal, so the check refused the checkpoint even though the engine serves it.

Engine (one commit):

  • capabilities --json lists tfq3 for glm5_next and qwen4_exp, the two Metal families whose loaders read TFQ3 records.
  • Each family declares the format beside its own hasRecords rule (glm/tfq3.zig, flashnext/tfq3_files.zig), so a later family adds its entry with its own loader.
  • The shared affine_widths list is untouched, so no other family gains tfq3.
  • A new host step, test-tfq3-metal-capabilities, pins the list.
  • No loader, kernel or token changes.

App (one commit):

  • Preflight and the library name a checkpoint tfq3 when its root holds .tffpw records, by the same rule as the family's loader. pw_v3_tables.bin alone is not a record.
  • Such a checkpoint is ok when the engine lists tfq3 for its model_type. Against an engine that doesn't, the reason names TFQ3 and says it needs a newer engine.
  • A checkpoint without records is named exactly as before.
  • New cli/hub test cases cover a GLM TFQ3 tree against both engines, a plain mlx-q4g64 tree (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-native for macOS.

  • App side: npm test and npm run typecheck run in this PR's CI.

  • Checked against the Hub: both published TFQ3 repos hold their records at the root, as layer_NN.tffpw plus nonmoe.tffpw (GLM) or mtp_00.tffpw (Flash Next).

  • Synthena

@ashhart
ashhart force-pushed the lead/app-tfq3-download-check branch from b7ee2b4 to 9d85713 Compare November 25, 2026 11:59
… 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
ashhart force-pushed the lead/app-tfq3-download-check branch from 9d85713 to 71b5884 Compare November 25, 2026 14:05
@ashhart
ashhart merged commit e002bc6 into main Nov 25, 2026
@ashhart
ashhart deleted the lead/app-tfq3-download-check branch November 25, 2026 14:05
@ashhart ashhart mentioned this pull request Nov 25, 2026
1 task done
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.

Tensorfold mac app does not support TFQ

1 participant