Repository navigation
Fix two-Mac batching, admission, and numerical qualification - #1567
Closed
jonathan308 wants to merge 4 commits into
Closed
jonathan308 wants to merge 4 commits into
jonathan308 wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 23, 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.
This draft carries the provider and native-runtime changes exercised by local two-Mac candidate c05. Concurrent requests previously encountered mismatched installed lane counts, serial execution, joining/cancellation failures, or row-dependent numerical changes. The candidate binds effective lane counts and arithmetic to both workers, supports isolated native lanes, and can drain a live local session into a conservatively priced batch-capable plan while preserving the HTTP listener and queued response ownership.
The changes include encrypted batch record scopes; per-lane sampling, joining and cancellation; bounded credit coalescing; paged-state adapters and native batch owners; Qwen MoE tensor-plan support with failed-shape guards; request-scope and batch memory quotes; transactional automatic setup adoption/rollback; native completion/memory observations; and exact-artifact qualification fixes. The accompanying SDK drafts supply the model arithmetic/cache seams. Source changes also preserve measured shard rates rather than clamping them to a faster inferred value.
Before
After
Validation completed for this source snapshot:
The first c05 Qwen27 automatic endpoint run preserves one live API process, changes its setup, and observes native width four on both hosts; dedicated cancellation, context checks and cleanup pass. Its endpoint suite fails byte comparisons spanning the old and new plans. That failure remains recorded. A later same-plan steady-repeat harness is separate from the c05 source snapshot and cannot convert that run into a full pass.
This remains a draft. No model is marked fully qualified by this PR. Gemma cross-chip prefill arithmetic, complete MiMo mode/paging validation, final automatic steady-state equality, per-family memory lifecycle evidence and useful throughput remain open. GLM 5.3 Flash and Flint are excluded from this validation. Coalescing has demonstrated wider execution, not a controlled absolute speed improvement. The Bonsai FP32 correction has a measured large-prefill cost that still needs full-model timing.
Independent source and behavior-preserving refactor reviews found no remaining issue in the frozen constituent patches after the reported fixes. Full integration/hardware gates remain separate. This draft does not publish or activate a release.
Base dependency: two-Mac foundation PR #1407. This is a new draft on that foundation branch. It pins companion SDK commits
6d432b0960d8636d43db0aea68747d09cab3e236andb1f007a552f0d8310536274bd22c20f7c865a480; the companion drafts are MLX-Swift-LM #343 and MLX-Swift #61.Fresh c05 GPT-OSS evidence: 8 short and 12 long numerical cases pass; native paged concurrency waves 1/2/4/8 match solo exactly. Both installed endpoint reports pass 36 checks with zero failures and two explicit skips, and cancellation/context pass. The complete automatic session fails: it remains at one lane with no setup transition; the stable multi-lane gate and automatic lifecycle gate fail. Endpoint success is not evidence of automatic batching.
Repository validation entry points:
The build and focused checks were executed using isolated pinned scratch closures; these are the repository entry points for rerunning them. The publication commit contains one documented EOF-whitespace normalization in
GPTOSSBatchSettings.swift; c05 was built before that whitespace-only edit.candidate-c05/recursive-source.jsond3844e0c974973e2b0df3a2cc2c38ebcf740c98036307de0b19616729a0cfef1c05-focused-cpu-integration-receipt.jsonba4129f01f872e79393e00928b1f96a4116bb8bf74ecbf16c73d1779c02429f1c05-final-doc-checks.jsone296140397072ac73683fe55416e6517364001175ef9a2a6087108831afff0aaproduct/gptoss-c05-automatic-01/session.jsonaa6fcb118b9b6fd40f5cdf3f307ce7b12b6906ddcaafbc4bea72ccea2a3b285cQwen 3.6 tensor parallel retains a negative 16K M3-leader record (7/5 ULP versus the unchanged threshold4); the failed orientation is withheld. GPT-OSS native concurrency8 reached observed native width6, not8. GPT-OSS full-artifact logs currently establish paged backend selection and teardown but do not expose per-request page-growth counters. GLM-specific and Flint code paths were not exercised; shared changes do not imply their compatibility has been requalified.
Publication follow-up: the SDK sources were formatted with their required Swift formatter, and the SDK fork ownership inventory was completed. The root now pins those signed follow-ups. Hardware c05 evidence was collected before these formatting and metadata changes; fresh CI for the published pins is a separate check.
Current acceptance scope: tensor parallel is required for every included non-GLM/non-Flint model, retaining every capability supported by the exact artifact and standalone serving path. Pipeline results are partial evidence and cannot replace a tensor-parallel pass. Phase-split tests are excluded. Existing text and unsupported-input refusal tests do not establish vision, audio or other capability retention; those gates remain open.
CI follow-up fixes real standalone/cluster HTTP differences: both paths now normalize the same supported request forms, forward explicit
min_p, and use request-owned reasoning/logprob decorations. Updated contract tests follow the existing bundled qualification records and current thinking-off policy; no excluded-model runtime is changed. The unchanged baseline reproduced all seven family parity failures. The repaired 875-source ProviderCore closure passes 20 focused test definitions across three suites, including all seven family parameterizations, followed by 20 consecutive successful repeats. Independent review verified the exact 11-file patch (72071a708eb9034876a5b3e22e786743d1350f3d750ee4f9bd73f77c05341cda) and the two separate stale-test corrections. Docs-impact, docs lint and changelog checks pass.The HTTP capture fixtures use fabricated capable engines. Native logprob support is not established. Multi-token SSE retains an unresolved per-content-frame association issue: ordered values are complete in the focused test, but asynchronous draining may attach them to an earlier content frame. The earlier strict failure is retained; no comparator field or tolerance was weakened. New remote CI for the published follow-up remains a separate gate.
Need help on this PR? Tag
@codesmith-botwith what you need.