Skip to content

Offer the qualified Qwen 27B checkpoint in Desktop - #3771

Merged
ashhart merged 5 commits into
ashhart:mainfrom
AIflow-Labs:codex/qwen27-desktop-library-geometry
Nov 19, 2026
Merged

ashhart merged 5 commits into
ashhart:mainfrom
AIflow-Labs:codex/qwen27-desktop-library-geometry

Conversation

@AIFlowML

@AIFlowML AIFlowML commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Desktop applies the pinned 2B geometry to every qwen3_5 checkpoint and rejects the supported 27B at hidden size 5,120. The library now checks the qualified 27B dimensions when the native dispatcher would use the untied 27B route. The regression also exercises a mismatched KV head count, a mismatched attention interval, and tied heads at the root and in the text config.

Checks on this head

  • Head commit b0499d4849d0bf66357bcb01628216bafcdbdcbe.
  • Contributor preflight 221 lean findings on base and head, zero new. Zig formatting and diff whitespace checks passed.
  • Desktop library on M5 Max The new filesystem test failed on the old rule and passed on this head. The actual Qwen3.8-27B MLX 4-bit checkpoint was complete and unloadable before the fix. On this head it is loadable and resolves to the original snapshot. On the composed head both that checkpoint and the documented 2B resolve.
  • Desktop and mobile npm test passed 860/861 files on this head. Sole failure was the inherited git commit still works assertion in sandbox-git-control.test.ts, which also fails on clean main. All 885 files passed on composed head a841966220a46168702afdd9df351ded28c30a1e, which includes app: keep Git working when macOS auto-selects Xcode #3479. npm run typecheck, npm run build, and npm run verify:mobile passed on this head.
  • Native control Both the native build from main and the installed Desktop 1.0.0 bundle's native 1.2.0 listed the same real model and returned a two-token OK completion over loopback on M5 Max. The unchanged native base passed 14,872 host tests with 120 skipped. Both golden groups had zero unexpected differences. The native link check hit the inherited macOS _memcpy failure tracked by macOS native binary links internal memcpy after the device profile reader landed #3760.
  • CI 12 checks passed and two scheduled checks skipped. pytest failed the inherited test_ttft_starts_at_content_not_headers_role_or_final_usage assertion. A fixed clock origin reproduces it on clean main (Benchmark TTFT fixture can fail depending on the clock origin #3779). The independent fixture fix is Use a deterministic clock in the benchmark TTFT test #3783.
  • Not run Windows and Linux Desktop hardware. The real checkpoint comparison was on M5 Max Metal.

Receipt

N/A. This changes the Desktop library metadata check. Native serving above is the control.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency.
  • Comments and docstrings follow repository limits.
  • The diff and commit contain no private paths, addresses or credentials.

Igor Lessio - AIFLOW LABS

@ashhart

ashhart commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Thanks @AIFlowML. This mirrors the engine's own routing: on Macs, zig/src/native/qwen27_engine.zig sends a qwen3_5 checkpoint to the 27B engine unless it has a tied head or the 2B's hidden size. useQwen27 follows the same rule, and the pinned 27B sizes match the qualified ones in zig/src/families/qwen27/model.zig.

The test covers the untied 27B (offered), a wrong KV head count and a wrong attention interval (refused), and a tied head at the root and in text_config (left to the 2B check). On main the untied case fails.

One note for later, not for this PR: the same engine route also qualifies the 9B shape (hidden 4,096) and the routed Ornith-1.5-122B (hidden 3,072), and the library still refuses both, as main does today. A follow-up could mirror them the same way.

It applies to current main, and together with #3768 in either order. Nothing to change.

The red pytest job is the benchmark TTFT test that #3783 makes deterministic; this change doesn't touch it.

  • Synthena

@ashhart
ashhart force-pushed the codex/qwen27-desktop-library-geometry branch from b0499d4 to 4fb7503 Compare November 19, 2026 13:26
@ashhart
ashhart merged commit 53dc1b7 into ashhart:main Nov 19, 2026
3 of 16 checks passed
ashhart added a commit that referenced this pull request Nov 19, 2026
@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Thank you @AIFlowML. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes.

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.

Desktop applies the 2B geometry check to the supported Qwen3.8-27B checkpoint

2 participants