Skip to content

cluster: tensor parallel for fastest-plan families only on measured evidence and full feature parity (owner decision) - #1715

Merged
davidtai merged 18 commits into
devfrom
feat/fastest-plan-evidence
Nov 3, 2026
Merged

davidtai merged 18 commits into
devfrom
feat/fastest-plan-evidence

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Owner decision, accepted by merging. It changes when Gemma 4 and MiMo pairs choose tensor parallel; Qwen and GLM
are untouched. It follows the owner's 2026-11-01 directive (a pair must be at least 2x one Mac like for like, with no
compromise): TP is never chosen on an optimistic estimate alone. Close it to keep #1706/#1707's behavior; nothing else
depends on it.

Summary

#1706/#1707's choice: .fastest picks tensor parallel (TP) whenever its estimate beats the best other mode by 5%. With
no share probe, that estimate takes each rank's weight time from the device index (ClusterHardwarePrior.weightSeconds).
The index times each operation with its launch latency inside, so it over-credits a rank's half 2.7–4x against the plans.

Once a load measures the link, the prior flips big pairs to TP for decode-heavy requests:

  • Gemma on 2 × M5 Ultra: predicted 6% faster. gemma-tp-plan.md expects decode 6–8% slower.
  • MiMo on 2 × M5 Ultra and 2 × M5 Max: predicted 9–17% faster for a fresh pair. mimo-tp-plan.md puts it at about a
    tie, and as much as 22% slower.

This PR makes a .fastest family choose TP only on evidence: every rank must have a measured share step. That is a
share probe of this model (ClusterShareProbeHistory), or the shard rates that this build's served TP records corrected
(ClusterServedCalibration).

On the prior alone, the plan keeps the best non-TP mode. It reports the prediction under a new verdict,
predictedFasterOnPriorOnly, with its own plan line and model-list note:

Pipeline: tensor parallel is predicted 13% faster for requests of 128 prompt and 128 answer tokens (1.57 s against
1.78 s; decode 85.7 vs 76.8 tok/s, first token 0.09 s vs 0.13 s), but from the device index, not its own measured
step; it can be chosen once its step is measured on both Macs (a share probe at a tensor-parallel load, or requests this
build served in tensor parallel).

When evidence chooses TP, the line ends "on its own step as measured on both Macs".

Linked issue

None. This implements roadmap item 1 of all-models-tp-pipeline-plan.md §4.1a and the recommendation of the #1706/#1707
refactor reviews.

Test plan

  • bash libs/darkbloom-cluster/Tests/PlacementChecks/run.sh: 1,495 passed (base 1,481).
    • Only the Gemma/MiMo fastest-plan checks changed: today's prior-driven picks became held-back checks, plus evidence
      checks.
    • Every other check name is identical, including every golden digest (Qwen, Gemma, MiMo, GPT-OSS, Nemotron, Bonsai).
    • PlacementChecks has no GLM golden plan. GLM's checks pass unchanged, and the plan tool's JSON output for GLM is
      byte-identical to the base in 10 of 10 runs, including runs that choose TP. Qwen3.8-27B: 5 of 5.
  • bash provider-swift/Tests/ClusterPlacementChecks/run.sh: 247 passed (base 240). These are new evidence
    scenarios through ClusterPlacementFlow.decide:
    • MiMo: no records, this build's records at 95 or 60 tok/s, another build's records;
    • Gemma: no probe, or probes at 7.0 or 10.3 ms.
  • bash provider-swift/Tests/ClusterInstalledSessionChecks/run.sh: exit 0. An instrumented copy showed the relay
    bound to 127.0.0.1:59588, from the OS ephemeral range.
  • swift test --package-path libs/darkbloom-cluster --skip-build --filter Gemma4TensorParallelRuntimeTests: 13/13.
    The planning test's no-probe fast-link case now keeps the pipeline; with a probe it takes TP.
  • swift test ... --filter "MiMoTensorParallel|MiMoResidentAdmission|MiMoSpeculativeDecode|MiMoInstalledImageBinding":
    45/45, unchanged.
  • make docs-impact-check BASE=origin/feat/mimo-tensor-parallel, make docs-check, make changelog-check,
    make changelog-preview.
  • Not validated: the real pair, real share-probe values, speeds, qualification records,
    swift test --package-path provider-swift.

Components touched

  • provider-swift (Swift CLI): the plan line and setup checks
  • native runtime / MLX: DarkbloomClusterPlacement (the planner), and one runtime test
  • docs

Protocol / interface changes

  • No protocol/interface changes.
    • ClusterPlacementResult (encoded only) gains an optional tensorParallel.evidence and one verdict case. Both are
      present only for .fastest layouts, so every other plan is byte-identical.
    • The model-list note tensor parallel: not measured yet is a plain string of 33 characters or fewer, which older
      builds display.

Documentation impact

  • Canonical documentation updated:
    • docs/architecture/inference.md: the rule, what it leaves unchanged, how a pair first gets evidence, and MiMo's
      reachability;
    • docs/provider/two-mac-cluster.md: what users see;
    • docs/developer/test.md.

Changelog

  • Added changelog.d/fastest-plan-evidence.md. One sentence each in the Gemma and MiMo TP fragments now points to it,
    so they don't contradict each other. Ran make changelog-check.

Notes for reviewers

  • What it picks (the planner's arithmetic on constructed Macs; measured 29 µs link unless noted):

    Pair, model Request Before After
    2 × M5 Ultra, Gemma 128 + 128 TP (1.40 vs 1.48 s) pipeline, held; with share probes the measured split decides (10.3 ms half: pipeline; 7.0 ms: TP)
    2 × M4 Pro, Gemma 128 + 128, default link TP (2.71 vs 3.05 s) pipeline, held; with 12 ms probes TP
    2 × M5 Ultra, MiMo (as the provider plans) fresh 32,768 + 32,768 TP (405 vs 444 s) speculative pipeline, held
    2 × M5 Max 128 GB, MiMo (as the provider plans) fresh TP (553 vs 646 s) speculative pipeline, held
    2 × M5 Ultra, MiMo 128 + 128, this build served TP at 70 / 95 tok/s — speculative pipeline / TP
  • Unchanged:

    • a better hardware group (only TP loads now) still goes first;
    • the forced developer mode still places TP;
    • a kept mode applies after the rule: TP served before an update stays, and a kept pipeline holds measured TP;
    • Qwen and GLM take no evidence hold, under TP-first or the plain comparison.
  • Bootstrap. Only a TP load records share probes: the debug build's forced mode, the morning A/B through the
    installed session, or a qualification run through it. Until then pairs keep the pipeline.

  • MiMo limitation.

    • MiMo takes no share probe, and served records count only for the build that served them.
    • Release builds cannot force TP, so they keep MiMo on the pipeline until a MiMo share probe exists (follow-up, about
      0.5–0.75 run).
    • The planner side is model-neutral; a check shows MiMo probes would count.
  • Feature parity: now on this PR (see "Update: the feature-parity gate" below).

  • Owner decisions:

    • accept or reject the rule;
    • kept-mode precedence (kept over evidence, as implemented, or evidence over kept);
    • whether small Macs that cannot hold the model alone may choose TP on the prior;
    • when to build the MiMo share probe;
    • device index v2 (§4.1b), the principled fix to the prior.

Update: the feature-parity gate (2026-11-01, d80b5ac43, 795193c15, 779e44d2a, de3247dd8)

The owner's directive: a mode may be chosen only if it keeps every feature and caching behavior of the mode it replaces.

  • Declared features: each mode's serving features now come from the worker's capability record,
    ClusterRuntimeCapability.modeFeatures, one ClusterServingFeatures per mode: prompt-prefix reuse, SSD prefix tier,
    speculative rounds, maximum lanes, request media, penalties and logit bias, stop handling, and logprobs. Records without
    them keep their exact bytes.
  • The rule: for choice: .fastest layouts, ClusterModeParity in ClusterPlacementFlow.decide removes a tensor-parallel
    mode before ranking if it would drop any feature of the mode it would replace, which is the plan chosen without TP.
    Gains, such as TP logprobs, never count.
    • No margin, evidence, kept mode or better hardware group brings it back.
    • Forced developer mode still places TP and prints exactly what it drops.
    • Where only a reduced-feature mode fits, the plan refuses and saves nothing, like Qwen3.8 27B's existing refusal.
  • Today:
  • Qwen and GLM are not gated, and their plans are byte-identical (50/50 plan-command runs against a fresh base).
    • A scratch measurement showed the gate would move Qwen3.5 9B from tensor_parallel_v1 to pipeline_mtp_v1 (TP lacks
      its rounds), so it applies to .fastest families only.
    • GLM's TP keeps everything its pipeline has and adds more.
  • Owner decisions:
    1. Should the gate also apply to Qwen and GLM? It would move Qwen3.5 9B unless the TP assistant is selected.
    2. A .fastest record that declares no features holds TP back (fail-closed). This has no effect on this build.
    3. Where only a reduced-feature mode fits, the plan refuses. A scan of the shipped layouts on equal idle Macs found no
      Gemma size, and one MiMo size (91 GB), where only TP fits.
    4. Where nothing else places, TP must keep the union of the other modes' features. For MiMo that includes the plain
      pipeline's 8 lanes, which come from an unpriced override.
  • Validation:
    • PlacementChecks 1,497; provider placement setup checks 262;
    • installed-session checks exit 0, with the relay on an OS-assigned port;
    • Gemma4TensorParallelRuntimeTests 14/14; MiMo TP suites 46/46;
    • docs and changelog checks.
  • Refactor pass: no logic bug found (de3247dd8). The forced line for a record without features no longer claims a
    loss, logprobs are now in the rule's feature list, and three helpers are now private.

Merged #1707's new head (a9c7314f5, signed): contract v2, FP32 partials. One changelog conflict was resolved by
keeping both edits. After the merge: the cluster build, 63 tests in 7 suites (MiMo TP and the Gemma TP runtime), and
PlacementChecks ("passed": true) all pass.

Merged #1707's next head (71e75221c, signed), which brings #1706's Gemma 4 tensor-parallel prompt prefixes. Conflicts:
Gemma4ResidentAdapterDefinition (keep tensorParallelKeepsPromptPrefixes = true and this branch's servingFeatures),
Gemma4TensorParallelResidentRuntime (the load agreement binds keepsPrefixes: prefixes kept and the rank's cache on) and
docs/developer/test.md.

Follow-up (afec28f11): Gemma's record now declares prefix reuse for tensor parallel, so the gate admits it.

  • capabilityDeclaresWhatEachModeKeeps pins that tensor parallel drops nothing the pipeline keeps.
  • The setup checks plan with what this build declares. The gate's Gemma checks (held, kept mode, forced line,
    only-tensor-parallel-fits refusal, codec) use a record whose tensor parallel keeps no prompt prefix, as builds before
    0.10.7 declared it, so the gate keeps its coverage.
  • The docs and the parity changelog say only MiMo is held, with MiMo's line as the example.

After both commits: the cluster build, 88 tests in 9 suites (MiMo TP; Gemma TP prefix, runtime and plan), PlacementChecks
("passed": true), provider placement setup checks (262) and the docs and changelog checks all pass.

CI fix (b18c9d7da): on afec28f11, provider shard 2 crashed in DistributedAutomaticBatchPlannerTests
(discoveredAssistantThatCannotBePlacedGivesWayToTheOrdinaryTarget). Reproduced locally and diagnosed with lldb:

  • The cause: a stack overflow (___chkstk_darwin, EXC_BAD_ACCESS) on a Swift Testing cooperative thread, which has
    a 512 KiB stack. It hit in ClusterPlacementPlanner.Context.tensorRequirement, below ClusterPlacementFlow.decide.
  • Why now: in debug builds every local keeps its own stack slot. The parity block's extra planner run and its
    temporaries grew decide's frame from 98,992 B to 116,320 B, past the chain's limit.
  • The fix: the block moves into ClusterModeParity.apply (@inline(never)), with the same behavior. decide's frame
    is back to 98,992 B.
  • After the fix: DistributedAutomaticBatchPlannerTests (27), the provider setup and wizard suites (17), the
    provider placement setup checks (262), the installed-session checks (OS-assigned relay port) and the docs checks pass.
  • Note: this chain sat close to the debug stack limit before the gate too. Release builds use far smaller frames.

Before And After

Behavior

flowchart LR
  subgraph Before
    A1["Plan a .fastest family: Gemma 4 or MiMo"] --> B1{"TP predicted at least 5% faster than the best other mode?"}
    B1 -->|"yes, even on the device-index prior alone"| C1["TP chosen"]
    B1 -->|no| D1["pipeline or speculative pipeline"]
  end
  subgraph After
    A2["Plan a .fastest family"] --> B2{"TP predicted at least 5% faster?"}
    B2 -->|no| D2["pipeline: predictedSlower"]
    B2 -->|yes| E2{"Every rank's share step measured? share probe of this model, or this build's served TP records"}
    E2 -->|yes| C2["TP chosen: line ends 'on its own step as measured on both Macs'"]
    E2 -->|"no, device-index prior only"| F2["best other mode kept: predictedFasterOnPriorOnly, held-back line, note 'tensor parallel: not measured yet'"]
    G2["forced mode, only TP fits, kept TP after an update, Qwen and GLM"] --> H2["unchanged"]
  end
Loading

Code

flowchart TD
  subgraph BeforeCode [Before]
    P1["ClusterPlacementPlanner.plan"] --> M1["holdingTensorParallelToItsMargin"] --> K1["holdingKeptMode"] --> R1["ranked.first"]
    R1 --> T1["assessTensorParallel: chosen, predictedSlower, notQualified ..."]
    T1 --> X1["deploymentReason, tensorParallelNote, shard table"]
  end
  subgraph AfterCode [After]
    P2["ClusterPlacementPlanner.plan"] --> M2["holdingTensorParallelToItsMargin"]
    M2 --> Q2{"layout choice is fastest_v1?"}
    Q2 -->|yes| H2["holdingTensorParallelWithoutEvidence: measuredShareSteps = ClusterDecodeSplit.measured on every rank"]
    Q2 -->|"no: Qwen, GLM"| K2["holdingKeptMode"]
    H2 --> K2
    K2 --> R2["ranked.first"]
    R2 --> T2["assessTensorParallel: + predictedFasterOnPriorOnly, + evidence measured or priorOnly"]
    T2 --> X2["deploymentReason held-back line or measured-step suffix, note notMeasuredYet, shard verdict"]
    X2 --> F2["ClusterPlacementFlow: 'Tensor parallel or pipeline' lines and the rule line"]
    S2["ClusterShareProbeHistory, addingShareRates"] --> H2
    V2["ClusterServedCalibration.tensorParallelMeasurements, ClusterSpeedEstimator"] --> H2
  end
Loading

Refactor Pass

An independent refactor/review pass found the rule correct as built (637d643a3).

  • Verified:
    • evidence counts per model and per member: a probe on one Mac only, or another model's probe, keeps the pipeline;
    • served records count only for this pair, this worker build and a measured link;
    • the forced-mode and only-mode-that-fits exceptions;
    • every non-.fastest path is unchanged: 44 golden checks with digests identical against a fresh base, GLM plan output
      byte-identical in 10 of 10 runs, Qwen3.8-27B in 5 of 5.
  • Kept-mode ordering: keep it as built. Evidence over kept would strand MiMo TP pairs on the pipeline after every
    update, because MiMo's only evidence is build-scoped. The real "no compromise" risk is feature parity (see Notes).
  • Fixes:
    • the held-back line said TP "is chosen" once measured, but a measurement can still find it slower; it now says "can be
      chosen", with its two checks and two doc quotes updated;
    • a MiMo doc comment had landed on the shared capability(...) builder; it's back on mimoFastestPlanLines;
    • the changelog said the device index "no longer" chooses TP, but that behavior is unreleased, so it now says "does not";
    • inference.md now says a speed record's shard rates count for every Mac with that chip and OS build.
  • Validation: PlacementChecks 1,495; provider placement setup checks 247; installed-session checks exit 0 (relay bound
    127.0.0.1:61155); Gemma4TensorParallelRuntimeTests 13/13; MiMo TP suites 45/45; docs and changelog checks.

The parent reran make changelog-check, make docs-impact-check BASE=origin/feat/mimo-tensor-parallel and
make docs-check on head 637d643a3; all pass.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Update 2026-11-03: now merges dev (613aa47f04) and pins SDK commit 22b3a8a7.

jonathan308 and others added 4 commits November 1, 2026 04:27
…red share steps

A family whose plan states ClusterTensorParallelChoice.fastest (Gemma 4,
MiMo V2.6) now takes tensor parallel only when every rank of the placement
has a measured share step (ClusterDecodeSplit.measured): a share probe of
this model (ClusterShareProbeHistory) or the shard rates requests this
build served in tensor parallel corrected (ClusterServedCalibration). On
the device-index prior alone (ClusterHardwarePrior.weightSeconds, which
times each operation with its launch latency inside and so overstates the
weight time a rank halves) the placement goes behind the best placement in
another mode of its hardware group (holdingTensorParallelWithoutEvidence),
and the assessment reports the new verdict predictedFasterOnPriorOnly with
the prediction. The assessment's new optional evidence (measured or
priorOnly) is set for fastest families only and omitted otherwise.

- The plan line says the predicted gain, that it comes from the device
  index, and what measures it; a choice on measured steps ends "on its own
  step as measured on both Macs"; the model-list note is "tensor parallel:
  not measured yet"; the shard table has the matching verdict.
- Unchanged: a better hardware group still goes first; the forced mode
  places tensor parallel; a kept mode is applied after the rule (tensor
  parallel served before an update stays); Qwen and GLM (no choice) and
  every other path are as before. The margin hold shares one helper with
  the new hold and keeps its exact comparison.
- PlacementChecks: the Gemma and MiMo checks that pinned prior-driven
  choices are held-back checks now (2x M5 Ultra on the measured 29 us
  link, 2x M4 Pro, 2x M5 Max, the provider's credited-rounds plans), plus
  evidence checks: share probes and served records decide both ways, a
  probe on one Mac or of another model is no evidence, the same layout
  without its choice still takes tensor parallel on the prior. 1,495
  checks (1,481 + 14); every golden digest unchanged.
- Gemma4TensorParallelRuntimeTests: the planning test's fast-link case
  now keeps the pipeline without a probe and takes tensor parallel with one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t through the guided step

ClusterPlacementFlow's line for a model chosen only where faster now states
the rule: tensor parallel only where predicted faster on its own step as
measured on both Macs, never on the device index alone. The state-specific
line (held back for lack of evidence, or chosen on measured steps) is the
planner's deployment reason above it.

PlacementSetupCheck, through ClusterPlacementFlow.decide on two 256 GB Macs
with the M5 Ultra's device index and the pair's measured 29 us link:
- MiMo (golden layout, the row's modes, rounds credited 1.37x), 128 + 128:
  with nothing served in tensor parallel the speculative pipeline is kept
  with the held-back line; three requests this build served in tensor
  parallel at 95 tok/s choose it, with the measured-step line; at 60 tok/s
  the speculative pipeline; another worker build's records are ignored
  and the pipeline is kept. MiMo's runtime takes no share probe, so served
  records are its only evidence.
- Gemma (QAT 4-bit golden layout), 128 + 128: no share probe keeps the
  pipeline; both Macs' share probes at 7.0 ms a half step choose tensor
  parallel, at 10.3 ms the pipeline.
The capability builder is shared by both. 247 checks (240 + 7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e steps

- inference.md: the rule in the Gemma tensor-parallel placement section (what
  counts as evidence, why the device-index prior alone does not, the verdict
  and plan line, what it leaves unchanged, how a pair first gets evidence);
  the Gemma and MiMo placement tables with held-back and evidence rows; MiMo's
  reachability (served records of the same build only, no share probe yet);
  the model-list note and the share-probe section.
- two-mac-cluster.md: what users see for Gemma and MiMo, the held-back line
  and the "tensor parallel: not measured yet" note.
- test.md: the changed and new checks.
- changelog: changelog.d/fastest-plan-evidence.md; the Gemma and MiMo
  fragments' sentences that named prior-driven choices now point to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refactor pass over the fastest-plan evidence rule (d3fa4ce, 43c9890,
709630c). Text and comments only: the planner's logic is unchanged, and
Qwen and GLM plans are byte-identical.

- The `predictedFasterOnPriorOnly` plan line said tensor parallel "is
  chosen once its step is measured on both Macs", but a measurement can
  still find it slower. It now says "can be chosen". The Gemma
  PlacementCheck and the MiMo setup check that pin the line, and the two
  docs that quote it, follow.
- PlacementSetupCheck: the MiMo plan-lines doc comment had been left on
  the new shared `capability(...)` builder. It is back on
  `mimoFastestPlanLines`.
- The new changelog fragment says the device index alone "does not"
  choose tensor parallel: the behavior it replaces is unreleased.
- inference.md: a speed record's shard rates count for every Mac of its
  chip and OS build, not only for one Mac.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonathan308 jonathan308 added area:provider Provider (Rust, runs on Apple Silicon) area:docs Documentation work specific to a component or feature labels Nov 1, 2026
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Error Error Nov 3, 2026 7:39pm UTC
d-inference-console-ui-dev Error Error Nov 3, 2026 7:39pm UTC
d-inference-landing Ready Ready Preview Nov 3, 2026 7:39pm UTC
darkbloom-status Ready Ready Preview Nov 3, 2026 7:39pm UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 3, 2026 7:39pm UTC

Request Review

jonathan308 and others added 5 commits November 1, 2026 10:58
The worker's capability record can now say what each generation mode keeps
of the model's serving features (`ClusterServingFeatures`): resident
prompt-prefix reuse and its SSD tier, speculative (MTP) rounds, the widest
batch-lane width, request media, penalties and logit bias, stop handling
and committed-token logprobs. `ClusterServingFeatures.dropped(by:)` names
what another mode would drop of them; what that mode adds never counts.

- `ClusterRuntimeCapability.modeFeatures`: one entry per supported mode
  (validated), written as `modeFeatures` only when declared, so every
  other record keeps its bytes.
- Gemma 4 declares them in `Gemma4ResidentAdapterDefinition`: tensor
  parallel keeps no prompt prefix yet. `tensorParallelKeepsPromptPrefixes`
  is now what its load agreement binds.
- MiMo V2.6's text row declares them from its loads' own settings
  (`MiMoBatchSettings`; `MiMoTensorParallelResidentRuntime.servingFeatures`,
  whose lane count and prefix setting its serving agreement now binds,
  bytes unchanged). The image candidate declares none.
- Qwen, GLM and every other record are unchanged.
- Tests: what each Gemma mode and each MiMo text mode declares, tied to
  the load agreements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eplaces

Owner directive, 2026-11-01: a mode may be chosen only if it keeps every
feature and caching behavior of the mode it would replace.

- `ClusterModeParity`, in `ClusterPlacementFlow.decide` beside
  `ClusterModelFeaturePolicy.admissibleModes`. For a fastest-plan family
  (Gemma 4, MiMo V2.6) the mode tensor parallel would replace is the one
  the plan chooses without it, or every other mode where none places. A
  tensor-parallel mode that drops any feature the worker declares for it
  leaves the policy's modes before anything is ranked, so no margin,
  evidence hold, kept mode or better hardware group brings it back. A
  record without features holds it back too.
- Where only tensor parallel places, the plan refuses and saves nothing
  ("Only tensor parallel fits these Macs, and it would drop ... No
  reduced-feature setup was saved."). `modesReason` carries it to the
  setup screen's refusal words.
- The developer's forced mode still places tensor parallel, and the plan
  says exactly what it drops.
- Planner: `ClusterPlacementPolicy.tensorParallelHeldForFeatures`, the
  verdict `dropsFeatures` (assessment and shard table), the model-list
  note "tensor parallel: drops a feature", and the line "Pipeline: tensor
  parallel would drop ... that the pipeline keeps; held back until it
  keeps them."
- Qwen and GLM (tensor parallel first) are not gated: their plans and
  lines are unchanged. Applied to them, the rule would move Qwen3.5 9B
  from tensor parallel to its credited speculative pipeline; that is left
  to the owner.
- Checks: Gemma held back with and without share probes, after an update
  and with nothing measured, re-admitted once its record keeps prefixes;
  MiMo held back with its rounds off (also on served records), admitted
  with them on; the forced mode's line; the only-reduced-mode refusal and
  its re-admission; a record without features; the codec; a GLM record
  declaring a gap plans exactly as without it; the planner's verdict, line,
  note and shard verdict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- inference.md: the rule in the Gemma tensor-parallel placement section
  (each mode's declared features for Gemma and MiMo, where they come from,
  how the replaced mode is found, the verdict, line, note and refusal, the
  forced mode, what it means today, and what it would change for Qwen and
  GLM); the Gemma and MiMo figure tables now say the guided step's parity
  keeps the pipeline in their tensor-parallel rows.
- two-mac-cluster.md: what users see, and the Gemma and MiMo rows.
- test.md: the new runtime tests, setup checks and note check.
- changelog.d/cluster-feature-parity.md (new); one pointer sentence in
  fastest-plan-evidence.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refactor pass over the feature-parity gate (d80b5ac..779e44d). What
the gate holds back, refuses or places is unchanged.

- The forced developer mode's line moves beside the gate's other words
  (`ClusterModeParity.Hold.forcedLine`). For a record that declares no
  serving features it said tensor parallel "drops features this worker
  build does not declare"; it now says the build declares none, "so what
  it drops is not known". A setup check pins that line.
- The plan's rule line, the changelog fragment and two-mac-cluster.md list
  logprobs among the features a mode must keep, as
  `ClusterServingFeatures.dropped(by:)` counts them and the owner's
  directive names them. What tensor parallel adds still never counts.
- `ClusterModeParity`'s word helpers are private to it.
- test.md describes the new check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ence

Brings #1707's arithmetic contract v2 (FP32 row-parallel partials, rounded once after the
sealed sum) under the evidence rule and the feature-parity gate. One conflict, in
changelog.d/mimo-tensor-parallel.md: keep #1707's FP32 bullet and this branch's pointer to
the evidence and parity fragments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 and others added 2 commits November 1, 2026 13:11
…ence

Brings #1706's Gemma 4 tensor-parallel prompt prefixes (resident and encrypted SSD tiers,
per-request capture charge), through #1707, under the evidence rule and the feature-parity
gate. Conflicts:
- Gemma4ResidentAdapterDefinition: keep tensorParallelKeepsPromptPrefixes = true and this
  branch's servingFeatures, whose comment no longer says tensor parallel keeps none;
- Gemma4TensorParallelResidentRuntime: the load agreement binds keepsPrefixes (prefixes kept
  and the rank's cache enabled), so a rank with prefixes switched off refuses its peer;
- docs/developer/test.md: the evidence-rule text, with each rank quoted with its request's
  prompt-prefix capture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… gate admits it

With #1706's prompt prefixes merged, Gemma 4's capability record declares prefix reuse
resident and on the SSD tier for tensor parallel, as for the pipeline. The feature-parity gate
then has nothing to hold Gemma back on, and the evidence rule decides.

- Gemma4TensorParallelRuntimeTests.capabilityDeclaresWhatEachModeKeeps pins the new
  declaration: tensor parallel drops nothing the pipeline keeps.
- PlacementSetupCheck plans with what this build declares; the gate's Gemma checks (held,
  kept mode, forced line, only-tensor-parallel-fits refusal, codec) use a record whose
  tensor parallel keeps no prompt prefix, as builds before 0.10.7 declared it.
- inference.md, two-mac-cluster.md, test.md and the parity changelog say only MiMo is held
  (no speculative rounds yet), with MiMo's line as the example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…frame

CI's provider shard 2 crashed in DistributedAutomaticBatchPlannerTests
(discoveredAssistantThatCannotBePlacedGivesWayToTheOrdinaryTarget): a stack overflow on a
Swift Testing cooperative thread (512 KiB), in ClusterPlacementPlanner's tensorRequirement
below ClusterPlacementFlow.decide. In debug builds every local keeps its own stack slot, and
the parity block's planner run and temporaries grew decide's frame by about 17 KB, past the
chain's limit.

ClusterModeParity.apply (@inline(never)) now holds that block, with the same behaviour: tensor
parallel's modes leave the policy where they drop a feature unless the mode is forced, and the
only-tensor-parallel-fits refusal is recorded in modesReason. Measured with lldb on the same
test, decide's frame is back to its size before the gate (98,992 B; 116,320 B with the block).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ence

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 3, 2026
…ts runtimes admit

A two-Mac Gemma 4 or MiMo pair that the planner placed in tensor parallel did
not start:
- The planner gave every candidate the one-chunk lookahead whenever the model
  lists it, tensor parallel included, and setup saved that schedule.
- Every tensor-parallel runtime (GLM, Gemma 4, MiMo, Qwen) admits only
  `serial_v1`, so the Gemma and MiMo runtimes refused the saved plan at load. A
  pipeline plan of the same pair would have served.
- Qwen escaped only because the provider forces a serial policy on its
  tensor-parallel paths. The fastest-plan evidence rule (#1715) made the case
  rarer, but did not remove it.

The fix:
- `ClusterPrefillSchedule.planned(for:supported:)` is the one rule. Tensor
  parallel prefills serially; a layer split takes the lookahead where the model
  has it, as before.
- The planner's candidates use it, and so does the served-speed history, so a
  tensor-parallel pair's own measurements match the plans they inform.
- A policy that allows no serial schedule no longer gets a tensor-parallel
  candidate.

Tested:
- `libs/darkbloom-cluster/Tests/PlacementChecks/run.sh` passes, including two
  new checks:
  - a Gemma plan in tensor parallel is serial while its pipeline keeps the
    lookahead;
  - the rule holds for every mode.
  With the old schedule line, the new Gemma check and the two-M4-Pro
  tensor-parallel plans fail.
- `provider-swift/Tests/ClusterPlacementChecks/run.sh` passes 237.
  `TensorParallelPlanChecks` passes. `make docs-check` and
  `make docs-impact-check BASE=origin/dev` pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ence: tensor parallel plans the serial prefill schedule

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	libs/darkbloom-cluster/Tests/PlacementChecks/GemmaTensorParallelChecks.swift
Conflict in docs/provider/two-mac-cluster.md (onboarding steps 1-5,
rewritten by #1736): took dev's steps. This branch's only change there
added "tensor parallel: not measured yet" to step 4, which dev's step 4
already has. Code files merged cleanly; ClusterSetupWizardPlanning.swift
hunks are disjoint (dev: comment at L106, this branch: refusalWords L233).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
davidtai added a commit that referenced this pull request Nov 3, 2026
Brings dev 70b2f6d (#1736) through #1715, whose merge resolved the
docs/provider/two-mac-cluster.md conflict. Clean here; keeps the SDK #381
pin until #381 merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@davidtai
davidtai changed the base branch from feat/mimo-tensor-parallel to dev November 3, 2026 19:52

@davidtai davidtai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved on David's order (2026-11-03): cluster release stack. Independent review: MERGE. All tests passed; the one red job failed downloading a prompt fixture (network), after its 840 tests passed.

@davidtai
davidtai merged commit c4ef6ea into dev Nov 3, 2026
27 of 31 checks passed
@davidtai
davidtai deleted the feat/fastest-plan-evidence branch November 3, 2026 20:24
@jonathan308 jonathan308 mentioned this pull request Nov 3, 2026
14 of 17 tasks

This branch had an error being deployed

2 failed and 3 active deployments
Preview – d-inference — dd0128de Deployed Nov 3, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — dd0128de Deployed Nov 3, 2026 by vercel[bot]
Preview – d-inference-landing — dd0128de Deployed Nov 3, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — dd0128de Deployed Nov 3, 2026 by vercel[bot]
Preview – darkbloom-status — dd0128de Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentation work specific to a component or feature area:provider Provider (Rust, runs on Apple Silicon)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants