Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
41dd24f
GPT-OSS: match client stop sequences in the Harmony final message only
jonathan308 Oct 28, 2026
ac39dad
Gemma 4 and <think> models: client stop sequences skip reasoning and …
jonathan308 Oct 28, 2026
5e56f05
Stop scope: native block engine stays unscoped; report the stop that …
jonathan308 Oct 28, 2026
46f7ae9
Pin the merged mlx-swift-lm (#369) and the MLX stack it builds on
jonathan308 Oct 28, 2026
2185dfe
Handle the SDK's .logprobs event in provider test switches
jonathan308 Oct 28, 2026
faa3407
Merge master 300134d24 (provider test time under the CI watchdog, #16…
jonathan308 Oct 28, 2026
2841c6f
ci: fresh run for Release Integrity
jonathan308 Oct 28, 2026
75abd7d
Merge #1645 (SDK main re-pin) into the reasoning stop fix
jonathan308 Oct 28, 2026
93739a6
Merge master 093aaf3d8 (#1645 squash-merged) into the reasoning stop fix
jonathan308 Oct 30, 2026
2660933
Merge master (6ffeaf06c) into fix/reasoning-stop-scope
jonathan308 Oct 31, 2026
16d59d9
Gemma 4 replies keep characters written as byte tokens
jonathan308 Oct 31, 2026
b1c3d66
Byte-fallback tests and changelog after independent verification
jonathan308 Nov 1, 2026
94d7a0b
Share one expert dispatch across Gemma prompt tokens and decode rows
jonathan308 Nov 1, 2026
5a4c94f
State Gemma 4's expert routing for the placement prior
jonathan308 Nov 1, 2026
a3d7407
Serve four lanes by default on serial-prefill Gemma 4 pipelines
jonathan308 Nov 1, 2026
562eaf8
Group Gemma's shared expert rows by expert for weight locality
jonathan308 Nov 1, 2026
fdabade
perf(cluster): MiMo pipeline decode in 100-operation command buffers
jonathan308 Nov 1, 2026
a7285da
Pin the package-only Gemma expert-row call; give each lane fact one home
jonathan308 Nov 1, 2026
1f1eb7a
test(cluster): MiMo decode parity at the registered row's commit points
jonathan308 Nov 1, 2026
1977e31
docs(cluster): what the MiMo decode-row charge prices
jonathan308 Nov 1, 2026
1cd219f
perf(provider): Gemma 4 plain decode commits by operation count
jonathan308 Nov 1, 2026
a417121
perf(cluster): pipeline decode in 100-operation command buffers for e…
jonathan308 Nov 1, 2026
1a36c65
fix(cluster): a phase split's producer rank prices no decode rows
jonathan308 Nov 1, 2026
1974826
docs(cluster): which attention partials the pipeline decode charge le…
jonathan308 Nov 1, 2026
b4f0800
fix(provider): client stop strings still apply to a literal tool tag …
jonathan308 Nov 1, 2026
f8df748
Merge branch 'master' into fix/reasoning-stop-scope
jonathan308 Nov 1, 2026
7d085fe
docs: the stop scope depends on a tool handler, not only on declared …
jonathan308 Nov 1, 2026
31fe79c
docs: freshness stamp for the Gemma decode section
jonathan308 Nov 1, 2026
e62928b
cluster: regression tests for a committed start that outlives its ses…
jonathan308 Nov 1, 2026
6606102
cluster: release a committed start when its session ends
jonathan308 Nov 1, 2026
85feca4
cluster: regression tests for the pair engine's cancellation deadlock
jonathan308 Nov 1, 2026
d062a1b
cluster: never wait for the pair engine's queue from a cancellation
jonathan308 Nov 1, 2026
0124b7f
cluster: make the pair serving fix's docs and comments precise
jonathan308 Nov 1, 2026
b749184
Save a Qwen tensor-parallel pair's widest admitted width at placement
jonathan308 Nov 2, 2026
5d20bce
Say which width a sized tensor-parallel plan leaves the pipeline out for
jonathan308 Nov 2, 2026
11b5c08
Check a saved tensor width's pricing in the placement checks
jonathan308 Nov 2, 2026
291f5fe
cluster: prefill Qwen TP prompts as merged wavefront steps
jonathan308 Nov 2, 2026
3556a33
docs: Qwen TP prompt wavefront
jonathan308 Nov 2, 2026
681591d
cluster: say what the wavefront's last submission does; step offsets …
jonathan308 Nov 2, 2026
6e152ae
cluster: test the executor's planned merged prompt step
jonathan308 Nov 2, 2026
1751746
Keep a sized tensor plan's mode reasons, and its plans off decide's f…
jonathan308 Nov 2, 2026
83b7318
Say in the changelog how many requests a Qwen TP pair serves at once
jonathan308 Nov 2, 2026
3e5c352
cluster: keep at most four wavefront sums unfinished; peak memory in …
jonathan308 Nov 2, 2026
775ed58
docs: Qwen TP prompt wavefront's bounded sums and measured peaks
jonathan308 Nov 2, 2026
e475680
cluster: carry the next Qwen TP step's control in plain decode select…
jonathan308 Nov 2, 2026
704bbe8
docs: Qwen TP decode control in the selection sum
jonathan308 Nov 2, 2026
98c46f9
cluster: run the discovered-assistant planner test on a large stack
jonathan308 Nov 2, 2026
3df21c8
docs: MiMo's routed-expert prior leaves pipeline plans unchanged, wit…
jonathan308 Nov 2, 2026
67da590
changelog: GLM's request charge is not one of those that now price de…
jonathan308 Nov 2, 2026
305a6da
docs(cluster): why GLM's pipeline charge needs no decode term
jonathan308 Nov 2, 2026
b7d3fe6
cluster: Qwen TP folded control refactor pass: names, held-token stop…
jonathan308 Nov 2, 2026
ed32f00
docs: Qwen TP folded control: when host events apply, the client-stop…
jonathan308 Nov 2, 2026
2729376
cluster: test that assisted Qwen TP rows keep their exchange and gate
jonathan308 Nov 2, 2026
ebec193
cluster: fold Qwen TP control only for executors whose selection sum …
jonathan308 Nov 2, 2026
9804143
docs: state the stop scope's exceptions in the changelog
jonathan308 Nov 2, 2026
76bb741
Merge the stop-scope follow-up into fix/reasoning-stop-scope
jonathan308 Nov 2, 2026
ce95ac8
ci: re-run checks after runner checkout timeouts
jonathan308 Nov 2, 2026
253801c
ci: one more run after a runner checkout timeout
jonathan308 Nov 2, 2026
b538997
Merge branch 'dev' into fix/gemma-byte-fallback-flush
jonathan308 Nov 3, 2026
2cff92f
Merge branch 'dev' into fix/cluster-pair-serving-epoch
jonathan308 Nov 3, 2026
02bb289
docs: reconcile pipeline notes with current dev
jonathan308 Nov 3, 2026
ebcab3d
docs: align merge preimage headers with dev
jonathan308 Nov 3, 2026
3706bf8
Merge branch 'dev' into perf/pipeline-decode-buffers
jonathan308 Nov 3, 2026
df5d76b
docs: retain authored pipeline verification dates
jonathan308 Nov 3, 2026
9efc666
Merge dev into perf/qwen27-tp-default-lanes for the 0.10.7 merge
davidtai Nov 3, 2026
d09791c
Merge dev into perf/qwen27-tp-prompt-wavefront for the 0.10.7 merge
davidtai Nov 3, 2026
977754d
Merge origin/dev into perf/mimo-pipeline for the 0.10.7 merge
davidtai Nov 3, 2026
5ae0556
Merge perf/qwen27-tp-prompt-wavefront (with dev) into perf/qwen27-tp-…
davidtai Nov 3, 2026
2de208f
Merge dev into perf/gemma-decode-command-buffers; pin libs/mlx-swift-…
davidtai Nov 3, 2026
a57a099
Merge dev into fix/reasoning-stop-scope; pin libs/mlx-swift-lm to SDK…
davidtai Nov 3, 2026
03aa10d
Merge dev into perf/gemma-pipeline; pin libs/mlx-swift-lm to SDK main…
davidtai Nov 3, 2026
c1ed803
Pin libs/mlx-swift-lm to SDK main 2311af6e
davidtai Nov 3, 2026
cc83764
Merge perf/qwen27-tp-prompt-wavefront (SDK pin 2311af6e) into perf/qw…
davidtai Nov 3, 2026
f541794
docs: the saved Qwen TP widths after the per-lane prefix capture
davidtai Nov 3, 2026
2f437d9
Merge remote-tracking branch 'origin/fix/gemma-byte-fallback-flush' i…
davidtai Nov 3, 2026
4dc7e77
Merge remote-tracking branch 'origin/perf/gemma-decode-command-buffer…
davidtai Nov 3, 2026
2d45383
Merge remote-tracking branch 'origin/fix/reasoning-stop-scope' into HEAD
davidtai Nov 3, 2026
df381e5
Merge remote-tracking branch 'origin/fix/cluster-pair-serving-epoch' …
davidtai Nov 3, 2026
5950917
Merge remote-tracking branch 'origin/perf/gemma-pipeline' into HEAD
davidtai Nov 3, 2026
7cc72ed
Merge remote-tracking branch 'origin/perf/mimo-pipeline' into HEAD
davidtai Nov 3, 2026
1bfaff2
Merge remote-tracking branch 'origin/perf/pipeline-decode-buffers' in…
davidtai Nov 3, 2026
8564fae
Merge remote-tracking branch 'origin/perf/qwen27-tp-default-lanes' in…
davidtai Nov 3, 2026
cc9d993
Merge remote-tracking branch 'origin/perf/qwen27-tp-prompt-wavefront'…
davidtai Nov 3, 2026
fb4ea14
Merge remote-tracking branch 'origin/perf/qwen27-tp-decode-control' i…
davidtai Nov 3, 2026
39d8f0c
docs: Qwen TP saved-width byte figures include the prompt wavefront term
davidtai Nov 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions changelog.d/cluster-pair-serving-epoch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### Two-Mac pairs recover after losing a rank during a stop

- A two-Mac pair no longer stays unable to serve when it loses a rank while
its slot is stopping. Until the provider restarted, its leader refused every
later start, and `darkbloom cluster stop` left that Mac's part still
releasing.
- Fixed a deadlock in the pair's request engine. Stopping the pair slot
cancelled a request's stream while the engine was telling that request the
pair had lost a rank. The stream's cancellation waited for the engine, and the
engine waited for the cancellation to finish, so the slot never stopped.
Cancellation and stream termination now never wait for the engine.
- The leader also releases a committed start as soon as its session ends,
instead of after the old slot has fully stopped, so a slow stop can no longer
make it refuse later starts with "a committed start is already served". The
release receipt still waits, bounded, for the slot to retire, and a pair still
never serves two slots at once.
6 changes: 6 additions & 0 deletions changelog.d/gemma-byte-fallback-flush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Gemma 4 replies keep characters outside its vocabulary

- A Gemma 4 reply that ended in characters its vocabulary writes as byte tokens, such as many newer emoji, rare CJK and most Hangul syllables, lost all of them: `all zipped up 🗜` came back as `all zipped up `, and a reply made only of such characters came back empty. A long reply could also corrupt such a character when streaming restarted its decode inside its bytes.
- The Swift tokenizer library releases byte tokens only when a later token arrives. The provider's tokenizer bridge now releases a trailing run itself. `/detokenize` keeps it too.
- Token IDs, numeric logprobs, sampling and cache keys do not change, with one exception: a stop string that a trailing run completes now matches when the run completes, one token sooner, so `completion_tokens` can fall by one.
- A streamed reply's `logprobs` gains the entries of those tokens, which it used to drop. A byte token's `logprobs` text and `bytes` are U+FFFD or its ASCII character instead of empty, not the real byte. A reply cut inside a character by `max_tokens` now ends in U+FFFD instead of dropping it.
3 changes: 3 additions & 0 deletions changelog.d/gemma-decode-command-buffers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Gemma 4 plain decode commits by operation count

- Plain decode steps of Gemma 4, the rows served without its assistant, commit a Metal command buffer every 100 operations instead of many times per step. Outputs are bitwise identical. Prefill and assistant rounds keep MLX's defaults.
5 changes: 5 additions & 0 deletions changelog.d/gemma-pipeline-speed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Faster Gemma 4 pipeline pairs

- Gemma 4 pipeline stages compute a prompt chunk's expert blocks in one shared dispatch per operation instead of one subgraph per prompt token, with the same bytes for every token (unchanged arithmetic receipt). Batch-decode rows share the same dispatch. On one synthetic expert layer this cut a 2,048-token chunk from about 370 ms to about 31 ms; pair throughput is not yet measured.
- A Gemma 4 pipeline pair whose setup prefills serially, coordinator-registered pairs included, now serves four requests at once. Each lane is admitted against live memory on both Macs. A pair planned with the one-chunk lookahead keeps serving one request at a time.
- The planner's hardware prior counts 8 of Gemma 4's 128 experts per token instead of every expert byte.
15 changes: 15 additions & 0 deletions changelog.d/mimo-pipeline-decode-buffers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### MiMo pipeline decode command buffers and expert routing

- MiMo V2.6 Flash pairs encode decode steps, lane steps and speculative rounds
in Metal command buffers of up to 100 operations with no input-size bound, as
GLM and Qwen tensor parallel already do. Prefill keeps the rank's limits.
Tokens, logits and caches are byte-identical on synthetic stages. The speed
effect on the registered model has not been measured yet.
- A MiMo request's memory charge now prices every full-attention layer's decode
score rows at once, which the larger command buffers can keep alive together.
The LOAD quote is unchanged. Only requests whose prompt frames are shorter
than a stage's full-attention layers times the decode rows (32 tokens at most)
are charged slightly more.
- The planner's hardware prior now counts MiMo's routed experts at the 8 of 256
a token uses: 10.77 GB read per decode step instead of 166.6 GB. The prior
prices only tensor parallel, so MiMo's pipeline plans are unchanged.
15 changes: 15 additions & 0 deletions changelog.d/pipeline-decode-buffers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### Pipeline decode command buffers for the remaining cluster models

- Cluster pairs of the Qwen and Bonsai rows, Nemotron 3.5 Lightning, Gemma 4,
GPT-OSS 20B and GLM-5.3-Flash encode decode steps (pipeline and phase split),
lane steps and speculative rounds in Metal command buffers of up to 100
operations with no input-size bound, as GLM and Qwen tensor parallel already
do. Prefill keeps the rank's limits. Tokens, logits and caches are
byte-identical on synthetic stages. The speed effect on registered models has
not been measured yet, and each family keeps the change only if a pair A/B
shows a gain.
- A request's memory charge on those pairs, other than GLM's, now prices every
attending layer's decode rows at once, which the larger command buffers can
keep alive together. The LOAD quotes are unchanged. Only requests whose prompt
frames are shorter than their decode rows (at most 80) are charged more, and
only on a rank that decodes.
22 changes: 22 additions & 0 deletions changelog.d/qwen27-tp-decode-control.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Qwen tensor-parallel decode control in the selection sum

- A Qwen tensor-parallel pair's plain decode step now carries the next step's
plan and report in its own sealed selection sum, so the step pays one sealed
sum and one host read fewer than before. Tokens, logits and native state are
unchanged; assisted (MTP) rows, prompt steps and idle steps keep their own
exchange.
- Owner answers, cancellations and joins now apply one step later while plain
rows decode. A row decodes its next token once the owner answered the token
before it, so an answer that arrives while a step computes no longer leaves
the row idle for a step. Rank 0 still publishes a token only after the
owner's answer to the one before it. A token selected before a stop answer is
never published, so streamed text, usage and logprobs are unchanged.
- A clean stop the owner asks for (a stop string, for example) can cost one
more forward, which is discarded. On a one-lane pair every such stop after a
request's first token does (assisted rows excepted), and that request's
finish arrives one decode step later than before.
- Both ranks of a pair must run this build: the load agreement binds the new
control wire (`qwen-tp-independent-history-batch-v2-folded-control`).
- `darkbloom-cluster-tp-check qwen-decode` times the batch driver's decode on
two ranks over the loopback ring, with the control exchanged or folded, and
checks that both retire the same tokens.
20 changes: 20 additions & 0 deletions changelog.d/qwen27-tp-default-lanes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Qwen tensor-parallel pairs serve up to 8 requests at once, sized to memory

- `darkbloom cluster` now sets how many requests a Qwen tensor-parallel pair
serves at once: 8, 6, 4 or 2, the most that both Macs' memory holds now with
the full load reservation for that many. The pair serves them from its first
load. Before, it served one at a time: a local pair widened only after a
burst, through a reload the burst waited for, and a pair serving Darkbloom
traffic never widened.
- On two idle Macs, Qwen3.8-27B serves 8 at once from 64 GB a Mac without the
speculative assistant (4 at 48 GB, 2 at 32 or 36 GB), and 8 from 96 GB a Mac
with it (local clusters only); smaller Macs serve fewer. Two M5 Ultras serve 8 either
way. When not even 2 fit, the pair serves one request at a time, as before.
- Memory safety is unchanged: both Macs reserve that many requests' full memory
when the model loads and admit each request alone. A local pair set up
narrower still widens when requests queue; a pair set up for 8 is never
reloaded for it.
- Existing setups keep serving one request at a time until they are planned
again, as after an update. A pair serving Darkbloom traffic keeps its width
beside its approval; no approval, registration or committed-start digest
changes.
17 changes: 17 additions & 0 deletions changelog.d/qwen27-tp-prefill.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### Qwen tensor-parallel prompt wavefront

- A Qwen tensor-parallel pair now prefills a text prompt faster, in steps of up
to eight consecutive 512-token frames built as one graph, layer by layer:
while one frame's sealed sum crosses the link, the next frame computes. Every frame
keeps its own shapes and kernels, so logits, KV, recurrent state, prefix
captures and tokens are unchanged. Steps run two frames while another lane
decodes and end at the prompt-cache capture point. Media prompts, assisted
(MTP) prompts, packed KV and routed-expert models keep one frame a step.
- The merged step's frames in flight are charged in LOAD, the placement quote
and each request's charge: a Qwen3.8-27B tensor-parallel rank needs about
367 MB more at any width.
- `darkbloom-cluster-tp-check qwen-prefill --wavefronts 1,8` and
`darkbloom-cluster-tp-check qwen-wavefront` measure the merged steps on one
rank and on two ranks over the loopback ring.
`DARKBLOOM_QWEN_TP_PROMPT_WAVEFRONT=0` restores one frame a step for
diagnosis; both ranks must agree.
18 changes: 18 additions & 0 deletions changelog.d/reasoning-stop-outside-reasoning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
### Stop sequences no longer match Gemma 4 or `<think>` reasoning

- A client `stop` sequence on Gemma 4 models such as `gemma-4-26b-qat-4bit`,
and on models that reason in `<think>` blocks (Qwen 3.5, 3.6 and 3.8,
among others), now matches only the text returned as `content`. With
reasoning on, it used to match the reasoning too, so a sequence that
appeared while the model reasoned (for example `"."` or `"\n\n"`) ended the
request before any answer: `finish_reason` `stop`, reasoning only, empty
content.
- With tools declared, tool-call frames are not cut either, except a frame
whose arguments quote its own closing tag, or a bare `<function=…>` frame
written without its wrapper. When a request has no tool handler (no declared
tools, or a media request on a family without native media tools), a literal
tool tag in an answer is text the client receives, and stops still apply to it.
Whitespace before the answer's first character (the blank line after
`</think>`) cannot complete a stop sequence on its own.
- A stop sequence that names a marker no longer fires on it: `</think>`, or
`<tool_call>` with tools declared.
52 changes: 47 additions & 5 deletions docs/architecture/hardware-support.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hardware support and the provider memory model

> Last updated: 2026-11-01
> Last updated: 2026-11-02

What hardware the provider runs on and how it decides, in bytes, whether a
model may load and how much KV cache each resident model may use. Read this to
Expand Down Expand Up @@ -54,6 +54,21 @@ not waive LOAD or live-memory checks. See
`GPTOSSRequestStateBudget.estimate` in
`libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/GPTOSS/Metadata/GPTOSSRequestStateBudget.swift`.

Pipeline decode steps of the Qwen catalog, Nemotron, Gemma 4 and GPT-OSS
encode under decode command buffers that can keep a whole stage step's
temporaries alive at once, so each request charge prices every attending
layer's decode rows together (one a layer, or a verify window's `depth + 1`;
every layer on a phase split's decoding rank, none on its other rank), and
never less than one prompt frame's attention transient
(`QwenResidentPrefillTransient`, `Gemma4PrefillTransient`,
`GPTOSSRequestStateBudget`). The LOAD quotes and activation floors are
unchanged; only requests whose prompt frames are shorter than their decode rows
are charged more. GLM's request charge already prices three copies of twice its
context on every DSA layer of a stage, well above what a decode step keeps and
reads on every layer at once. Attention-kernel partials beyond the priced rows are
not charged separately; see
[pipeline decode command buffers](inference.md#pipeline-decode-command-buffers).

Optional Qwen plain-pipeline batch cancellation retains a lane's memory charge
until all its active and tentatively restored native sessions close. It then
releases only that lane, without changing other lanes' reservations or the
Expand Down Expand Up @@ -1050,6 +1065,10 @@ attention views and sliding repack storage. Keys and values are priced with
their distinct registered widths. Host prompt/selected-token histories and
shared native decode workspace remain additional. Both MTP target ranks price
the larger of the prompt chunk and the admitted `depth + 1` verification window.
Every MiMo rank's workspace charge also prices each of its full-attention
layers' score rows for the decode rows at once, because decode command buffers
can keep a whole step in flight (`MiMoRequestStateBudget`, `decodeRows`;
[MiMo pipeline decode command buffers](inference.md#mimo-pipeline-decode-command-buffers)).
The trained assistant preserves its whole previous allocation envelope and adds
separately rounded resident and working pages. Phase rank 1 prices every target
layer; both ranks retain the moving-state allowance during transfer. Image
Expand Down Expand Up @@ -1082,6 +1101,16 @@ full-artifact memory fit, numerical parity or throughput; those require
paired hardware qualification. The restore mechanism is described in
[inference](inference.md#gemma-paged-prefix-restoration).

A serial-prefill Gemma 4 pipeline's default width
(`DistributedInstalledPlan.gemma4PipelineBatchLanes`,
[Gemma pipeline lanes](inference.md#gemma-pipeline-lanes)) adds no load-time
allocation: the paged pool's capacity is a ceiling, and pages are reserved per
request (`CBv2StageKVHost`). Each lane is charged its whole request state on
every rank and admitted against live memory (`QwenResidentRuntime.reserveLane`);
a lane the host cannot hold is refused alone, retryably. The measured
activation floor still applies: prompt frames run one per step and decode rows
add only M=1 work.

## Bonsai packed projection arithmetic

Bonsai 27B uses the [packed FP32 row path](inference.md#bonsai-27b-packed-fp32-rows)
Expand Down Expand Up @@ -1149,9 +1178,19 @@ projection constants and the transient batch conversion bank are charged
separately, including unequal shards. Paged backing charges each lane its own
BF16 page bank and partial-page replacement, and one full-history gather bank
once for the owner: decode steps and verify windows attend pages in place, and
the driver runs at most one prompt frame per step, so only a prompt frame
gathers a history (`QwenTensorParallelBatchMemoryTests.fullHistoryGatherIsOnePromptFramesTransient`
measures both). Segment slack and allocator overhead stay charged. Collective scratch prices complete
the driver runs one lane's prompt step at a time, so only a prompt step's frames
gather a history (`QwenTensorParallelBatchMemoryTests.fullHistoryGatherIsOnePromptFramesTransient`
measures both). A prompt step that merges frames
([prompt wavefront](inference.md#qwen-tensor-parallel-prompt-wavefront)) adds
its further frames in flight once to the shared maximum
(`QwenTensorParallelPromptWavefront.inFlightBytes`: 367,001,600 bytes on a 27B
rank at 512-token frames) and keeps at most
`QwenTensorParallelPromptWavefront.sumsInFlight` sums unfinished. Over the
loopback ring (`darkbloom-cluster-tp-check qwen-wavefront`, 4-layer shards at
the 27B's per-rank widths, 11,264-token prompts and a 65,536-token context) a
merged step's peak rose at most 314 MB a rank above one frame's; without that
bound it rose 0.5-1.5 GB. `QwenTensorParallelPromptWavefrontTests.mergedStepTemporariesStayWithinTheirCharge`
checks the term in one process, whose sums complete as they are built. Segment slack and allocator overhead stay charged. Collective scratch prices complete
sealed frames, including authentication overhead, through the existing request
allowance. Media and assistant charges are not hidden in this text quote.

Expand Down Expand Up @@ -1193,7 +1232,10 @@ a rank reserves it ([native context](inference.md#qwen27-tensor-parallel-native-
the shard, two whole host tensors, aligned-read scratch and loading headroom.
The placement and shard assessment add it to the LOAD peak and allocator ask;
resident and request phases are not substitutes for that simultaneous peak.
No native gate or headroom threshold is reduced. Both ranks must fit current
No native gate or headroom threshold is reduced. Initial placement saves the
widest of these widths at which both ranks fit current observations, with
nothing credited ([saved width](inference.md#qwen-tensor-parallel-saved-width)).
Both ranks must fit current
observations before replacement is proposed (crediting at most the running
owner's resident weights on that Mac, and only for a replacement with the same
split) and again after previous ownership releases, with nothing credited. Source-bound metadata and child-launch checks establish budget and
Expand Down
Loading
Loading