Repository navigation
Qwen4-35B-A3B: native serving, qualification, kernels, and MTP baseline (replay qwen4-a3b/integration + mtp-mirror-fix) - #584
Merged
Conversation
Replays Jonathan Spengler's qwen4-a3b/integration branch (30d88d0, 193 commits, 125 files) onto main (5d4d485, Muse Glimmer #579), reconciling all overlapping ContinuousBatchingV2 seams: - SchedulerV2.swift & EngineV2.swift: preserve both Muse Glimmer prefillChunkAlignment and Qwen4 prefillPartitionIgnoresCompany / disarmsSoloStripe (DARKBLOOM_QWEN4_COMPANY_INVARIANT_PREFILL), with prefillChunkAlignment retaining precedence when set. - RecurrentStateV2.swift: retain both requiresPagedKV / prefillChunkAlignment and prefillPartitionIgnoresCompany. - EngineLoopV2+MTPExecution.swift & MTPContractsV2.swift & CBv2MTPRoundDriver.swift: combine DFlash advisory-history / exact-acceptance / decode-row verify hooks with Qwen4 MTP cohort, context-copy, cost-refresh, and chained-probe hooks. - PagedLayerCache.swift: preserve attendColumnsAsDecodeRows alongside PrefillMirror.generation, sharedRowWriteAndGather, PagedCausalVectorVerify, and qwen4RefuseWindow. - ToolCallFormat.swift & fork.yaml: preserve both Muse Glimmer and Qwen4 entries. Provenance: replays origin/qwen4-a3b/integration (30d88d0); original qwen4-a3b/* branches remain untouched. Co-Authored-By: Jonathan Spengler <5055076+jonathan308@users.noreply.github.com>
Replays Jonathan Spengler's qwen4-a3b/mtp-mirror-fix (5c30603) as defense-in-depth alongside d15a417's mutationGeneration guard: - PagedLayerCache.swift: dropPrefillMirrors() on one-token decode writes and qwen4UpdateAndGatherSelectedKV writes; guard mirroredPrefillKV with !mtpSerializesRectangularAttention so an MTP verify window never reads or retains the prompt mirror. - Qwen4PrefillMirrorTests.swift: retain both testMirrorIsRebuiltAfterRollbackAndPageOnlyWrites (d15a417) and testMirrorIsDroppedPastThePromptAndNeverServesAVerifyWindow (5c30603). Provenance: replays origin/qwen4-a3b/mtp-mirror-fix (5c30603); original branch remains untouched. Co-Authored-By: Jonathan Spengler <5055076+jonathan308@users.noreply.github.com>
…ormat - fork.yaml: add the 10 uncovered Qwen4 / Responses / async-canary files to their respective sections so scripts/check_forkdiff.py reports 2417/2417 described files. - Apply Xcode 27.2 swift-format (6.4.4, .swift-format) across all changed Swift files so the pull_request.yml Lint check is green.
…p test PagedKVBackend supports headDim in [64, 128, 256, 512]; the replayed testMirrorIsDroppedPastThePromptAndNeverServesAVerifyWindow from qwen4-a3b/mtp-mirror-fix (5c30603) specified headDim 8, which threw backendIneligible on M5 Max. Match testMirrorIsRebuiltAfterRollbackAndPageOnlyWrites with headDim 64.
4 of 5 tasks
…ication callbacks - Qwen4DecodeMoEGDNTests: add XCTSkipUnless(ResidualRMSNorm.verifiedFamilies.contains(...)) to the 7 fused GDN/conv tests that require verified GPU families ([15, 17], matching the 3 existing tests) so M4 (family 16) CI runners skip cleanly instead of failing. - MuseGlimmerDFlashCheckpointTests: call finishPublicationCallbacks(engine:) before asserting engine.admissionForTesting.bytesReserved == 0 (matching all other CompleteCheckpointFixtureStore tests) so closed export manifest host-metadata permits held on the fixture/capture publication queues are deterministically drained first.
GumbiiDigital
marked this pull request as ready for review
December 6, 2026 02:48
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Draft. Qwen4-35B-A3B (
qwen4_moe/qwen4_moe_text) native serving, qualification, bit-exact Metal kernels, and MTP cohort baseline on branchfeat/qwen4-35b-a3b-integration, SSH-signed head commite301e1a3a2c57f046aebd12f7f426da97a27e4a2, based onmain(5d4d485d7afa23a45bc546596e3d9e25764a0513, Muse Glimmer#579), 4 SSH-signed commits (125 files changed, +22,710 / -1,995). Replays and consolidates Jonathan Spengler's (jonathan308)qwen4-a3b/integration(30d88d0739, 193 commits) andqwen4-a3b/mtp-mirror-fix(5c3060308e,dropPrefillMirrors()+ regression test) onto currentmain— referenced for provenance only (no closing keywords); Jonathan's originalqwen4-a3b/*branches andLayr-Labs/d-inference#2911remain completely untouched.Summary
Proposed changes
Consolidates the complete Qwen4-35B-A3B (
qwen4_moe/qwen4_moe_text) SDK baseline onto currentmain(5d4d485d) as Draft PR #1 (withqwen4-a3b/batchstaged to follow in stacked Draft PR #2):955aa618— Replayqwen4-a3b/integration(30d88d0739) ontomain(5d4d485d):qwen4_moeandqwen4_moe_textinLLMModelFactoryandVLMModelFactoryon the native Qwen4 stack (Qwen4Exp), preserving A3B geometry (40 layers, hidden 2048, 256 routed experts top-8, GQA-8 QSA + Gated DeltaNet hybrid, hyper-connections rank 256 / K 8192, 12.8 GB n-gram PLE table, 1-layer embedded MTP, 27-blockqwen4_moe_visiontower).Qwen4ExpPLEResidencyMode(.memorydefault forqwen4_moe*,.ssdpreserved forqwen4_exp*),Qwen4ExpPLEShardGathersingle-launch GPU gather across shards (DARKBLOOM_QWEN4_PLE_GPU_GATHER, bit-identical to SSD), andMADV_RANDOM/MADV_WILLNEED(DARKBLOOM_QWEN4_PLE_MADVISE).text.format:Qwen4ChatEncoder/Qwen4ChatJSON(678 golden text/segment vectors),Qwen4ExpReservedTokenMask(masks248077–248319to logits dtype lowest finite value in target & MTP draft heads),Qwen4ExpProcessorvideo caps &imageVisualTokens, andOpenAIResponsesProtocoltext.format.Qwen4ExpHCFused,Qwen4ExpHCHybrid,Qwen4ExpHCPrefillNax), GDN decode/verify/prefill (Qwen4ExpGDNDecodeFusions,Qwen4ExpGDNBlocked,Qwen35), MoE/router/QMV (Qwen4ExpMoEDecodeFusions,Qwen4ExpDecodeRouting,Qwen4ExpAffineQMV,Qwen4ExpGatherQMM), QSA GQA-8 & RMSNorm (Qwen4ExpRMSNormKernel,Qwen4ExpQSAMetal,Qwen4ExpQSASteel,Qwen4ExpBatchedQSA,Qwen4ExpPrefillMirror,PagedCausalVectorVerify), 400-op decode command-buffer splitting (Qwen4ExpDecodeCommandBuffers), and release-gated inexact opt-ins (Qwen4ExpInexactOptIn).Qwen4ExpMTPContextCopy), tiered draft vocab prefix capped at last tier, cold cost refresh, chained cohort plain-step probes, shared row K/V transfers (sharedRowWriteAndGather), and company-invariant prefill (prefillPartitionIgnoresCompany).#579conflict reconciliation: Reconciles all 9 overlapping files withmain(SchedulerV2.swift,EngineV2.swift,EngineLoopV2+MTPExecution.swift,MTPContractsV2.swift,RecurrentStateV2.swift,CBv2MTPRoundDriver.swift,PagedLayerCache.swift,ToolCallFormat.swift,fork.yaml), preserving both Muse Glimmer'sprefillChunkAlignment/ DFlash advisory history /attendColumnsAsDecodeRowsand Qwen4'sprefillPartitionIgnoresCompany/ MTP cohort / mirror / shared-transfer paths.737fc91a— Reconcileqwen4-a3b/mtp-mirror-fix(5c3060308e): AddsdropPrefillMirrors()on one-token decode writes andqwen4UpdateAndGatherSelectedKVwrites, plus!mtpSerializesRectangularAttentioninmirroredPrefillKVand regression testtestMirrorIsDroppedPastThePromptAndNeverServesAVerifyWindowalongsided15a417a'smutationGenerationguard as defense-in-depth.cc33cf62— Fork hygiene: Adds the 10 uncovered Qwen4 / Responses / async-canary files tofork.yaml(2417/2417described files passingscripts/check_forkdiff.py) and applies Xcode 27.2swift format(6.4.4,.swift-format) to all changed Swift files.e301e1a3— Mirror test fix: Uses supportedheadDim: 64(instead of8, whichPagedKVBackendrejects withbackendIneligible) intestMirrorIsDroppedPastThePromptAndNeverServesAVerifyWindow, matchingtestMirrorIsRebuiltAfterRollbackAndPageOnlyWrites.Omitted / dropped items
qwen4-a3b/batch(20d7fe60, 15 multirow commits)qwen4-a3b/testaudit(f7852994, 3 commits)git diff origin/qwen4-a3b/integration origin/qwen4-a3b/testauditis empty across all 3 files (XCTestAwaitRecordingCanaryTests.swift,docs/async-xctest-recording.md,changelog.d/async-xctest-recording-canary.md) — already fully present inqwen4-a3b/integration.qwen4-a3b/prefill-on-integ(6a0ac256)prefill(d1df6449).qwen4-a3b/*branchesPlaceholders / pending rollout items
qwen4-a3b/batch,20d7fe60)Layr-Labs/mlx-swift-lmon top of this PR.d-inferencesubmodule pin bump (libs/mlx-swift-lm)Layr-Labs/d-inferencePhase 3 Provider PR once this PR lands onmain.2026-12-04-r2, 35.24 GBoQ4e-mtp)swift-transformers1.4.0 upgrade (672/672 token ID parity vs 568/672 on 1.3.3)Qwen4ChatEncoder/docs/qwen4-kill-switches.md.Blast Radius / What This Could Affect
Shared seams touched
Libraries/MLXLMCommon/ContinuousBatchingV2/SchedulerV2.swiftdisarmsSoloStripe; updatedsoloStripeguard andprefillChunkCap(for:)alongsideprefillChunkAlignmentdisarmsSoloStripe = false;prefillChunkAlignmentchecked first and suppressesfixedPrefillChunkGrid/disarmsSoloStripewhen setLibraries/MLXLMCommon/ContinuousBatchingV2/EngineV2.swiftfixedPrefillChunkGrid+disarmsSoloStripewhenprefillPartitionIgnoresCompanyis truemodelCapabilities.prefillChunkAlignment == nil && modelCapabilities.prefillPartitionIgnoresCompany && !modelCapabilities.requiresFixedPrefillChunkGrid(falsefor all non-Qwen4 models)Libraries/MLXLMCommon/ContinuousBatchingV2/RecurrentStateV2.swiftCBv2ModelCapabilities.prefillPartitionIgnoresCompany = falsefalse; preservesrequiresPagedKVandprefillChunkAlignmentLibraries/MLXLMCommon/ContinuousBatchingV2/MTP/MTPContractsV2.swiftrefreshesColdCostEstimates,fullAcceptanceOptimismLimit,pricesCohortPlainStepsAsChained,observeCommittedHostTokens,copiedDraftCount,roundUsesCopiedDraftsfalse/nil/0/ no-op implementations; preserves DFlashbatchesVerifyColumnsAsDecodeRowsandrequiresExactAcceptanceLibraries/MLXLMCommon/ContinuousBatchingV2/MTP/EngineLoopV2+MTPExecution.swift&CBv2MTPRoundDriver.swiftstartingAt:advisory historyfalse/0);DARKBLOOM_CBV2_MTP_CHAINED_PROBE=0disables probesLibraries/MLXLMCommon/ContinuousBatchingV2/Paged/PagedLayerCache.swiftPrefillMirror.generation,dropPrefillMirrors()on 1-token / selected-KV writes,!mtpSerializesRectangularAttentionmirror guard,sharedRowWriteAndGather,PagedCausalVectorVerify,qwen4RefuseWindowattendColumnsAsDecodeRows; shared transfers gated byDARKBLOOM_CBV2_PAGED_SHARED_ROW_TRANSFERS=0; causal verify gated bykind.qwen4IndexerCompressRatio != nil; mirror gated byDARKBLOOM_PAGED_PREFILL_MIRROR=0/DARKBLOOM_QWEN4_PREFILL_MIRROR=0Libraries/MLXLMCommon/Tool/ToolCallFormat.swiftqwen4_moeandqwen4_moe_textto.qwen35type == "qwen4_moe" || type == "qwen4_moe_text"; preservesmuse_glimmer -> .atemand all sibling typesLibraries/MLXLLM/Models/Qwen35.swift&GatedDeltaConvolution.swiftnoGradfrozen checkDARKBLOOM_QWEN_GDN_FROZEN_TREE_WALKand Qwen4 kill switchesLibraries/MLXLLM/LLMModelFactory.swift&Libraries/MLXVLM/VLMModelFactory.swiftqwen4_moeandqwen4_moe_textLibraries/MLXLMServer/Protocol/OpenAIResponsesProtocol.swifttext.formathandlingDARKBLOOM_RESPONSES_TEXT_FORMATNon-interference guarantees
qwen4_exp/qwen4_exp_text): Keeps.ssdPLE default, max MTP draft depth 4, and byte-identical QSA/GQA-12 kernel sources (explicitly asserted byQwen4ExpSparseGQATests.flashNextKernelSourcesAreUnchangedand 204 Flash-Next tests passed on M5 Max).muse_glimmer): KeepsprefillChunkAlignmentprecedence overfixedPrefillChunkGrid/disarmsSoloStripe, DFlash advisory history (startingAt:),requiresExactAcceptance,attendColumnsAsDecodeRows, and Onyx/ATEM parsing (explicitly verified byCBv2PrefillChunkGridTests+ 9 Muse Glimmer suites passing 67/67 on M5 Max).GatedDeltaFusedInputProjectionTestsandCBv2QwenMTPIntegrationTests.CBv2ModelCapabilitiesandCBv2MTPDraftermembers default off/no-op;CBv2LayerSubmission*andGemmaHistoricalPrefillGridTestsverified passing on M5 Max).Rollback / fail-closed profile
docs/qwen4-kill-switches.md(includingDARKBLOOM_QWEN4_PLE_RESIDENCY=ssd,DARKBLOOM_QWEN4_PLE_GPU_GATHER=0,DARKBLOOM_QWEN4_RESERVED_TOKEN_MASK=0,DARKBLOOM_QWEN4_COMPANY_INVARIANT_PREFILL=0,DARKBLOOM_QWEN4_PREFILL_MIRROR=0,DARKBLOOM_CBV2_PAGED_SHARED_ROW_TRANSFERS=0).Qwen4ExpQSANax,Qwen4ExpQSAIndexerNax,DARKBLOOM_QWEN4_GDN_PIPELINED) fail closed in release builds viaQwen4ExpInexactOptInunless compiled with-DDARKBLOOM_QWEN4_ALLOW_INEXACT.qwen4_moe/qwen4_moe_textregistration and restoresmain(5d4d485d) with zero persisted format or checkpoint schema changes for sibling models.Before and After
flowchart LR subgraph Before["Before (main @ 5d4d485d)"] B1["qwen4_moe / qwen4_moe_text"] --> B2["Unregistered in LLM/VLM factories"] B3["SchedulerV2 / EngineV2"] --> B4["prefillChunkAlignment (Muse Glimmer)<br/>+ fixedPrefillChunkGrid"] B5["PagedLayerCache mirror"] --> B6["Only mutationGeneration check<br/>(no explicit drop on 1-tok / selected-KV)"] end subgraph After["After (feat/qwen4-35b-a3b-integration @ e301e1a3)"] A1["qwen4_moe / qwen4_moe_text"] --> A2["Native Qwen4Exp stack<br/>(.memory PLE + GPU gather, Qwen4ChatEncoder,<br/>reserved-token mask, GQA-8/MoE/GDN/HC kernels,<br/>MTP cohorts + context-copy)"] A3["SchedulerV2 / EngineV2"] --> A4["prefillChunkAlignment takes precedence;<br/>otherwise prefillPartitionIgnoresCompany<br/>arms fixed grid + disarmsSoloStripe"] A5["PagedLayerCache mirror"] --> A6["Defense-in-depth: mutationGeneration<br/>+ dropPrefillMirrors() on 1-tok/selected-KV<br/>+ !mtpSerializesRectangularAttention guard"] endBefore any rollout
qwen4-a3b/batch) ontoLayr-Labs/mlx-swift-lmmainsoLayr-Labs/d-inferenceCI can check out an immutablemainsubmodule SHA.v2/qwen4-35b-a3b--97362e7471de/2026-12-04-r2(EigenLabs/Qwen4-35B-A3B-MLX-4bit-mtp,oQ4e-mtp, 35.24 GB) on 64 GB+ (resident PLE) and 48 GB (SSD offload) Macs across M4 Max and M5 Max/Ultra, including:iogpu.wired_limit_mb = 0XNU wired-limit residency check;T=0parity across plain decode, MTP decode, resident PLE, and SSD PLE;qwen4_exp), Qwen 3.5/3.6, Muse Glimmer 30B, Gemma 4, and Inkling 2 Mini smoke non-regression.Validation
Executed on local Apple M5 Max (128 GB RAM, macOS 27.2.1
26B131, Xcode 27.227B52, Swift 6.4.2, Metal 400,MLX_ENABLE_TF32=0,DARKBLOOM_EXCLUSIVE_NATIVE_GPU_TEST=1) and local repo hygiene checks onM4 MAX 1:CC=$(xcrun -f clang) swift build --build-system native --build-tests --disable-index-store -debug-info-format nonescripts/build-metallib.sh ~/qwen4-a3b-m5-verify/mlx.metallib19,433symbols,223,603,840bytes)swift test list --build-system native --skip-build > /tmp/qwen4-tests-list.txt && python3 .github/scripts/test_shards.py check --list /tmp/qwen4-tests-list.txt8,745tests listed; each in exactly 1 main run)fork.yamlvalidationpython scripts/check_forkdiff.py --upstream-ref refs/remotes/upstream/main2417/2417described files, 0 uncovered)scripts/check-unit-test-files.sh && python3 .github/scripts/test_shards_test.py43/43shard tests OK, 0 unit layout issues)pull_request.ymlLint)git diff -z --name-only --diff-filter=ACMR origin/main...HEAD -- '*.swift' | xargs -0 swift format format --in-place --configuration .swift-format && git diff --exit-codeswift format 6.4.4, 0 diffs)Qwen4PrefillMirrorTests(mtp-mirror-fix+d15a417a)MLX_ENABLE_TF32=0 DARKBLOOM_EXCLUSIVE_NATIVE_GPU_TEST=1 swift test --build-system native --skip-build --no-parallel --filter "Qwen4PrefillMirrorTests"swift test --build-system native --skip-build --no-parallel --filter "^(MLXLMTests\.(Qwen4ChatEncoderTests|Qwen4ExpReservedTokenMaskTests|Qwen4FactoryResidencyTests|Qwen4ExpMTPContextCopyTests|Qwen4MultirowEngineTests|Qwen4HyperConnectionDeferredTests|Qwen4DecodeMoEGDNTests|PagedCausalVectorVerifyTests|CBv2PagedSharedRowTransfersTests|CBv2MTPDepthControllerTests|CBv2QwenMTPIntegrationTests)|MLXLMServerTests\.OpenAIResponsesTextFormatTests)"swift test --build-system native --skip-build --no-parallel --filter "Qwen4ExpExpertParityTests|Qwen4ExpHCFusedTests|Qwen4ExpHCHybridTests|Qwen4ExpHyperConnectionFusionTests|Qwen4ExpMultirowTests|Qwen4ExpPLEResidentGatherTests|Qwen4ExpSparseGQATests|Qwen4DecodeCommandBufferTests|Qwen4ExpAffineQMVTests|Qwen4ExpVideoCapsTests|CBv2CompanyInvariantPrefillTests"qwen4_exp) & GDN non-regressionswift test --build-system native --skip-build --no-parallel --filter "^(MLXLMTests\.(Qwen4ExpLightningMTPTests|...|GatedDeltaFusedInputProjectionTests)|MLXLMServerTests\.Qwen4)"prefillChunkAlignment& CBv2/DFlash/Multimodal regressionswift test --build-system native --skip-build --no-parallel --filter "^MLXLMTests\.(CBv2PrefillChunkGridTests|MuseGlimmerCBv2Tests|MuseGlimmerDFlashEngineTests|MuseGlimmerDFlashExactVerifyTests|MuseGlimmerDFlashCheckpointTests|MuseGlimmerExactWindowTests|MuseGlimmerRowExactWarmupTests|MuseGlimmerTextModelTests|MuseGlimmerImageEngineTests|MuseGlimmerVideoTests)"testAlignmentSuppressesFixedGridAndFinishingPromptLane; 58/58 Swift Testing passed across 9 suites; 0 failed)swift test --build-system native --skip-build --no-parallel --filter "^MLXLMTests\.(CBv2LayerSubmissionTests|CBv2LayerSubmissionDecodeOnlyTests|GemmaHistoricalPrefillGridTests|ToolCallFormatTests)"Skipped / Ignored
Qwen4ChatEncoderTests.testGoldenTokenIDs(1 test): skipped becauseQWEN4_TOKENIZER_DIR(external Qwen4 compat tokenizer directory) was not set in the local test environment.Qwen4ExpPLEDeferredTests(4 tests): 3 skipped becauseDARKBLOOM_QWEN4_REAL_MODEL(real Flash-Next Q4 checkpoint) was not set; 1 (testFirstNativeIndexerProofResolvesDeferredPLEInput) requires a dedicated single-test process.Qwen4ReleasePolicyTests.testReleaseIgnoresKnownNonExactDiagnosticOverrides(1 test): release-only policy gate (#if DEBUGskips under debug test build; requires-c release).Qwen4VideoBriefFrameTests.testNativeSamplerRetainsBriefBlueFrameNine(1 test): skipped because external synthetic qualification clip path was not set.CBv2LayerSubmissionDecodeOnlyTests.environmentSelectsDecodeOnly(1 test): env-only isolated process test.fork-tests.yml) andCodeQL: not run locally — triggered automatically on this Draft PR.Not proven
2026-12-04-r2) inference, throughput, or wired-memory behavior: All local M5 Max tests use tiny synthetic models and golden fixtures; live 35.24 GBoQ4e-mtpcold-load, resident vs SSD PLE parity, M5 >= 1024-chunk prefill, M4 Max 128 GB XNU wired-limit checks, and multi-request concurrency benchmarks are deferred to Phase 4 hardware qualification.Qwen4ReleasePolicyTests/Qwen4ExpInexactOptIn: Verified in source and debug tests only; release-mode test invocation was not executed locally.Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changesChanged Swift files were formatted directly with Xcode 27.2's
swift format format --in-place --configuration .swift-format(version6.4.4), matching.github/workflows/pull_request.yml;pre-commit run --all-fileswas not run.AI usage
accurately describes the code changes.
jonathan308)qwen4-a3b/integrationandqwen4-a3b/mtp-mirror-fixbranches ontomainusing an AI coding agent to resolve conflicts against Muse Glimmer#579, updatefork.yaml, applyswift-format, fix theheadDim: 8->64bug in the replayed mirror-drop test, run M5 Max verification suites, and draft this PR description. The box above is left unchecked for the human reviewer/submitter to confirm.Reviewer Notes
Highest-signal files to inspect first:
Libraries/MLXLMCommon/ContinuousBatchingV2/SchedulerV2.swift&EngineV2.swift— Muse GlimmerprefillChunkAlignmentvs Qwen4prefillPartitionIgnoresCompany/disarmsSoloStripeconflict resolution (prefillChunkAlignmenttakes precedence when set).Libraries/MLXLMCommon/ContinuousBatchingV2/Paged/PagedLayerCache.swift&Tests/MLXLMTests/Qwen4PrefillMirrorTests.swift— Defense-in-depth reconciliation ofd15a417a(mutationGeneration) and5c306030(dropPrefillMirrors()+!mtpSerializesRectangularAttention+headDim: 64test fix ine301e1a3), alongside Muse Glimmer'sattendColumnsAsDecodeRows.Libraries/MLXLMCommon/ContinuousBatchingV2/MTP/EngineLoopV2+MTPExecution.swift,MTPContractsV2.swift, &CBv2MTPRoundDriver.swift— Reconciliation of DFlash advisory-history / exact-acceptance hooks with Qwen4 MTP cohort / context-copy / cost-refresh / chained-probe hooks.Libraries/MLXLMCommon/ContinuousBatchingV2/RecurrentStateV2.swift&fork.yaml— Additive capability fields and 10 newly describedfork.yamlentries.