Repository navigation
fix(provider): Qwen 3.8 27B drafts with exact MTP acceptance on a single Mac; every other model keeps its rule (stacked on #1974) - #1999
Merged
Conversation
…MTP; the 35B builds keep 1.5 (red) The 0.10.12 gate on the signed 0.10.11 (temperature 1, top_p 0.95, top_k 20; Studio M3 Ultra for the 9B, M5 Ultra for qwen3.5-35b-a3b) decided each catalog Qwen 3.5/3.6 build's defaults: - qwen3.5-35b-a3b without the cards' presence_penalty 1.5 looped under typical and under exact MTP acceptance, so it and qwen3.6-35b-a3b-vl-mtp-mxfp8 (the same architecture) keep 1.5; - Qwen3.5-9B looped under typical acceptance (13 of 31 draws with MTP running) and not under exact (0 of 31), and without the penalty its rows stage prefix checkpoints (8,192 cached tokens on the 2nd send). Tests: - qwen35OmittedPresencePenaltyFollowsEachBuildsGate: a bare body and the coordinator's body (temperature 1, top_p 0.95, top_k 20) get presence penalty 0 on the 9B and 1.5 on the two 35B builds; a request's own 0 or 1.5 wins on every build. - qwen35CatalogBuildsUseTheirModelCardDefaults: the 9B resolves to the card values without the penalty. - MTPAcceptanceConfigTests: Qwen3.5-9B's built-in rule is exact; the 35B builds and other Qwen ids stay typical; a per-model or global value still wins. Red on dev 2474f3d: EngineV2SamplingDefaultsTests 4 issues (the 9B gets 1.5), MTPAcceptanceConfigTests 1 issue (the 9B resolves to typical); the 35B rows and the explicit-penalty rows already pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…acceptance; the 35B Qwen builds keep 1.5 Per the 0.10.12 gate (signed 0.10.11; temperature 1, top_p 0.95, top_k 20; #1652's loopers and tool transcripts at 32,768, everyday prompts at 8,192): - qwen3.5-35b-a3b without the cards' presence_penalty 1.5 ran away under typical MTP acceptance (8/12 loopers, 5/19 everyday prompts at concurrency 1) and under exact (2/12 loopers), so it and qwen3.6-35b-a3b-vl-mtp-mxfp8 (one architecture) keep qwen35CardDefaults; - Qwen3.5-9B ran away on 13/31 draws under typical acceptance and 0/31 under exact, MTP running; its penalty-free body cached 8,192 tokens on the 2nd send, the penalty body none. So: - EngineV2SamplingDefaults: qwen35NineBCardDefaults (temperature 1.0, top_p 0.95, top_k 20, no penalty) for Qwen3.5-9B; the 35B builds keep qwen35CardDefaults with presencePenalty 1.5. The table and the model_type binding are unchanged. - MTPAcceptancePolicy.builtInIsExact: exact for the Bonsai 9B candidate and Qwen3.5-9B; typical otherwise. Precedence is unchanged: a per-model or global mtp_acceptance still wins. - A request's own presence_penalty always wins: 0 on a 35B build lets it speculate (typical) and donate checkpoints; a nonzero value on the 9B turns its MTP and cache donation off for that request. - Docs: inference.md (a per-build table with the gate numbers, the request override, the acceptance default), prefix-cache.md (invariant 9 and a failure-mode row on the MTP-history coupling), configuration.md and cli-reference.md (the built-in exact models); a changelog fragment. Green (CPU-only, GPU denied): EngineV2SamplingDefaultsTests 16/16, MTPAcceptanceConfigTests 7/7, Bonsai9BMTPPolicyTests 3/3, Bonsai9BRequestPolicyTests 3/3, BenchmarkProductionInputTests 8/8, EngineV2TranslationTests 11/11; changelog check (68), docs-impact (9 files), docs-check (211). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g table, a platform citation, wording From the review-only refactor pass (refactor-pass-1961, opencode session; report earnings/refactor-1961.md), comments and docs only: - inference.md: the sampling-parameters table said presence_penalty takes a model-card default on "catalog Qwen 3.5/3.6"; it now names the 35B builds and says Qwen3.5-9B has none. - inference.md: the coordinator claim now cites darkbloom-platform's requestRuntimeDefaultKeys at master c69380d91f and states what the registry sets for these builds (checked read-only in production on 11-10: temperature 1, top_p 0.95, top_k 20, no presence_penalty). - inference.md: "Typical acceptance:" reads as one sentence after the new exception; prefix-cache.md invariant 9 links #sampling-parameters; MTPAcceptancePolicy's doc comment and a test comment reflowed and reworded. Checked: EngineV2SamplingDefaultsTests 16/16, MTPAcceptanceConfigTests 7/7, Bonsai9BMTPPolicyTests 3/3, Bonsai9BRequestPolicyTests 3/3, BenchmarkProductionInputTests 8/8, EngineV2TranslationTests 11/11 (CPU-only); changelog check (68), docs-impact (9), docs-check (211). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry other model keeps its rule (red) The narrow fallback to #1973: only the catalog Gemma QAT build changes. absentKeys now expects exact for gemma-4-26b-qat-4bit, and gemmaQATDefaultsToExact pins exact for that id, typical for its 8-bit siblings, the 35B Qwen builds, Qwen 3.8, Lightning and GLM, exact for Qwen3.5-9B (#1961), and that a per-model or global "typical" still wins. On #1961's head (ca8697d) two tests fail, each on gemma-4-26b-qat-4bit resolving to typical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y other model keeps its rule The narrow fallback to #1973 for 0.10.12. MTPAcceptancePolicy.builtInIsExact adds the catalog gemma-4-26b-qat-4bit to the Bonsai 9B candidate and Qwen3.5-9B (#1961); every other model keeps typical as its built-in rule, and the per-model -> global -> built-in precedence and the unknown-value -> exact rule are unchanged. Why Gemma: its assistant drafts most of its rows (11,863 of 14,211 on 11-09), and on OpenRouter's GPQA run of 10-31 every Gemma answer drafted under typical acceptance and 30 % (52 of 173) ended at the 32,768-token cap with no answer. Exact keeps the model's output distribution (not bit-identical to MTP off); it gives back some of #1376's decode gain (10-07, one request: 0.957x). GLM-5.3-Flash and Qwen 3.8, which #1973 would also move and which are unmeasured, stay typical. Docs: inference.md (the acceptance paragraph), configuration.md, cli-reference.md, ProviderConfig's comment. Fragment: changelog.d/mtp-exact-acceptance-gemma-qat.md. Tested (CPU only, sandbox without GPU clients, prod identity, after wait-build-slot.sh with MIN_FREE=22): red fce36b0 fails MTPAcceptanceConfigTests with 2 issues (absentKeys and gemmaQATDefaultsToExact, both gemma-4-26b-qat-4bit resolving to typical); here MTPAcceptanceConfigTests 8/8, Bonsai9BMTPPolicyTests 3/3, EngineV2SamplingDefaultsTests 16/16, Bonsai9BRequestPolicyTests 3/3, BenchmarkProductionInputTests 8/8, EngineV2TranslationTests 11/11; changelog.py check (69), docs-impact-check --base ca8697d (7 files), docs-check.sh (211), git diff --check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…other model keeps its rule (red) The Qwen 3.8 counterpart of #1974, for 0.10.12. absentKeys now also expects exact for the catalog EigenLabs/Qwen3.8-27B-4bit-mtp, and qwen38DefaultsToExact pins exact for it and for the same target without its inline head (EigenLabs/Qwen3.8-27B-4bit); typical for the Flash-Next artifact, the Qwen 3.8-derived Bonsai 2 27B, a case variant, Gemma's 8-bit builds, the 35B Qwen builds, Lightning and GLM; exact still for Gemma QAT and Qwen3.5-9B; and that a per-model or global "typical" still wins. gemmaQATDefaultsToExact no longer lists Qwen 3.8 among the typical models. On candidate (c)'s head (#1970, abf82ca; the same MTPAcceptancePolicy and tests as #1974's head) MTPAcceptanceConfigTests fails with 3 issues in 2 of its 9 tests (absentKeys on EigenLabs/Qwen3.8-27B-4bit-mtp, qwen38DefaultsToExact on both Qwen 3.8 ids), each a Qwen 3.8 id resolving to typical; Bonsai9BMTPPolicyTests passes 3/3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gle Mac; every other model keeps its rule The Qwen 3.8 counterpart of #1974 for 0.10.12. MTPAcceptancePolicy.builtInIsExact adds every concrete Qwen 3.8 27B build (ModelRuntimeRequirements.qwen38ConcreteModelIDs: the catalog EigenLabs/Qwen3.8-27B-4bit-mtp and its head-less target EigenLabs/Qwen3.8-27B-4bit) to the Bonsai 9B candidate, Qwen3.5-9B and Gemma QAT. Every other model keeps its built-in rule, and the per-model -> global -> built-in precedence and the unknown-value -> exact rule are unchanged. Scope: the rule is resolved only in EngineV2SlotFactory.makeProductionBundle, so this reaches the single-Mac paths (network serving, Only me / --local, the mid-session MTP upgrade). Qwen 3.8 pairs never read it and were already exact; the benchmark session keeps its own exact default. Why: on a single Mac a lone Qwen 3.8 request drafts (Qwen4ExpMTP speculates for one row; 105 of 443 Mac requests drafted in a half hour of 11-09), and while its GPU pool is down OpenRouter's GPQA runs land on Macs. Typical acceptance keeps drafts the model would rarely have sampled; on Qwen3.5-9B and Gemma QAT that made long answers loop to the output cap. Exact keeps the model's output distribution (exact in distribution, not bit-identical to MTP off). Cost: a lone drafting request decodes at about 0.93x of typical (10-07, B=1), about 1-2 % of Qwen 3.8's decode on Macs overall (review-1973). Docs: inference.md (the acceptance paragraph), configuration.md, cli-reference.md, ProviderConfig's comment. Fragment: changelog.d/mtp-exact-acceptance-qwen38.md. Tested (CPU only, sandbox without GPU clients, prod identity, after wait-build-slot.sh with MIN_FREE=22) on candidate (c) abf82ca + this change: MTPAcceptanceConfigTests 9/9, Bonsai9BMTPPolicyTests 3/3, EngineV2SamplingDefaultsTests 16/16, Bonsai9BRequestPolicyTests 3/3, BenchmarkProductionInputTests 8/8, EngineV2TranslationTests 12/12. Mutants killed by MTPAcceptanceConfigTests: the Qwen 3.8 entry dropped (3 issues), the catalog id only (1: the head-less target), any id containing "Qwen3.8" (1: the Flash-Next artifact). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uilt-in list, plain sentences Text only. MTPAcceptancePolicy.builtInIsExact's comment lists the four exact builds one per line and drops the operational note about the GPU pool (it stays in the PR and the changelog's reasoning); the type comment is rewrapped. inference.md's acceptance paragraph names each exact build with its reason in one sentence each instead of one parenthesis. The changelog fragment drops the pool sentence. Checked: swiftc -parse of the policy and its tests, changelog.py check (70), git diff --check; no non-comment Swift line changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…peed cost by tokens, the evidence Text only (review-1999's must-fix items 1-2 and its doc-comment should-fix). - The speed line weighted by requests (105 of 443 profiled in one half hour). By tokens, lone drafting rows decode about half to 71 % of Qwen 3.8's Mac output, so the fragment now says about 4-5 % slower on single Macs, all of it while a Mac serves one request at a time (a lone request ~0.93x), and unchanged when a Mac serves several. - The fragment no longer says typical made Gemma QAT loop (window 6 found no significant difference). It cites the 9B's controlled 13 of 31 against 0 of 31, and Qwen 3.8's own production records (observational): on the 0.9.17 (exact) -> 0.9.18 (typical) overlap, ~3.6x as many long answers ran to max_tokens on typical; since 11-09 all 229 capped long single-Mac answers had drafted, 0 of 33 that never drafted. - It names every single-Mac path, including the daemon's MTP upgrade. - builtInIsExact's comment drops the dated 11-09 statistic. Checked: swiftc -parse, changelog.py check (70), git diff --check; no non-comment Swift line changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
marked this pull request as ready for review
November 11, 2026 04:38
jonathan308
added a commit
that referenced
this pull request
Nov 11, 2026
…y and typical MTP acceptance NO-GO (2026-11-11): under two or more batched penalty-free 9B rows, live Metal shared events grow about one per decode step until the provider crashes (10-60 min of sustained concurrency). The 9B returns to 0.10.11's behaviour (presence_penalty 1.5, typical acceptance). Reverses #1961's code, tests and docs (76ea981, 194be63, ca8697d) against the candidate: EngineV2SamplingDefaults drops qwen35NineBCardDefaults; MTPAcceptancePolicy.builtInIsExact drops the 9B (Bonsai 9B, Gemma QAT and Qwen 3.8 stay exact); the tests expect typical for the 9B; the docs (inference.md's defaults table, prefix-cache.md, cli-reference, configuration, ProviderConfig) name the 9B with the 35B builds. Its changelog fragment is removed, and #1965's fragment says the penalty is still these builds' default. #1965 (prompt-history checkpoints for rows that cannot speculate), #1974 and #1999 stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 11, 2026
…ct again The revert (17627f1) also undid #1961's call-site change in MTPAcceptancePolicy.resolve, so the built-in rule read only Bonsai 9B again and Gemma 4 QAT (#1974) and Qwen 3.8 (#1999) lost their exact default (MTPAcceptanceConfigTests: 6 issues in CI run 43098442611). resolve calls builtInIsExact again; the 9B stays typical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 12, 2026
This branch was successfully deployed
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.
Summary
For 0.10.12 candidate (c) (#1970). Stacked on #1974 (already folded into (c)). The diff against #1974 is the last four commits. Approved in an independent review (
review-1999.md); the fold waits on the 45-minute GPU smoke. The Qwen 3.8 counterpart of #1974: exact MTP acceptance for Qwen 3.8 27B only, on a single Mac. The broad #1973 (exact for every model) stays held for 0.10.13.MTPAcceptancePolicy.builtInIsExactadds every concrete Qwen 3.8 27B build (ModelRuntimeRequirements.qwen38ConcreteModelIDs: the catalogEigenLabs/Qwen3.8-27B-4bit-mtpand its head-less targetEigenLabs/Qwen3.8-27B-4bit) to the Bonsai 9B candidate,Qwen3.5-9B(#1961) andgemma-4-26b-qat-4bit(#1974).mtp_acceptance_by_modelwith"EigenLabs/Qwen3.8-27B-4bit-mtp" = "typical"restores the old rule./v1/models/catalog?include_aliases=1: the only alias isgemma-4-26b). The Flash-Next artifact (qwen3.8-flash-next,DarkBloom/Qwen3.8-Flash-Next-Q4-mtp) and the Qwen 3.8-derived Bonsai 2 27B are other models and stay typical.Paths. The rule is resolved only in
EngineV2SlotFactory.makeProductionBundle, so this reaches every single-Mac path:ProviderLoop+EngineV2.swift:789, throughmakeEngineV2BundleForSlot), its MTP upgrade (ProviderLoop+MTPUpgrade.swift:167) and its liveness rebuild (ProviderLoop+EngineV2Liveness.swift:262,:310);--local(StandaloneServer.swift:1303) and its MTP upgrade (StandaloneServer+MTPUpgrade.swift:166).Each passes the operator's keys. The cluster runtime never consults
MTPAcceptancePolicy; the benchmark session keeps its ownexactdefault.Why Qwen 3.8
Qwen4ExpMTP.maximumSpeculativeBatchis 1). Lone drafting rows decode about half to 71 % of Qwen 3.8's Mac output (11-09/10).review-1999.md§4):max_tokensabout 3.6× as often (Mantel-Haenszel over 12-hour windows and chips). The version step also carries an SDK change, so this is not proof.Validation
CPU only (sandbox without GPU clients), prod identity, after
wait-build-slot.shwithMIN_FREE=22. Run on candidate (c)'s head (abf82ca9ce, the same policy and tests as #1974's head), with this PR's commits applied:7441d6dae2(tests only) on (c)MTPAcceptanceConfigTestsfails with 3 issues in 2 of 9 tests:absentKeys(the catalog id) andqwen38DefaultsToExact(both ids), each a Qwen 3.8 id resolving to typical.Bonsai9BMTPPolicyTests3/382322d55f2on (c)MTPAcceptanceConfigTests9/9,Bonsai9BMTPPolicyTests3/3,EngineV2SamplingDefaultsTests16/16,Bonsai9BRequestPolicyTests3/3,BenchmarkProductionInputTests8/8,EngineV2TranslationTests12/129963cbee7dmerged withcfcd9c5903(tree9f35fbbcb5)"Qwen3.8"(1: the Flash-Next artifact); a case-insensitive match (1: the lower-case variant)cfcd9c5903swiftc -parse,changelog.py check(70),docs-impact-check --base f859266760(7 files) and--base dev(12),git diff --check0d5dfdeeb9swiftc -parse,changelog.py check(70),git diff --checkreview-1999.md)93752d4c28+ this PR: build rc 0 and 7 suites pass (52 tests); its mutants: the brief's (killed) and "settings checked after the built-in rule" (killed)What the tests pin (
qwen38DefaultsToExact,absentKeys):EigenLabs/Qwen3.8-27B-4bit-mtpandEigenLabs/Qwen3.8-27B-4bit;qwen3.8-flash-next,DarkBloom/Qwen3.8-Flash-Next-Q4-mtp,ternary-bonsai-2-27b, a lower-case variant of the catalog id,gemma-4-26b,gemma-4-26b-8bit,qwen3.5-35b-a3b,qwen3.6-35b-a3b-vl-mtp-mxfp8,nvidia-nemotron-3.5-lightningandglm-5.3-flash;Qwen3.5-9B;typicalstill wins for Qwen 3.8.Not run here: the Metal suites (CI) and a GPU smoke. A 45-minute smoke on the dev M5 Ultra pair's Mac A (exact against typical on long Qwen 3.8 answers, the decode ratio, the acceptance rate) is planned for 07:00–08:00Z, and gates the fold.
Folding
0d5dfdeeb9onto (c) Release preparation: provider 0.10.12 into dev #197093752d4c28(current head at 04:15Z, after fix(cli, provider): 0.10.12 — status says what stopped each early-ended request, and counts only real early ends #1980):git merge-treeclean. Earlier heads9963cbee7dandabf82ca9ce: clean. Ontodev420a5123c4: clean. Re-runmerge-treeat fold time and name that head in the merge message.Contracts and documentation
inference.md(the acceptance paragraph),configuration.md,cli-reference.md,ProviderConfig.mtpAcceptance's comment.changelog.d/mtp-exact-acceptance-qwen38.md.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.