Last updated: 2026-11-24
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
understand why a box refuses a load that "should fit"; for the operator view
(RAM tiers → catalog models) see
../provider/hardware-requirements.md.
Ordered logprob events and canonical SSE encoding are transport behavior, not a native capture capability. The inference contract retains mode-specific capture refusal and parser classification limits; no hardware grant is widened by frame association.
The native cross-stream fence ordering uses the same memory reservations and command-buffer limits. Its component tests do not change a model's hardware qualification or usable-memory grant.
Native reasoning token budgets use the existing model admission and native retirement owners. They add no hardware eligibility or memory grant; target-only budget rows can reduce mixed batch chaining, so the feature carries no throughput qualification.
Automatic local cluster batching prices each lane's full registered request
state on each rank, verifies that quote covers the layout's complete layer
state, and retains ordinary shared work, prefill transients, LOAD and headroom
charges. After real concurrent pressure it tries bounded widths 8, 4 and 2 in
that order (8, 6, 4 and 2 for a Qwen TP row), resamples both Macs after old-owner release, and requires the new placement to fit current admissible memory and
GPU working set. Only the read-only preview of a Qwen TP replacement that keeps
the running split credits anything back, and only the running owner's resident
weights; the check after release credits nothing. A retained read-only proposal cannot discount memory or switch to a
smaller width after promising a larger one: failure of that exact fresh quote
uses the existing rollback path. A family without a positive conservative batch
quote is excluded.
See ClusterPlacementBatchScope in
libs/darkbloom-cluster/Sources/DarkbloomClusterPlacement/ClusterPlacementBatchScope.swift
and automatic local cluster batching.
The Bonsai 9B cluster row owns a 3,475,181,460-byte manifest refusal bound and
2,545,600,512 canonical text tensor bytes. Its 202 transform-sign tensors
(4,358,144 bytes) are verified separately; vision tensors remain outside the
text stages. Its F32 state estimate is 754,188,320 bytes at the retained
8,320-token check vector, with the live ceiling derived from admitted context.
These accounting values are not measured process residency or a pair-serving
grant; existing load, request and device reserves still apply. Source:
libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/Qwen/Resources/QwenResidentResourceCeilings.swift
(QwenResidentResourceCeilings) and
libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/Qwen/Metadata/QwenDenseRegisteredSpecification.swift
(QwenDenseRegisteredSpecification).
GPT-OSS cluster KV pages grow with forwarded tokens, while request admission
still charges its whole declared scope. Per-page allocator overhead, gathered
attention views and sliding repack transients are explicit; demand growth does
not waive LOAD or live-memory checks. See
GPT-OSS cluster paged KV and
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.
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
existing per-request live-memory checks. Failed native cleanup still fails the
pair. See QwenBatchCancellation.retire in
libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/Qwen/Batch/QwenBatchCancellation.swift
and the batch lifecycle. CPU lifecycle checks do not
establish hardware memory recovery or multi-lane output equivalence.
A cluster request for a feature its selected runtime does not implement is a
client error, not evidence of insufficient memory. Unsupported token logprobs
return HTTP 400 before reservation. Shared standalone/cluster HTTP metadata
plumbing does not enable capture on unsupported native modes or change memory
allowances; see cluster logprob admission
and DistributedResidentExecutionProfile.refusal in
provider-swift/Sources/ProviderCore/Inference/Distributed/DistributedResidentExecution.swift.
A cluster layout's planning reference is separate from the worker's actual
request limits. Extending either reference axis requires the family's exact
request-state charge; the stored discount slope is never extrapolated upward.
The existing load and live-memory gates remain authoritative. See
cluster request scope accounting
and ClusterPlacementRequestScope.apply in
libs/darkbloom-cluster/Sources/DarkbloomClusterPlacement/ClusterPlacementRequestScope.swift.
The registered Qwen3.5 and Qwen3.6 35B A3B text targets admit two equal tensor-parallel
shares through the same verified source and per-tensor load gate as dense
Qwen. A shard retains replicated routing and shared request allowances; its
budget is not half of the single-Mac process footprint. Qwen3.6 retains its
replicated affine8 routing gates; divided projections remain affine4. Unequal
routed shares remain refused. See the
routed-expert TP mechanism
for the exact geometry and arithmetic, and
libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/Qwen/TensorParallel/QwenTensorParallelVerifiedLoad.swift
(requireSupportedProduct, shareBound).
The unregistered Super builder requires a live pending LOAD lease and preserves
the ordinary fixed-workspace concurrency floor. Synthetic bridge tests must
provide a grant above the minimum KV floor plus recurrent workspace; a small
checkpoint does not waive that policy. Sources:
provider-swift/Sources/ProviderCore/Inference/Engine/Factory/NemotronSuperLocalBridgeBuilder.swift,
provider-swift/Sources/ProviderCore/Inference/Engine/Bridge/EngineV2Bridge+MemoryConcurrency.swift.
The managed Nemotron Super slot
claims, before allocation, the pinned checkpoint's resident installation and
head payloads (73,217,162,760 and 1,769,654,296 bytes), the owner's serving
room and only the part of its load transient beyond that room
(NemotronSuperLoadClaim). The serving room is the 8.5 GiB owner-wide prefill
lane, any prefix bank and NemotronSuperServingPolicy.admissionKVBytes of KV
headroom: 15.7 GiB for eight speculative requests at the served 262,144-token
context (576 MiB of fixed bytes per request, the speculating owner's 9.87 GB of
round work once, and 2 GiB; 11.2 GiB at 65,536 tokens). The transient is the larger of the installation's
staging with its 2 GiB backend allowance (8,903,163,904 bytes) and the head's
construction allowance (7,078,617,184 bytes), never both, because each phase
returns its freed buffers from MLX's cache before the next phase or serving
uses that room; for the default configuration the room is larger, so the
transient adds nothing. Super's LOAD claims keep no OS reserve beyond 3 GiB of
admission slack and its measured 2 GiB activation floor (below), in place of
the provider's 10% load reserve, unless the operator raised memory_reserve_gb
above its 4 GiB default (NemotronSuperLoadFit.systemReserveBytes). Available
memory (what macOS reports) a 128 GB Mac needs: about 104 GiB for the default
owner (eight requests and a prefix bank, about 99 GiB claimed); with less the
load drops the bank (eight requests, 99.0 GiB), then serves four (95.3), two
(90.8) or one (89.3) concurrent request, then one with 1,024-token prompt
chunks (85.6 GiB, NemotronSuperLoadFit.minimumAvailableBytes), so a 128 GB
Mac running other work loads a narrower owner instead of refusing. Super's
pre-accept, eviction and startup preload decide on the claim's own ledger room
(ProviderLoop.nemotronSuperLoadRequirements, loadClaimRemainingBytes), not
on freeForLoadGb: they admit from 85.6 GiB available and evict idle models
toward the widest configuration that evicting them can reach. The discovery
footprint (estimated_memory_gb) is the narrowest configuration's
requirement, 83.6 GiB on every Mac; cold capacity quotes and the coordinator's
cold-load routing, which compare it and the 3 GiB load headroom with
free_for_load_gb (net of the 10% load reserve), admit only from about 99.4
GiB available on 128 GB until the platform adopts a Super-specific rule. The
footprint holds no media, and an image request is
charged its whole reservation (NemotronSuperServingPolicy.mediaChargeBytes,
4.67 GiB for one image: the ingress quote of a 40 MiB body, a 64 Mi-pixel
decode workspace, the encoded body copies, a 13,312-patch image's tokens and
its tower and projector bound; a video's largest, videoMediaChargeBytes, is
4.54 GiB). On 128 GB the default owner's claim and activation reserve leave
13.9 GiB of the cap, so a 16-image request (25.6 GiB of media) does not fit
beside it. A resident slot's media
probe is quoted against the ledger room its reservation is admitted by.
The concurrent media rows (on by default;
images, or one video per request) do not widen that ledger room or discount a
reservation after vision encoding. Each admitted image or video retains its full
media charge until native settlement; overlapping decodes therefore require both
quotes to fit (two videos: at most twice videoMediaChargeBytes). A cancelled or
failed video also keeps its charges until a frame read still decoding on its
reader's queue returns (video decode). The owner's selected
width remains authoritative (NemotronSuperLocalBridgeBuilder.make,
NemotronSuperLocalImageBinding). The single-image measurements below do not
measure concurrent media rows.
At 65,536 tokens the round work would be 4.7 GiB. A dedicated 128 GiB Mac was emulated on the 256 GB
machine at the earlier 65,536-token context (cap, OS-available memory and MLX
limits of the smaller Mac, before the speculating admission split); prompts
beyond about 64K tokens on 128 GB are unmeasured. Eight default requests (two 58K-token prompts,
five short ones and an image) all completed, with a process footprint peak of
91.4 GB against a 123.7 GB cap, and unload and reload passed. Only a 256 GB M3
Ultra is measured on hardware: while the LOAD charge was held MLX active peaked
at 76.7 GB and the process footprint at 79.3 GB, MLX active was 75.0 GB after
load, and at the 65,536-token context claims of 129.6 to 130.7 GB (36 to 37 GiB
of KV headroom, under the earlier claim that also counted the installed
weights until the owner was built) were admitted at some times and refused at
others. The registration gates the model to attested M5 providers with at least
128 GB (M5 Max 128 GB, M5 Ultra) through
required_provider_capabilities: ["apple_m5"] and min_ram_gb 128; a physical
128 GB measurement is still pending. It is in the
registry reference.
Sources: provider-swift/Sources/ProviderCore/Inference/Engine/Factory/NemotronSuperServingPolicy.swift,
provider-swift/Sources/ProviderCore/NemotronSuper/ProviderLoop+NemotronSuper.swift,
scripts/nemotron-qualification/validation-2026-10-15.json.
The provider is Apple-Silicon-only: the SwiftPM platform floor is declared by
the packages described in
components/mlx-swift.md#what-providercore-links,
coordinator/api/install.sh refuses anything but Darwin on arm64, and
darkbloom start requires Metal
(provider-swift/Sources/ProviderCore/Inference/Engine/GPUEnforcement.swift,
requireMetal) and a minimum amount of RAM
(provider-swift/Sources/darkbloom/Start/StartCommand+Preflight.swift,
hardware.memoryGb). There is no hard runtime macOS-version check:
BootSecuritySnapshot.recommendedMacOSMajorVersion only turns
darkbloom doctor yellow below that major version
(provider-swift/Sources/ProviderCore/Security/BootSecurity.swift). The three
values are in Constants. Chip
identity is parsed from the brand string into ChipFamily ∈ {M1, M2,
M3, M4, M5, M6, Unknown} and ChipTier ∈ {Base, Pro, Max, Ultra,
Unknown} (provider-swift/Sources/ProviderCore/Hardware/HardwareDetector.swift,
parseChipIdentity; provider-swift/Sources/ProviderCore/Protocol/Enums.swift).
Weights, KV cache and activations share unified memory, so the provider owns one
byte-level invariant: Σ resident weights + KV + activations ≤ hardCapBytes
(provider-swift/Sources/ProviderCore/Inference/Memory/UnifiedMemoryCap.swift).
Local HTTP Responses also retain host-side JSON. The continuation-history LRU limits its saved histories, while the SDK response-object store has an independent lifetime and no matching eviction. In-flight request copies are outside that history cap. Treat these as application memory when assessing process usage; the history limit is not a native KV grant or a total process bound. Responses continuation and retention owns the limits and their source mappings.
| Symbol | Value | Code |
|---|---|---|
recommendedMacOSMajorVersion |
26 — darkbloom doctor warning threshold only, never a gate |
provider-swift/Sources/ProviderCore/Security/BootSecurity.swift (BootSecuritySnapshot) |
| RAM floor at start | hardware.memoryGb < 8 refuses darkbloom start (8 GB) |
provider-swift/Sources/darkbloom/Start/StartCommand+Preflight.swift |
defaultCapFraction |
0.90 |
UnifiedMemoryCap.swift |
minimumReserveBytes |
2 * 1024 * 1024 * 1024 (2 GiB OS floor) |
UnifiedMemoryCap.swift |
defaultActivationReserveBytes |
11 * 1024 * 1024 * 1024 / 2 = 5.5 GiB (since v0.8.0; basis gemma-4 qat-4bit B=8: 5.05 GiB eager / 5.34 compiled + slack) |
UnifiedMemoryCap.swift |
measuredActivationFloorsBytes |
["gpt-oss-20b": 7 * 1024 * 1024 * 1024 / 2] = 3.5 GiB, ["nvidia-nemotron-3.5-super": 2 * 1024 * 1024 * 1024] = 2 GiB (its requests, prefill lane and media charges hold its activations; the floor is the measured uncharged residue plus slack); exact catalog-id match only; per-model floors since v0.8.16. The gpt-oss-20b floor is max(2.56 GiB eager, 3.20 GiB compiled) B=8 peak over resident plus slack, from the 2026-07-10 M4 Max sweep (libs/mlx-swift-lm/benchmarks/reports/gptoss-20b-mxfp4q8-paged-gate-2026-07-09.md, added in SDK commit d72ce578). That SDK revision still clamped the expert SwiGLU with float32 MLXArray(limit) bounds (introduced in 51ea0c4b, removed in f2eb29b8, SDK #326), so the sweep ran with float32 activations after layer 0. No sweep has re-measured the floor with bf16 activations |
UnifiedMemoryCap.swift |
minimumLoadKVBytes |
1 * 1024 * 1024 * 1024 (1 GiB) |
UnifiedMemoryCap.swift |
memoryOverheadFactor |
1.2 fallback loading allowance; eligible native Qwen4 uses the header-derived copy bound below |
provider-swift/Sources/ProviderCore/Models/ModelScanner+Discovery.swift |
memory_reserve_gb |
operator config reserve (memoryReserveGB); default in ../provider/cli-reference.md#providertoml-keys-read-by-the-cli |
provider-swift/Sources/ProviderCore/Config/ProviderConfig.swift |
MLXMemoryGuard.defaultReserveGB / defaultCacheLimitGB |
6 / 8 (soft MLX limits; cacheFraction = 0.75, minimumLimitBytes 2 GiB) |
provider-swift/Sources/ProviderCore/Inference/Memory/MLXMemoryGuard.swift |
DARKBLOOM_MEM_CAP_FRACTION overrides the cap fraction and
DARKBLOOM_ACTIVATION_RESERVE_GB raises (never lowers) the activation reserve;
DARKBLOOM_MLX_MEMORY_RESERVE_GB and DARKBLOOM_MLX_CACHE_LIMIT_GB feed
MLXMemoryGuard. Parsing rules and defaults:
../reference/configuration.md.
hardCapBytes(physical, fraction)
= min( fraction × physical,
physical > minimumReserveBytes ? physical − minimumReserveBytes : 0 )
activationFloorBytes(forModelIDs ids)
= ids.isEmpty ? defaultActivationReserveBytes
: max over id of (measuredActivationFloorsBytes[id] ?? defaultActivationReserveBytes)
resolvedCapFraction
= explicit (clamped to [0, 1])
→ DARKBLOOM_MEM_CAP_FRACTION if finite and > 0 (clamped to [0, 1]) -- ≤ 0 / non-finite ⇒ unset
→ defaultCapFraction
resolvedActivationReserveBytes(modelIDs)
= explicit
→ floor = activationFloorBytes(modelIDs) (defaultActivationReserveBytes when nil)
DARKBLOOM_ACTIVATION_RESERVE_GB if finite and > 0: max(gb × 2^30, floor) -- raise-only
else floor
loadHeadroomBytes = activations + minimumLoadKVBytes
kvBudgetBytes(physical, Σweights, activations, ramPrefix, configReserve)
effectiveCap = min(hardCapBytes, physical − configReserve)
claimed = Σweights + activations + ramPrefix (saturating)
= effectiveCap > claimed ? effectiveCap − claimed : 0
liveKVHeadroomBytes(physical, mlxUsed, systemAvailable, activations, configReserve)
effectiveCap = min(hardCapBytes, physical − configReserve)
realFree = min(effectiveCap − mlxUsed (clamped ≥ 0), systemAvailable)
= realFree > activations ? realFree − activations : 0
loadReserveBytes(configReserve) = max(configReserve, physical − hardCapBytes)
loadIsServeable(measuredLiveKVHeadroomBytes) = measuredLiveKVHeadroomBytes ≥ minimumLoadKVBytes
ramPrefix is always 0 in production — there is no RAM prefix-cache carve
(prefix-cache.md). The RAM-only tier of memory_only
requests takes nothing from any grant. Each entry is charged to the process
ledger instead (reserveHostBuffers), and is admitted only while a whole
budget of headroom remains beside it. When free system memory bounds the
headroom, an entry's wired pages lower it too, so an entry can cost up to twice
its size in admission headroom. A refused charge that the tier covers releases
its least recently used entries and is retried once
(GlobalKVCacheBudget.yieldMemoryOnlyTier); the tier is also released on
memory pressure, before the Mac sleeps, and before a model load, which counts
it as reclaimable
(RAM-only tier).
Fused causal prompt attention changes the prefill transient, not these
constants. An eligible full-attention prompt chunk takes one .causal SDPA
call instead of 128-query blocks. The fused kernel materializes no scores, so
the route drops the per-block score tensors of MLX's composed path (head_dim
256), the per-block BOOL masks on paged storage and the output concat; it adds
no allocation
(eligibility; usesFusedCausalPrefill in
libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/AttentionV1.swift).
On M5 Ultra, Qwen3.5-9B peak MLX memory at 32,768 prompt tokens fell from
13.86 GB to 12.03 GB because its head_dim 256 layers take the fused kernel.
defaultActivationReserveBytes, measuredActivationFloorsBytes,
minimumLoadKVBytes and the KV slot grants are intentionally unchanged:
- The default reserve is sized from gemma-4, whose layers keep the blocked path. The gpt-oss-20b floor comes from the 2026-07-10 sweep, which ran the blocked path; the fused route only removes allocations from that path, so the floor stays an upper bound. The Nemotron Super floor is the residue its request and prefill-lane charges do not hold, not a prompt-attention transient. No floor has been re-measured on the fused route, and a lower floor needs a new measurement.
DARKBLOOM_TTFT_FUSED_CAUSAL_PREFILL=0restores the blocked path that the 2026-07-10 sweep ran.- K/V layout and dtype do not change, so KV bytes per token, slot grants and
advertised capacity do not change. A lower live transient shows up only
through
liveKVHeadroomBytes, which reads real MLXactive + cache.
The Gemma 4 native dispatch change fuses the dense GeGLU product and sets no command-buffer limit of its own; the decode limits in force are the operation-count policy. The provider's OS reserve, activation floor, LOAD quotation, KV grants, admission and memory-pressure safeguards remain unchanged.
The linked endpoint screen, whose candidate also carried an earlier scoped
command-buffer limit (operations: 100, megabytes: 512), measured repeat RSS of about 16.269 GiB for the
candidate and 16.266 GiB for the baseline. The first candidate leg's lifetime
physical-footprint peak included a cold prewarm and reached 20.06 GiB, versus
17.54 GiB in the later warmed candidate leg. This is not a matched warm peak-memory
comparison, and the endpoint did not expose MLX allocator peak. These results
do not qualify lower reserves, higher admission limits, other chipsets or
clustered execution.
The compiled feed-forward path
retains live parameter arrays and child-module identities for eligible traces.
Its weak owner reference avoids retaining the decoder; replaced or unsupported
children retire an old trace, and trace destruction occurs outside the holder
lock to preserve MLX evaluation-lock ordering. Source:
libs/mlx-swift-lm/Libraries/MLXLLM/Models/Gemma4CompiledFeedforward.swift
(Gemma4CompiledFeedforwardCache).
The linked incremental endpoint comparison measured first-leg process lifetime physical-footprint maxima of about 20.05 GiB for the prior dispatch path and 20.07 GiB with compiled feed-forward; later warmed legs measured 17.53 and 17.56 GiB respectively. These include loading and prewarm, are not isolated feed-forward or MLX allocator peaks, and establish no memory reduction. Provider reserves, activation floors, LOAD quotations, KV grants and admission limits remain unchanged; the bounded decode result does not qualify increasing them.
The row-mapped prefill route keeps
original activations, assignment maps and live expert arrays as graph inputs.
It avoids the expanded sorted token tensor for the two gate/up products while
retaining separate output arrays and the existing down/reduction graph. The
helper adds no persistent parameter identity cache or copied expert bank.
The guarded route is enabled by default; the
exact 0 rollback
restores the original graph without changing hardware or admission eligibility.
Sources: libs/mlx-swift-lm/Libraries/MLXLMCommon/Gemma4RowMappedNAX.swift
(tryPair) and
libs/mlx-swift-lm/Libraries/MLXLMCommon/Gemma4RowMappedNAXKernel.swift (pair).
Native checks cover live parameters, dropped wrappers, asynchronous evaluation, subset outputs and fixed full-model KV/frontier parity. They do not establish a lower peak allocation or a general workload memory bound. The endpoint reports process residency/footprint rather than MLX allocator peak, and lifetime peaks include loading and earlier requests. The bounded cold-TTFT result therefore does not qualify reducing reserves, activation floors or LOAD quotations, or increasing KV grants and admission limits. Those policies remain unchanged. Devices without NAX support retain the existing path; other devices and clustering require separate qualification.
GLM sparse KV sizing uses the native asymmetric FP32 payload: each storage
layer charges (headDim + valueHeadDim) * kvHeads * 4 bytes per token, not the
generic symmetric FP16 estimate. KDA remains a separate fixed request charge
including the engine's three-generation reservation; it is neither a weight nor
a marginal KV token charge
(provider-swift/Sources/ProviderCore/Inference/Models/GLM5Next/GLM5NextLoadFunnel.swift,
GLM5NextLoadFunnel.kvBytesPerToken).
GLM-5.3-Flash loads only on Apple M5 Max or M5 Ultra with at least 256 GiB
(GLM5NextHardwareRequirement, runtime capability glm5_next_v1). Its
native integration prices the raw source
bytes plus native construction/tokenizer transients
(provider-swift/Sources/ProviderCore/Inference/Models/GLM5Next/GLM5NextLoadAdmission.swift,
GLM5NextLoadQuotation). Activation reserve and minimum KV headroom remain
unchanged. The activated expert count is not a resident-weight estimate.
Standing GLM wired residency is optional only when disabled or unsupported
before ticket creation (macOS 15 or later with Metal 3 support). A backend
start/end fault is unproven application or restoration, not unsupported
hardware: the provider retains the actual owner and policy entry and refuses
GLM publication or clean retirement until restart. Pending operations are joined
before settlement; no timeout or cancellation is restoration proof
(GLM5NextWiredResidency, GLM5NextNativeOperationOwner).
GLM's KV grant fills the cap, so at full KV its GPU use is the whole cap, about
247 GB on a 256 GB M5 Ultra. The macOS default GPU wired-memory limit there is
smaller, and Metal command buffers past it fail with "Insufficient Memory".
The provider neither lowers the cap nor changes admission for this; doctor,
start and failure logs give the operator the
sysctl values instead
(provider-swift/Sources/ProviderCore/Diagnostics/GLM5NextWiredLimit.swift,
GLM5NextWiredLimit).
Two 128 GB Macs (two M5 Max) serve GLM-5.3-Flash as a pipeline. A serving
rank reserves no request at LOAD
(GLM pair admission): it loads on its weights
and what only loading holds, and admits each request when it arrives. Figures
for the most balanced cut (24), from the worker's quotes on the registered
artifact's headers (GLM5NextResidentResourceEnvelope.quote,
budget(descriptor:contextTokens:)), not measured peaks:
| Rank 0 | Rank 1 | |
|---|---|---|
| Weights at their allocator bounds | 89.65 GB | 89.17 GB |
| What only loading holds (construction copies, read buffers, metadata) | 7.68 GB | 6.71 GB |
| Load peak, which must fit the GPU's working set | 97.34 GB | 95.87 GB |
| A 65,536-token request (KDA chunk state, the 5.5 GiB activation floor, DSA histories; rank 1 also a chunk's logits) | 22.37 GB | 22.83 GB |
| Weights and that request together | 112.02 GB | 111.99 GB |
The GPU's working set is 107.52 GiB (115.45 GB) on an M5 Max 128 GB by
default. Both columns fit it, with about 3.4 GB to spare beside a full request.
Raising the GPU limit to the Mac's memory less 16 GiB, 112 GiB (120.26 GB),
with darkbloom cluster gpu-limit
leaves room for prompt prefixes and MLX's buffers and admits cuts 23 to 25.
The plan places the same way (ClusterModelLayout.requestsOnArrival). At
cut 24 rank 0 needs 103.24 GB admissible to load (it needed 129.06 GB when the
plan reserved the request), and the plan reports the longest context each
rank admits now beside its weights. A request that does not fit then is
refused at reservation. Requests use the host memory gate's floor and
headroom, the allocator limit and the GPU's working set beside the loaded
stage.
Tensor parallel still does not fit: each rank's load gate asks for about 153 GB
beside its headroom, more than the Mac's 128 GiB. That is its shard (88.7 GB),
the NextN layer (4.2 GB), the request charge at 65,536 tokens (56.1 GB) and
the freed-buffer cache (GLM5NextTensorParallelLoadMetadata). It still
reserves its request at LOAD.
GLM5NextConstructionOwner retains actual partial-load roots before evaluation.
GLM5NextArtifactLoadRoots retires individual expert sources only after the
packed bank's checked evaluation, then retains completed modules instead of a
parallel weight dictionary. A failed cleanup fence retains these roots, the
pending permit, writer ownership and activity; it is not permission to clear
the allocator cache or regrow survivor grants. The owner and native reader live
in provider-swift/Sources/ProviderCore/Inference/Models/GLM5Next/GLM5NextConstructionOwner.swift
and libs/mlx-swift-lm/Libraries/MLXLLM/Models/GLM5NextArtifactLoader.swift.
The raw same-directory discovery quotation
now carries that complete allowance into scanner-based memory consumers.
ModelScanner.glm5NextLoadEstimate refuses malformed profiles instead of
falling back to the generic disk × 1.2, and prices only the tokenizer shipped in
the snapshot. It remains a metadata
bound, not native validation, a hardware qualification or permission to bypass
the actual managed-load reservation and post-load guards.
defaultLoadHeadroomGb = loadHeadroomBytes() / 2^30
-- defaultActivationReserveBytes + minimumLoadKVBytes by default;
-- measuredActivationFloorsBytes["gpt-oss-20b"] + minimumLoadKVBytes for a gpt-oss-20b-only serving set
systemAvailable (SystemMemory.availableBytes, default `reclaimable` policy; pages × page size)
= max(free_count + inactive_count,
(free_count − speculative_count) + external_page_count + purgeable_count)
-- never below free + inactive; the second measure counts page cache (speculative
-- read-ahead once) and volatile purgeable pages, never anonymous or compressor
-- pages; `free-only` = free_count
freeForLoadGb(total, systemAvailable, gpuActive, gpuCache, reserve, outstanding)
mlxUsed = gpuActive + gpuCache
realFree = min(total − mlxUsed, systemAvailable)
committed = reserve + outstanding
= max(0, realFree − committed) / 2^30 -- no multiplicative discount
maxLoadableWeightGb(total, systemAvailable, mlxUsed, reserve, headroomGb, outstanding)
reclaimable = min(total, systemAvailable + mlxUsed)
usable = reclaimable − (reserve + outstanding)
= max(0, usable / 2^30 − max(0, headroomGb))
requiredToLoadGb(weightsGb, headroomGb) = max(0, weightsGb) + max(0, headroomGb)
evictionCanReach(available, reclaimable, required) = available + reclaimable ≥ required
fitsAtAllocation(availableNetOfLedger, ownReservation, required) = availableNetOfLedger + ownReservation / 2^30 ≥ required
canLoad(...) = requiredToLoadGb ≤ freeForLoadGb
weightsGb is the scanner's loading estimate, not bare steady residency.
Ordinary models retain sizeBytes / 2^30 × memoryOverheadFactor. Eligible native
Qwen4 with SSD PLE offload uses all non-offloaded weight bytes plus
Qwen4ExpLoadFootprint.estimate's bound: the larger of one complete shard or
the largest target gate/up copy plus complete vision/assistant copies and
page-rounding allowance, then 1 GiB for loader metadata/small objects. Complete
index/header coverage, bounded headers and native non-FP16 layouts are required;
unknown layouts retain ordinary padding. Every load still adds
activationReserve + minimumLoadKVBytes and passes the same real-OS clamp and
atomic pending-load permit.
Native declarations are revalidated after hashing/hooks and before allocation;
changed geometry or an obsolete smaller allowance fails closed and requires a
rescan rather than loading against stale accounting. The worked
example in the source comment
(provider-swift/Sources/ProviderCore/Inference/Memory/ModelLoadAdmission.swift)
shows gpt-oss-20b's requirement falling by exactly defaultActivationReserveBytes − measuredActivationFloorsBytes["gpt-oss-20b"] once its measured floor
applies. There is no × 3.0 headroom rule anywhere in the load path.
After an owned Qwen4 retirement, the provider and standalone loader can recheck
insufficient real headroom every 25 ms for at most two seconds from retirement
(NativeMemoryRetirementWindow). A load that already fits proceeds immediately;
cancellation interrupts the wait. Zero MLX/Metal allocation counters do not
prove macOS has reclaimed physical pages. This window grants no memory credit,
does not extend on each retry and does not bypass the final atomic load permit.
An unresolved shortage still fails normally.
flowchart TD
A[load_model / preload] --> B[requiredGb = requiredToLoadGb · available = freeForLoadGb with loadReserveBytes]
B --> C{available ≥ requiredGb?}
C -- no, idle slots exist --> D{evictionCanReach?}
D -- no --> R1[refuse: modelLoadFailed]
D -- yes --> E[first pass: release retained KV segments, drop reclaimable cache, re-check without retained credit; then evict idle slot, re-check]
C -- no, nothing evictable --> F[release retained KV segments, drop reclaimable cache, re-measure once]
F --> C
C -- yes --> P{claimPendingLoad: atomic target + assistant + setup allowance}
P -- optional assistant cannot fit --> T[retry target-only claim once]
P -- accepted --> Q[hash and prepare; recheckPendingLoad before allocation]
T -- accepted --> Q
P -- refused --> R1
T -- refused --> R1
Q -- refused --> R1
Q -- accepted --> G[load weights; reduce typed claim as phases finish; build slot]
G --> H{KVHeadroomProbe.hasServeableKVHeadroom ≥ minimumLoadKVBytes?}
H -- no --> R2[unload, refuse: modelLoadFailed]
H -- yes --> I[EngineV2Reslice grants; install slot; finishPendingLoad]
(provider-swift/Sources/ProviderCore/ProviderLoop+ModelLoading.swift; the
standalone server runs the same sequence in
provider-swift/Sources/ProviderCore/Server/StandaloneServer.swift.)
Coordinator requests reach the pre-accept check (fastAdmissionReject) in
work-FIFO order. An accepted request whose model is not resident releases the
FIFO while it waits for its load (releaseWorkFIFO in
provider-swift/Sources/ProviderCore/ProviderLoop+WorkFIFO.swift), so later
requests can reach the check while that load runs. The check sees a load's
memory only once the load holds its pending-load claim, so a request for another
model that is not resident first waits for released loads of other models
(awaitReleasedLoads). A request for the model being loaded that the check
rejects, because the load's claim already holds the memory the check sized for
a second copy, waits for that load and is checked again. Requests for resident
models overtake; one for an idle resident model can keep a slot the released
load would have evicted, and that load then fails this gate after acceptance.
The gate, pending-load claims and eviction still decide every load. Native MiMo
keeps the serial FIFO, and DARKBLOOM_TTFT_COLD_LOAD_RELEASE=0 restores it for
every model.
An unexpired Autopilot placement hold removes its slot from every eviction
snapshot (ProviderLoop.evictableModelSlots), and free_for_load_gb gives the
held weights no reclaim credit (ProviderLoop.autopilotHeldWeightBytes). A load
that fits only by evicting a held slot fails with the ordinary slot or
insufficient-memory refusal; see Autopilot placements.
ProviderLoop.evictionExclusions is the one definition of what an eviction
snapshot skips: an Autopilot pin while Autopilot protects pins, an unexpired
hold, requests in flight, a local request or self-test, an unloading slot and a
retained MTP upgrade target. When a load that may evict (not startup preload, an
Autopilot operation's target or a revision update, which pass
allowEviction: false) is refused at the slot cap or by the eviction gate
(ProviderLoop.evictUntilAvailable, evictUntilNemotronSuperFits) while any
resident model is excluded, the refusal ends with Not evictable: and, for each
excluded model, its resident GB and every reason (with the hold's UTC expiry,
and whether Autopilot adopted it outside the selected models). A refusal that
found no candidate says all loaded models are actively serving only when each
of them is serving work, and no loaded model can be evicted otherwise. The
daemon state publishes the same exclusions (eviction_exclusions) and the
ordinary serving selection (serving_selection) for darkbloom status.
Selected-model recovery (ProviderLoop+SelectedModelRecovery.swift) retries
the models the operator chose explicitly (enabled_models, preload_models,
the pinned model, Autopilot's persisted selection) that memory, not the
operator, kept out: the startup preload's candidates it skipped or that failed
for memory, or that a slot cap left untried, and the selected models an
Autopilot operation unloaded to load another model, queued as each leaves
residency, whether the operation then succeeds or fails
(noteSelectedModelUnloaded; an unload-only operation queues nothing). Before
it, nothing retried them, and the coordinator cold-routes a model only to an
idle machine. The capacity tick
checks a waiting model when it is due: after 30 s, then 1, 2, 5 and every 10
minutes, at once after any unload or a configuration change the running daemon
reads (the saved enabled_models or Autopilot settings), and sooner when what
blocked it ends first (a hold's expiry plus the idle threshold, an idle
threshold, a minimum dwell or a per-model lease). A check plans on the same
figures as the load gate (Super's LOAD-claim room against its narrowest
configuration, otherwise usable load memory against weights plus headroom) and
loads with allowEviction: false. Before the load it may unload only resident
models whose weights make the room, least recently used first, that have no
evictionExclusions entry and that isProtectedFromRecoveryEviction does not
keep: never the ordinary selection, an Autopilot pin, or an advertised model a
request could load straight back (autopilotAllowsModel), which would then
evict the recovered model in turn. A candidate that still serves must also meet
Autopilot's own victim rules (selectedModelRecoveryVictimWait): resident for
min_dwell_seconds, no unexpired per-model lease, and idle, from its last
request or its hold's expiry, for the longer of two minutes
(SelectedModelRecovery.victimMinimumIdle) and min_idle_seconds. The attempt
rechecks each victim against the plan's instant right before its unload. It
never evicts a selected model, so it cannot churn against the operator's own
models. It waits while a live Autopilot lease or a pause manages residency,
while the owner uses the Mac under me first (ownerPausesPublic), and during
any load, unload, operation, switch, startup preload or drain. The attempt
rechecks these before each unload and again before the load, so one that
begins while the last victim unloads stops the load. A
refusal for memory, a slot or a transient state keeps the model waiting; any
other load failure ends its recovery and leaves the model to the request path.
A memory refusal that comes after the weights loaded (the post-load KV headroom
guard, the re-slice checks, MiMo's grant) costs a whole load each time, so
after three of them (SelectedModelRecovery.postLoadRefusalLimit, a policy
value), counted since the model was queued or last made due by an unload or a
configuration change, it is checked again only after one of those.
Victims are evicted before the load's own checks run, so a load that then fails
for another reason (missing files, an unpinned checkpoint) has still evicted
them; that failure ends the model's recovery, so it costs at most one attempt's
evictions. The daemon state reports each waiting model, its next check (none
while it waits for an unload or a configuration change) and the last blocker
(selected_model_recovery). The queue lives in memory: a restart rebuilds it
from the startup preload only, so with startup_preload = false, or a
nonempty preload_models that omits a model, a model that waited before the
restart is not queued again and loads on request.
The prompt token store (PromptPieceTokenStore in
provider-swift/Sources/ProviderCore/Inference/Prompting/PromptTokenCache.swift)
is ordinary process heap with no claim or reserve in this gate: at most
DARKBLOOM_TTFT_PROMPT_CACHE_MB (default 32 << 20 bytes) per loaded
tokenizer, plus one piece. Like other process heap, it reaches the gate only
through the measured free memory.
KVHeadroomProbe.measuredLiveKVHeadroomBytes(after trimming the cold-load buffer cache) must satisfyloadIsServeable(≥minimumLoadKVBytes) or the model is unloaded and the load rejected (provider-swift/Sources/ProviderCore/Inference/Memory/KVHeadroomProbe.swift).EngineV2KVSizingandEngineV2Resliceassign the admitted KV slot grants. A paged build must also expose a backend ceiling at leastminimumLoadKVBytes; empty segmented storage can satisfy this without allocating pages (KVHeadroomProbe.postBuildServeable).- Before publication,
EngineV2SlotFactory.makeProductionBundlechecks that an ordinary fixed-workspace bridge has nonzero serving width. A refused newcomer is shut down before its slot escapes; native publication remains owned by its existing transaction. This does not replace the measured headroom checks. - For contiguous slots, the bridge reserves
prompt + maxTokensbytes inGlobalKVCacheBudgetbefore submit (inference.md). When that reservation is refused for a request on this Mac's local API, the request waits for running requests to release theirs only whileGlobalKVCacheBudget.holdsOnceRequestsReleasesays it would fit once every request reservation is released (loads and other charges are not counted as freeable); otherwise it is refused at once as larger than the Mac holds (EngineV2Bridge+OwnerMemoryWait.swift). - A text request's prompt rendering and tokenization hold one share of the
whole-Mac service allowance (
WholeMacServiceBudget.acquirePreparation), so a full Mac refuses a request as capacity before preparing its prompt and concurrent preparation counts against the serving width. Submission takes the share over as the request's allowance. - Reservation age is diagnostic only.
GlobalKVCacheBudget.recordCommitRejectionlogs sustained rejection and keeps every owner's charge until the caller releases it after its resources retire. The asynchronous allocator-cache reclaimer remains separate; it cannot refund live request or load ownership. Its proactive sweep (buffer cache ≥ 2 GiB) flushes only after 5 s of whole-Mac idleness or when the cache crowds out admission headroom (KVPoolReclaimer.proactiveWindow). The idle flush rechecks idleness and clears insideWholeMacServiceBudget.performIfIdle: a request admitted first cancels the clear without spending the reclaim rate limit, and one arriving during it is admitted afterwards. Every shortfall reclaim or pressure sweep also asks paged pools to drop retained free KV segments, even when it does not flush. Refused charges that bypass request reservations (paged engine growth, native MiMo media work) signal that reclaim while either the idle sweep or segment retention is on (GlobalKVCacheBudget.directChargeRefusalSignal). Their shortfall is exactly what usage must fall by for the refused charge to fit, including commitment debt and usage already inside the reserve; MiMo's extra OS reserve narrows only the system side, not the cap (provider-swift/Sources/ProviderCore/Inference/Memory/ProcessMemoryLedger.swift,ProcessMemoryLedger.capacityShortfall). Retained segments (CBv2RetainedKVSegments.retainedBytes) are allocator-active memory that only a release request returns, at each engine's next step. The load gates (ProviderLoop.evictUntilAvailable,ProviderLoop.evictUntilNemotronSuperFits,StandaloneServer.ensureMemoryHeadroomForLoad) release them and drop the buffer cache once (releaseReclaimableMemoryForLoad, which waits up to 250 ms) before they evict or refuse, andStartupPreloaderdoes the same before it skips a candidate (reclaimBeforeSkip). Eviction feasibility counts them only to decide whether that release could make room (when not even they and every idle model could, the gate refuses without releasing); after it, only the memory sample shows what returned, and segments still parked (a step that outlasted the wait, or segments parked since) are no eviction credit (ProviderLoop.reclaimableMemoryBytes). Pre-accept (ProviderLoop.fastAdmissionReject,ProviderLoop.nemotronSuperLoadIsCertainToFail) releases and resamples the same way when nothing is idle or only they could close the gap. The post-load headroom guard above re-measures after its cache flush without releasing them: that backing was already counted as used when the gate admitted the load. MLXMemoryGuard.recommendedLimits:limit = max(minimumLimitBytes, physical − reserve),cacheLimit = min(max(minimumLimitBytes / 2, min(limit × 0.75, cacheCap)), limit)— soft MLX guidelines only; the cap above is what refuses work.
For exact mimo_v2, ProviderLoop.promptTokenFloor restores captured original
tool schemas before the shared native tokenization path. The floor therefore
counts the schema rendered by serving rather than the model-blind normalized
schema (provider-swift/Sources/ProviderCore/ProviderLoop+InboundDecode.swift).
This changes prompt-count correctness, not the load allowance, activation
reserve, KV byte rate or ownership gates below. See the
native MiMo prompt contract.
The fleet KV budget is the effective unified-memory cap minus all resident
SlotSizingSnapshot.weightsBytes, the resolved serving-set activation reserve,
and any explicit RAM prefix allowance. weightsBytes sums loaded target
parameter bytes and retained assistant weights; the scanner's disk-size padding
belongs to load admission, not this runtime grant. Default SSD streaming has no
resident prefix-bank carve (UnifiedMemoryCap.kvBudgetBytes,
provider-swift/Sources/ProviderCore/Inference/Memory/SlotSizingSnapshot.swift).
Before a looped Inkling 2 Mini checkpoint loads, its pre-load rate counts one
cache slot per layer application, not one per stored layer: 48 slots, of which
the 8 full-attention slots grow 32,768 fp16 bytes per token, while its 40
sliding slots plateau at their 1024-token window and each sequence carries
short-convolution state (3,833,856 bytes in FP32, half that in BF16)
(provider-swift/Sources/ProviderCore/Inference/Memory/KVEstimation.swift,
parseModelArchitecture; provider-swift/Sources/ProviderCoreFoundation/Inkling2ModelIdentity.swift,
CacheLayout; contract reference).
One model slot receives the full fleet KV budget. With multiple slots,
EngineV2KVSizing.resliceGrants divides it in proportion to each model's fp16
owning-full-attention marginal byte rate times context, capped by
resliceContextCap = 131_072. If any rate is unknown, all slots receive an equal split. Those fairness
weights do not choose KV precision: native admission separately accounts for the
observed per-layer dtype, window rings, recurrent state and configured MTP state
(provider-swift/Sources/ProviderCore/Inference/Memory/EngineV2Reslice.swift).
A request reserves its prompt plus its max_tokens from that grant when it is
submitted. A request that names no max_tokens reserves the 32,768-token default
(SlotSizingSnapshot.defaultOutputTokens, as on a pair) cut to the window its
prompt leaves, so the default never needs more than the model's context. Every
single-Mac slot holds every request to its window (EngineV2Bridge.modelWindowTokens:
its advertised context, else its model's): a prompt that fills it is refused as
context_length_exceeded, and a max_tokens beyond what the prompt leaves is
cut to it before the reservation
(provider-swift/Sources/ProviderCore/Inference/Engine/Bridge/EngineV2Bridge+Translation.swift).
A request the grant can't hold now is refused for capacity before any stream
exists: on a contiguous slot by the shared reservation, on a paged slot by the
engine's own admission (one that can never fit; the rest queue). This Mac's API
answers it with 503, before any SSE header, streamed or not, and words that name
this Mac's memory and what to change
(provider-swift/Sources/ProviderCore/Server/StandaloneServer+HTTP.swift). A
request that queued and then wasn't admitted (the 120 s admission lease, or a
paged pool full through its requeues) gets the same 503: a streamed request's
head waits until the engine admits it
(provider-swift/Sources/ProviderCore/Inference/Engine/Bridge/EngineV2Bridge+HeadHold.swift).
Loads and serving-set reserve raises must preserve each resident bridge's total
minimumServiceableGrantBytes
(provider-swift/Sources/ProviderCore/Inference/Engine/Bridge/EngineV2Bridge+MemoryConcurrency.swift).
For ordinary fixed-workspace engines this includes one request's fixed and
auxiliary allocation overhead, minimum KV, the actual watermark and live fixed
external reserve. EngineV2Factory.ProductionBuild.admissionWatermarkFraction
comes from the same immutable AdmissionV2.Config passed to the engine, not a
guessed ratio between current raw and admissible capacity. The native MiMo floor
retains its validated admission policy; stateless engines keep the base floor.
Unknown or saturated policy evidence and a fixed pool that cannot meet the floor
fail closed. resliceMeetsServiceabilityFloor rejects the unattainable Int.max
sentinel rather than accepting it as a usable grant.
Every re-slice passes those floors to resliceGrants; a newcomer, whose engine
does not exist yet, has only the base minimumServiceableGrantBytes. When the
proportional split already gives each slot at least its floor, that split is the
result. Otherwise, if the floors sum to no more than the budget, each slot
receives its floor plus its weighted share of the rest; if they do not, the
proportional split stands and resliceMeetsServiceabilityFloor refuses the load
or reserve raise. Regrowth after an unload or rollback uses the same floors, so
it never shrinks a slot below its floor. Without this, a slot with a small KV
rate and a fixed per-request workspace, such as nvidia-nemotron-3.5-lightning
with its embedded assistant, falls below its floor beside high-rate models even
when every floor fits (EngineV2KVSizing.resliceGrants,
ProviderLoop.resliceAndBuildEngineV2Bundle, ProviderLoop.resliceGrowSurvivorsLocked).
A newcomer's own floor is checked only when its engine is assembled, so such a
model loaded last can still receive less than its floor and fail with
no_kv_headroom (EngineV2Bridge.requireServiceableOrdinaryGrant).
A private hybrid-cache carve is added once to the engine floor. The bridge
retains the total requested grant for exact rollback instead of feeding an
already-carved engine grant back through the carve. Physically retained cache
bytes can still exceed a reduced logical target and remain accounted
(EngineV2Bridge.resliceAdmissionBytesClaim, slotKVBytesClaim,
provider-swift/Sources/ProviderCore/Inference/Engine/Bridge/EngineV2Bridge+PrefixCache.swift).
The production paged factory passes that admitted grant to empty segmented
storage. makeSegmentedPagedBackend retains the native dtype/owner map,
scheduler chunk geometry and context. Its segmentSizeBytes = 64 << 20 is an
allocation target, not a slot-capacity ceiling. Native checks still bound each
Metal buffer, kernel page indices and arithmetic. The former provider eager-pool
limits do not cap this path
(provider-swift/Sources/ProviderCore/Inference/Engine/Factory/EngineV2Factory+SegmentedBackend.swift;
libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/Paged/PagedKVPool.swift).
A co-resident load shrinks existing grants before building the newcomer. Live
pages, request promises and staging owners remain charged until their real
retirement; shrink does not free them. Existing physical capacity can be reused,
but a slot already above its grant cannot increase its native charge. Unload or
rollback restores the surviving slots' shares, and segmented storage can grow
under the new grant without rebuilding the engine. New backing is reserved
through process ownership before allocation. The bridge
forwards a resize when native capacity.pagedStorage is present; only explicit
fixed-reference native fixtures retain a construction-capacity clamp and
pagedPoolResizeShortfall()
(provider-swift/Sources/ProviderCore/Inference/Engine/Bridge/EngineV2Bridge+Resizing.swift;
libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/EngineV2.swift,
updateKVBytesCapacity).
| Native capacity field | Meaning |
|---|---|
kvBytesCapacity |
Runtime admission ceiling, including target and auxiliary request state |
kvBytesBackendCapacity |
Mutable backend grant for segmented/contiguous storage; physical capacity only for a fixed-reference pool |
pagedStorage.committedBytes |
Allocator-backed segmented residency, which can temporarily exceed a shrunk grant |
pagedStorage.overGrantBytes |
Committed backing above the current grant; ownership still has to retire |
These fields are defined by
libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/CBv2Contracts.swift
(CBv2CapacitySnapshot) and Paged/PagedKVGrant.swift
(PagedKVStorageSnapshot). A logical grant does not waive the post-load
serviceability floor or later shared OS/activation headroom checks.
GlobalKVCacheBudget keeps policy, request/load correlation and diagnostics.
ProcessMemoryLedger serializes byte admission; typed pending-load handles
prevent delayed cleanup from releasing a newer load with the same string ID.
A load retains its setup allowance through final slot installation. Completed
weight phases reduce their promise because the coherent allocator reading now
includes those weights; process-wide before/after differences never create
materialization credit.
For each native engine connected through EngineProcessMemoryOwner, Admission
publishes C = max(P, N) + A + X: native segment commitments, active target KV
promises, auxiliary state and temporary stages. New promises are accepted before
allocation or native metadata changes. Only evaluated backing with an explicit
owner earns materialized coverage M, with 0 ≤ M ≤ C. The process projects
U + Σ(C − M), where U is one coherent active-plus-cache reading, under the
existing cap, OS-availability and activation-reserve policy. It never subtracts
one engine's pages from another engine's promise.
A paged segment's shared backing carries one coverage handle through checkpoint
rebasing. Withdrawal precedes buffer/alias retirement and charge reduction;
retained raw aliases remain charged through U. Closing blocks new growth while
allowing already reserved allocations and mandatory cleanup. No destructor or
age threshold returns live byte promises. Allocator initialization runs before
the ledger lock and before a native Admission can call the provider adapter.
The production factory binds an empty segmented paged pool to this owner before
constructing EngineV2. Its bridge skips duplicate per-request reservations;
contiguous slots retain their existing provider reservation path. Recurrent and
MTP auxiliary state stays charged without materialization credit. Current load
and provider headroom readers use the same shared ledger.
An admitted MTP context is bound to one request generation. Both ordinary
release and native reservation detachment retire that context immediately;
reusing the request ID cannot revive it. Target retirement and outstanding
assistant allocation leases then release their separate portions of the
original prepaid charge, in either order
(libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/AdmissionV2.swift,
detachReservation, and
libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/MTP/AdmittedMTPBinding.swift).
Native segmented allocation reserves an allocator-owned upper bound for each
new backing before construction, including rounding and permitted cached-buffer
reuse. After evaluating and draining the captured allocation stream, the fresh
full-buffer owner records actual allocator bytes. Growth and staged adoption
settle their provisional charge downward to that footprint while preserving the
full request promise and rollback identity. Logical page counts, offsets and
usable slack remain separate from allocator padding. Metadata read through a
view never creates another materialization credit.
The bound covers one buffer. Complete checkpoint capture/import separately
prices zero-fill intermediates, retained recurrent backing, MTP state and
metadata. A provider-staged import builds each destination, paged segment and
recent row from a zeroed host buffer of that array's size, one at a time; the
buffer is resident outside the MLX allocator while it is copied, so the import
plan charges the largest one as stage scratch
(libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/Prefix/CheckpointHostZeros.swift
(MLXArray.cbv2HostZeros),
libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/Prefix/CompleteCheckpointImportPlan.swift
(CBv2CompleteCheckpointImportPlan.scratchBytes)). Shared SSD reads and writes claim bounded host buffers before I/O or
encoding; native destinations remain under Admission. Host buffers drain before
their permit returns. Native owners retain completion and retirement barriers;
allocator-active aliases remain visible in U after their coverage retires. Physical
backing is measured once per owned buffer, while logical page geometry remains distinct
from allocator padding. Exact-model capacity and latency remain separate from
allocator foundation tests.
Implementation: libs/mlx-swift/Source/MLX/AllocationFootprint.swift
(allocationFootprintUpperBound, evaluatedBufferInfo) and
libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/Paged/PagedKVSegments.swift
(PagedKVSegmentLayout.allocationBytes, PagedKVSegmentBacking).
Implementation: provider-swift/Sources/ProviderCore/Inference/Memory/ProcessMemoryLedger.swift
(replaceCharge, recordMaterialization, withdrawCoverage),
GlobalKVCacheBudget+PendingLoads.swift (claimPendingLoad, recheckPendingLoad),
EngineProcessMemoryOwner.swift, and
libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/AdmissionV2.swift.
Automatic startup calibration uses the loaded engine's existing KV and service budgets. It does not lower activation or OS reserves, raise concurrency limits, or create a separate memory allowance. Only one calibration session runs on the Mac at a time. After an uncancelled session retires, the next eligible resident engine can start without waiting for a capacity tick. Ordinary and native MiMo loads offer their new engine first when that owner is available. The completed construction activity ends before that handoff, but the load-transition gate remains closed until the scheduling attempt returns. Slot identity, shutdown and native-owner checks precede waking parked load requests. Once completed publication reaches this handoff, cancelling its caller does not fail the already resident slot.
A customer request takes a foreground lease, cancels any current calibration,
and waits for its actual retirement before admission. A consumer terminal event
alone does not release the probe's ownership: the bridge waits for the event
pump and service reservation to retire. Shutdown follows the same ownership
boundary. Retirement releases request ownership; it is not a claim that the
allocator has returned every cached physical byte to the OS. Original request
deadlines and memory admission remain authoritative during this wait. The wait
ends early when the request is cancelled, and at retirementBound (30 s) with a
retriable capacity refusal (admitForeground). Neither admits anything beside
the unretired probe, and the slot reads crashed until that probe retires.
The one-token startup health check is excluded from throughput learning, while its work accounting remains intact. Bounded calibration samples populate the existing capacity measurements and never increment served-request or output token totals. The detailed probe plan and retry/posture gates are documented in model startup calibration. These are provider-local changes; capacity wire fields and the external platform's memory contract are unchanged. Calibration observations are staged per cell and published only after all requests retire and the completion posture check passes. A cancelled or non-nominal cell discards those observations and remains retryable; valid earlier measurements and independently published serving evidence survive. The excluded shape warmup that precedes the startup cells uses the same session, idle gate and foreground lease, within the same KV and service budgets; only its startup-preload pass skips the posture check, because it measures nothing. Its probes and cells publish no observations or work totals. While any such session runs, the periodic proactive MLX pool sweep waits: its flush is device work that cancels the session, so a warmup cell longer than the tick could never finish. A sweep signalled just before a session started checks again when it runs. On-pressure reclaims still run.
Without a reviewed profile the automatic engine width is the legacy default 4
on every chip except M5 Pro, Max and Ultra, where models on the native auto
paged allowlist start at the legacy ceiling 8
(ServingPerformanceProfiles.automaticConcurrency; chip identity comes from
machdep.cpu.brand_string, not full detection). The width changes no KV grant,
load quotation or activation reserve (already sized for B=8); it only raises how
many admitted requests a slot may run at once, still bounded by fixed-workspace
memory concurrency and the coordinator's per-model quality cap. The automatic
width stays at 8 at nominal or fair thermal state with Low Power Mode off.
Low Power Mode, a serious or critical thermal state, or an unknown state returns
the bridge to the configured width (EngineV2Bridge.widthPostureAllowsExpansion).
A reviewed profile's expanded width requires nominal thermal state. The bridge
reads Low Power Mode and the thermal state from ProcessInfo whenever admission
or the reported width asks (EngineV2Bridge.servingPosture, which tests replace). Explicit engine_v2_max_concurrent
values, including a literal 4 from older configs, are kept.
The prompt geometry likewise changes no KV
grant, windowed-ring size, load quotation or activation floor: the paged pool
is sized from the largest schedulable chunk, max(prefillChunkSize, soloPrefillStripeTokens), which Gemma 4's 2,048-token plain chunk leaves at
its previous value, and Gemma 4 media keeps its 512-token chunk. It does let a
Gemma mixed step carry up to 4,096 prompt tokens beside decode rows. That
working set rides the unchanged activation reserve: the
2026-10-21 measurements
put its KV-subtracted peak at eight concurrent 32k-token prompts at 3.73 GiB,
inside the 5.5 GiB default. GPT-OSS and dense Qwen keep 512 / 2,048 by default
(except Qwen3.8-27B on an M5 Ultra, below) because the same geometry lifted their peaks at that load further above their
floors, GPT-OSS from 3.50 to 3.62 GiB against 3.5 and Qwen3.5-9B from 5.73 to
6.03 GiB against 5.5. The live KV gate grants KV up to the cap minus the
reserve (UnifiedMemoryCap.liveKVHeadroomBytes), so a peak above the reserve
lands beyond the cap; even the previous geometry reaches both floors at that
load, so they need a long-context re-measurement coordinated with platform
admission. MoE Qwen's peak rose 2.1 GiB (EngineV2Factory.usesWidePrefillChunk,
provider-swift/Sources/ProviderCore/Inference/Engine/Factory/EngineV2Factory+Configuration.swift).
Qwen3.8-27B on an M5 Ultra takes a 1,024-token plain chunk with the unchanged
2,048-token step budget (EngineV2Factory.usesQwen38PrefillChunk), so its
pool, rings, quotation and floor are unchanged too. A mixed step can carry more
prompt rows than at 512 (up to the same budget). Measured: the provider's whole-
process footprint peak at eight concurrent 34-36k-token prompts on an M5 Ultra
showed no systematic rise (512: 39.9 and 39.9 GB; 1,024: 36.9 and 41.0 GB; 1 GB
sampling granularity, weights and KV included). Not measured: a KV-subtracted
activation probe and a cap-limited KV fill, so a rise smaller than the
footprint's run-to-run spread is not excluded; the 27B keeps the 5.5 GiB default
floor.
First-token deadline admission is a time check, not a memory grant. Its
estimator corrections (deadlines,
DARKBLOOM_TTFT_ADMISSION_FIXES) change no KV grant, load quotation,
activation floor, serving width or memory concurrency; a request they admit
still passes slot and process byte admission. Their inputs are measured on the
serving Mac, so the same request can project differently on other hardware:
- Decode is charged per batch step from the step shape the engine measured. On
an MTP engine the charged depth follows the chip's automatic verification
envelope
(
provider-swift/Sources/ProviderCore/Inference/MTP/MTPAutomaticVerificationPolicy.swift,MTPAutomaticVerificationPolicy.maxRectangularTokens; chip families): a smaller envelope reaches the one-token-per-row charge at fewer decode rows, as the live planner does. - An ordinary engine's isolated-prefill anchor is its own startup calibration
cell, measured idle at nominal posture. Expired evidence returns to the
anchor only while the whole Mac is idle at nominal posture
(
provider-swift/Sources/ProviderCore/Inference/Engine/Bridge/EngineV2Bridge.swift,EngineV2Bridge.calibrationPosturePermitsWork: no Low Power Mode, nominal thermal state). While another resident model or device activity holds the Mac, or under Low Power Mode or a non-nominal thermal state, the anchor only floors the aggregate rate (provider-swift/Sources/ProviderCore/Inference/Performance/Deadline/AdmissionRateEstimators.swift,IsolatedPrefillAdmissionRate.anchorFloorFraction). Native engines keep their recovery probe instead (GLM and MiMo only until their first calibration cell, below). - GLM-5.3-Flash and native MiMo V2.6 let a cold prompt of at most 4,096
tokens raise their prefill estimate but never lower it: its rate is mostly the
request's fixed cost. Idle at nominal posture, with no calibration cell or
longer prompt in 120 seconds, they price prefill at no less than their
calibration cell
(
provider-swift/Sources/ProviderCore/Inference/Performance/Deadline/AdmissionRateEstimators.swift,NativePrefillEvidence;DARKBLOOM_TTFT_NATIVE_PREFILL_EVIDENCE=0turns it off), so once calibrated they take no short-prompt recovery. A busy Mac or another posture keeps one eighth of the cell as its floor. A slower isolated short sample stays in its prompt-size bucket only, out of their publishedisolated_prefillmeasurement,observed_prefill_tpsand slot telemetry'sisolated_prefill_tps, and the smallest bucket no longer tightens their prompts. Off nominal posture a short sample still cannot lower the estimate, so it keeps its nominal value until a longer prompt measures the new posture. - Three consecutive refusals that isolated prefill evidence older than 120
seconds explains on an idle Mac re-run the idle calibration probe once
(
provider-swift/Sources/ProviderCore/Inference/Performance/Deadline/AdmissionRateEstimators.swift,DeadlineRefusalStreak): one solo 512-token cell remeasures the rate on that Mac, at that thermal state, when it is idle, at nominal posture and on AC power (never on battery;DARKBLOOM_TTFT_REFUSAL_PROBE=0turns it off). No customer request is admitted without a projection for it. A refusal for physical capacity, at a fresh rate, at the anchor or with under 5 seconds left never counts.
The anchor, floor and refusal streak shape admission only. The published prefill rates (apart from GLM's and MiMo's short-sample handling above), capacity wire fields and the external platform's memory contract are unchanged.
Provider full-load quotations, measured activation floors and reported capacity must remain compatible with platform admission. Review both repositories when changing these contracts; do not copy the backend implementation here or replace measured floors with shape-based estimates.
Gated DeltaNet prompt windows of the Qwen model types named in
inference take a four-row kernel only on a GPU where it
reproduces the stock gated_delta_step bit for bit, so on every chip outputs
and recurrent checkpoints keep the stock kernel's bits. No chip list decides
this: in each process, the first eligible window of each kernel instantiation
runs the candidates and the stock kernel on a fixed 32-position window on that
GPU and keeps the first exact candidate, or else the stock kernel
(libs/mlx-swift-lm/Libraries/MLXLMCommon/GatedDelta.swift,
GatedDeltaPrefill.probe). The probe does not compare speed; where a kept
kernel is slower, DARKBLOOM_TTFT_GDN_BLOCKED
(configuration) restores
the stock kernel.
| GPU | Speed qualification |
|---|---|
| M5 Ultra (80-core) | Per-layer recurrence 1.45-1.70x faster (bf16 inputs, fp32 state, 512 and 4,096 positions); the probe keeps packed at the Qwen3.5-9B, Qwen3.8-27B and Qwen3.5-35B-A3B head geometries |
| M3 Ultra | Qwen3.5-9B cold prefill takes 1.1-1.3% less time at 2,048, 8,192 and 32,768 prompt tokens (darkbloom benchmark --scheduler-prefill, probe against the stock kernel, A/B/A on one binary) |
| Every other GPU | Unmeasured: bit-exact through the probe, speed unknown. GatedDeltaPrefillTests prints per-layer timings with DARKBLOOM_GDN_PREFILL_BENCH=1 |
The selected kernel has the stock kernel's inputs, outputs and fp32 state, so steady-state memory is unchanged. The probe allocates transiently, once per kernel instantiation and process: a 32-position window and up to four fp32 recurrent states, at most about 16 MiB at Qwen3.8-27B's 48 value heads of 128. Capacity compatibility: no full-load quotation, measured activation floor, KV grant or reported capacity field changes, so platform admission needs no change.
- New KV charges must fit the current unified cap, OS availability and activation
reserve. Existing owners survive later pressure until retirement; debt blocks
new growth —
UnifiedMemoryCap.liveKVHeadroomBytes,ProcessMemoryLedger.replaceCharge. - The cap never leaves the OS less than
minimumReserveBytes—hardCapBytestakesmin(fraction × physical, physical − minimumReserveBytes). - The activation reserve is raise-only from the environment —
resolvedActivationReserveBytesreturnsmax(env, floor). - A measured per-model floor applies only to an exact catalog id, and a mixed
serving set takes the
maxover its models —activationFloorBytes. - A load passes only if
weights × memoryOverheadFactor + activations + minimumLoadKVBytes ≤ freeForLoadGband, after loading, measured live KV headroom is ≥minimumLoadKVBytes—canLoad,loadIsServeable,KVHeadroomProbe.hasServeableKVHeadroom. The managed Nemotron Super load replaces the first term with its own claim's ledger room, which keeps no load reserve —ProviderLoop.evictUntilNemotronSuperFits,nemotronSuperLoadIsCertainToFail. - Load-time re-slicing refuses a newcomer only when the slots'
minimumServiceableGrantBytesfloors sum to more than the fleet KV budget; otherwise every engine share is at least its floor. Shrink preserves existing ownership —EngineV2KVSizing.resliceGrants,EngineV2KVSizing.resliceMeetsServiceabilityFloor,AdmissionV2.updateBytesCapacity. freeForLoadGbapplies no multiplicative discount; the only padding is the scanner'smemoryOverheadFactoron weights —ModelLoadAdmission.swift,ModelScanner+Discovery.swift.
| Symptom | Cause | Where |
|---|---|---|
darkbloom start exits: "At least … GB is needed to serve any model" |
hardware.memoryGb below the RAM floor in Constants |
StartCommand+Preflight.swift |
| Start refused: Metal unavailable | GPUEnforcement.requireMetal() threw |
GPUEnforcement.swift |
| Load refused: "… need N GB to serve — unloaded" | Post-load hasServeableKVHeadroom false (live KV headroom below minimumLoadKVBytes) |
ProviderLoop+ModelLoading.swift, KVHeadroomProbe.swift |
Load refused with no_kv_headroom |
Slot KV sizing overflowed or no serviceable grant during construction | EngineV2Config.swift (EngineV2RefusalReason.noKVHeadroom), EngineV2SlotFactory.swift |
| Load refused: "loading '…' would leave a model without its fixed request workspace, admission watermark and 1.0 GB minimum KV allowance (fleet KV budget … B across … slots) — refused" | The slots' minimumServiceableGrantBytes floors sum to more than the fleet KV budget |
ProviderLoop+EngineV2.swift (resliceAndBuildEngineV2Bundle), EngineV2Reslice.swift (resliceGrants) |
| Catalog says the tier fits, provider refuses | Static cap arithmetic passes but freeForLoadGb (real free minus loadReserveBytes and in-flight reservations) is below requiredToLoadGb |
ModelLoadAdmission.swift, ProviderLoop+ModelLoading.swift |
| Nemotron Super refused: "Insufficient memory (… GB of LOAD room, need … GB) …" | The claim's ledger room cannot hold its narrowest configuration, even after evicting every idle model | provider-swift/Sources/ProviderCore/NemotronSuper/ProviderLoop+NemotronSuperAdmission.swift |
| New request cannot fit | Its complete request promise exceeds the slot grant, or live ownership/OS pressure leaves no process headroom | AdmissionV2.swift, ProcessMemoryLedger.swift |
Raising DARKBLOOM_ACTIVATION_RESERVE_GB shrinks KV, lowering it does nothing |
Raise-only semantics | UnifiedMemoryCap.swift (resolvedActivationReserveBytes) |
darkbloom doctor warns about macOS |
Below recommendedMacOSMajorVersion (Constants); warning only |
BootSecurity.swift |
| Concern | File / symbol |
|---|---|
| Cap, reserves, floors | provider-swift/Sources/ProviderCore/Inference/Memory/UnifiedMemoryCap.swift |
| Load gate | provider-swift/Sources/ProviderCore/Inference/Memory/ModelLoadAdmission.swift; Nemotron Super: provider-swift/Sources/ProviderCore/NemotronSuper/ProviderLoop+NemotronSuperAdmission.swift; eviction exclusions and Not evictable: reasons: provider-swift/Sources/ProviderCore/ProviderLoop+EvictionExclusions.swift (evictionExclusions) |
| Post-load probe | provider-swift/Sources/ProviderCore/Inference/Memory/KVHeadroomProbe.swift |
| Slot KV sizing and re-slice | provider-swift/Sources/ProviderCore/Inference/Memory/EngineV2KVSizing.swift, provider-swift/Sources/ProviderCore/Inference/Memory/EngineV2Reslice.swift |
| Process-wide KV ledger | provider-swift/Sources/ProviderCore/Inference/Memory/GlobalKVCacheBudget.swift |
| Calibration ownership and foreground lease | provider-swift/Sources/ProviderCore/Inference/Performance/IdleCalibrationCoordinator.swift (startIfIdle, admitForeground, isOverdue); provider-swift/Sources/ProviderCore/Inference/Engine/Bridge/EngineV2Bridge+ModelCalibrationRequests.swift (runModelCalibrationRequest); provider-swift/Sources/ProviderCore/Inference/Engine/Bridge/EngineV2Bridge+Events.swift (runPump) |
| Deadline admission rate inputs | provider-swift/Sources/ProviderCore/Inference/Performance/Deadline/AdmissionRateEstimators.swift (DeadlineAdmissionFixes, IsolatedPrefillAdmissionRate); provider-swift/Sources/ProviderCore/Inference/Engine/Bridge/EngineV2Bridge+Admission.swift (targetFirstTokenDeadlineAdmission) |
| MLX soft limits | provider-swift/Sources/ProviderCore/Inference/Memory/MLXMemoryGuard.swift |
| Padded weight estimate, quantization | provider-swift/Sources/ProviderCore/Models/ModelScanner+Discovery.swift |
| Platform and hardware gates | provider-swift/Package.swift, provider-swift/Sources/darkbloom/Start/StartCommand+Preflight.swift, provider-swift/Sources/ProviderCore/Inference/Engine/GPUEnforcement.swift, provider-swift/Sources/ProviderCore/Hardware/HardwareDetector.swift, provider-swift/Sources/ProviderCore/Security/BootSecurity.swift |
| Coordinator mirror | coordinator/registry/servability.go, coordinator/registry/scheduler.go |
| Measurements behind the floors | docs/reports/2026-08-30-activation-floor-measurements.md |
The native Flint adapter uses the existing attention-only geometry and memory admission path. Its sliding/full map comes from the loaded configuration, so full-layer KV growth and bounded sliding windows retain distinct accounting. Neither the official INT4 package size nor one short-generation peak establishes a supported RAM tier or full-context concurrency. No Flint-specific activation floor, OS reserve reduction or hardware cap is introduced. The prefill output optimization retains all trunk work and KV writes, so it does not reduce the admitted context or KV allowance.
The native protocol constraint also runs for tool-less requests. Its cached
vocabulary projection and per-request framing/mask caches add host work and
memory. FlintNativeVocabulary retains at most four cached vocabulary entries
with weak tokenizer ownership. FlintNativeProtocolConstraint.maximumStates
is 8192; its state-mask and broad-mask caches each retain at most four entries.
FlintNativeProtocolBoundary.maxKeyBytes is 1024, maxJSONDepth is 128,
and retained raw-string key metadata is limited to 65,536 UTF-8 bytes per
constraint. These bounds do not replace weight, activation or KV admission.
State-pool exhaustion produces a constraint failure rather than unconstrained
generation; key/depth bounds restrict continuations or reject declarations.
Vocabulary projection is cached, and ordinary opaque text reuses canonical
framing states. The existing CBv2TokenConstraintSampler.mask still scans broad
allowed-token sets. Constrained requests also disable ordinary decode chaining
and are ineligible for MTP. An unconstrained diagnostic run therefore does not
measure the production serving path, even when it uses the same checkpoint.
No throughput improvement or higher concurrency follows from these changes.
Sources: provider-swift/Sources/ProviderCore/Inference/FlintNativeVocabulary.swift
(FlintNativeVocabulary),
provider-swift/Sources/ProviderCore/Inference/FlintNativeProtocolConstraint.swift
(FlintNativeProtocolConstraint),
provider-swift/Sources/ProviderCore/Inference/FlintNativeProtocolBoundary.swift
(FlintNativeProtocolBoundary),
libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/TokenConstraintSamplerV2.swift
(CBv2TokenConstraintSampler.mask),
libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/EngineLoopV2.swift, and
libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/MTP/EngineLoopV2+MTPPlanning.swift
(mtpBasicEligible).
See Flint validation scope
and provider-swift/Sources/ProviderCore/Inference/Engine/Factory/EngineV2Factory+ModelAdapter.swift
(EngineV2Factory.ProductionModelAdapter).
../provider/hardware-requirements.md— RAM tiers and catalog models, for operatorsinference.md— per-request KV reservationprefix-cache.md— KV layouts and the SSD tier's RAM staging- routing.md — coordinator servability predictor
components/mlx-swift.md— the pinned MLX stack and the SwiftPM platform floor../design/activation-reserve-overhaul-plan.md— the plan that introduced per-model floors
Cluster members use process-owned macOS power assertions while serving. The lifetime and retry rules apply on every supported chip; explicit sleep and lid closure remain OS decisions.
Optional Qwen 3.5 pipeline batches bind their decode arithmetic in the load
agreement. The supported affine projection uses stock singleton matmul
arithmetic on each row, with original per-row fallbacks for unqualified module
contracts. Synthetic M3/M5 projection parity is distinct from full-model and
paired throughput qualification; installed lane defaults and memory admission
remain unchanged. See cluster inference
and libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/Qwen/Batch/QwenBatchSettings.swift
(loadAgreementFields).
The finite paired-control retirement
path preserves native owner retirement and resource accounting. Its encrypted
loopback CPU regression exercises control and process lifetime with synthetic
report values; it establishes no model, GPU, RDMA, hardware-capacity or serving
qualification. The dispatch summary explicitly keeps servingGrant and
qualifiesMaximumEnvelope false
(provider-swift/Sources/ProviderCore/Inference/Distributed/Calibration/GLM5NextCalibrationDispatch.swift,
execute).
The GLM finite-calibration scanner uses the current load-gate sample, allocator active/cache usage, maximum buffer bound and independent native/host authorization ceilings. Available unified memory excludes the larger of the load gate's headroom and the authorized OS headroom. The exact full-construction and request peaks remain overlapped in the reservation. A structural cut is feasible only if both rank quotes fit all their bounds; no layer count, device name or memory ratio grants admission.
Snapshots are short-lived observations. The signed quotation worker resamples current bounds before returning its selected quote, and later live load/request gates remain unchanged. A feasible snapshot is neither a memory-calibration pass nor proof of measured fastest throughput. See the shared placement decision.
The explicit ClusterGLMImageCandidate.profileID assigns the native vision tower
to rank 0. Ordinary text layouts and LOAD quotes exclude these image allocations;
the candidate alone enables them through its bound runtime profile.
GLM5NextStageLoadResources derives its source allocations from the verified
inventory and charges three additional vision allocation copies for construction
and layout aliases. GLM5NextImageBudget adds per-rank encoded-wire ownership and
rank-0 pixel/patch/feature, bounded tiled attention, embedding splice and
conservative native scratch to text state; these charges are additive. Planner
work includes tower construction and conservatively charges the larger media
workspace on every rank. Admission still checks current OS/native capacity.
These bounds are not measured image qualification or a new hardware minimum.
Sources: libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/GLM5Next/Resident/GLM5NextStageLoadResources.swift,
libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/GLM5Next/Metadata/GLM5NextImageBudget.swift, and
libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/GLM5Next/Metadata/GLM5NextServingMetadata.swift.
The Gemma quoted numeric tool arguments change operates on CPU text and schema values. Parser tests do not establish full-model numerical, memory, throughput or concurrency qualification. This parser switch does not change hardware admission or model memory allowances.
The ordinary Gemma stage decode scope preserves per-request projection, value
normalization and expert shapes for widths 2–8. CPU tests cover reduced Gemma
MoE fixtures with the registered affine group-64 formats (default 4-bit with
shared MLP/router 8-bit, and all 8-bit), BF16 state, sliding rings and full KV.
They establish no full-artifact GPU or two-Mac speed claim. The deployed model
still needs that hardware qualification with its exact artifact and loaded
build. See inference and
libs/darkbloom-cluster/Tests/DarkbloomClusterRuntimeTests/Gemma4BatchDecodeTests.swift.
GPT-OSS plain-pipeline lanes retain separate demand-grown histories and ordinary
per-request attention. Every live lane keeps its whole request and selected
prefill-schedule allowance; additional batch workspace is charged on top, with
no reduction to the full LOAD floor. The default remains one lane. An explicitly
selected width 2...8 enables the native owner loop, whose full-artifact device
arithmetic and useful throughput require qualification on the exact pair; see
the owner contract.
Nemotron Lightning's experimental native stage batch bounds request count
and keeps each request's recurrent buffers in compact owned storage. It does
not reduce any load or per-request reservation, widen installed admission,
or supply a device qualification. See the stage mechanism and qualification
boundary and CBv2StageKVHost.supports in
libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/State/CBv2StageKVHost.swift.
Installed startup checks tensor-parallel rank shapes with the same empty layer-cut list as planning and genuine qualification records. Capability partition cuts remain metadata; they cannot hide a failed tensor-parallel orientation. Pipeline and hybrid prefill cuts retain their existing meaning. See failed tensor-parallel qualification shapes.
A wider local cluster mode must fit both ranks at the listener's full existing prompt/output/context bounds. The host's replacement callback observes actual queued demand before tokenization and makes no shorter-context or raw-byte assumption. It may select two or four lanes if eight do not fit, or keep the current mode. Pending HTTP work stays on the same listener while old native owners fully release; candidate startup must report the requested capacity. This ownership mechanism grants no new model/mode capability or hardware qualification and does not change GLM dispatch.
For shared-stage plain-pipeline batching, acceptance compares both ranks'
darkbloom-stage-batch-decode-v1 events from the same batch scope and worker
generation. A native width event follows completed evaluated decode; neither
a configured capacity nor concurrent HTTP admission proves it. Bounded
darkbloom-stage-batch-memory-v1 snapshots distinguish backend capacity,
request reservations, live bytes and actual committed paged slab backing.
A clean retirement requires observed reserved/in_use/bound_rows to be zero;
materialized reports backing still committed independently of that drain test.
Measurements must retain any nonzero retirement or failed cleanup, without
relabeling it as idle release. These counters do not include model weights,
recurrent state or allocator caches and are not total process memory.
MiMo text requests in plain, compact, MTP and phase modes retain their full contiguous-state
allowance and add rounded page allocations, copy-on-write versions, gathered
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).
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
allowances and standalone contiguous histories are unchanged. See
MiMo independent histories,
MiMoPagedKVAllowance.pages and MiMoBatchMemory.workspace in
libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/MiMo/Metadata/.
GPT-OSS and MiMo automatic plain-pipeline proposals use a separate complete
batch quote tied to width and original chunk. Both ranks reserve the largest
per-stage lane charge across admitted cuts, at least the full-model layer-state
floor, multiplied by the number of histories, plus one shared native/host
workspace maximum. This retains paged COW/gather, prompt/history and original
request allowances, as applicable. It can conservatively refuse a width even
when smaller actual requests might fit; queued raw body bytes are not a safe
substitute for the listener's token envelope. No single-request layout or LOAD
allowance is reduced and no width-times-speed estimate is inferred. See
automatic batching and
libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/Placement/ClusterPlacementBatchBudget.swift.
DistributedInstalledPlan.nativeEnvironment keeps the native paged default
for Gemma plain pipelines at widths 1, 2, 4 and 8. Stage KV is paged only:
the former DARKBLOOM_CLUSTER_KV_BACKEND=contiguous diagnostic stops the load.
Neither lane eligibility nor a successful tiny cache test establishes
full-artifact memory fit, numerical parity or throughput; those require
paired hardware qualification. The restore mechanism is described in
inference.
A Gemma 4 pipeline's width (the one its setup saved with serial prefill; one
lane without one, as a guided setup saves it,
Gemma pipeline lanes) adds no load-time
allocation: the paged pool's capacity is a ceiling, and pages are reserved per
request (CBv2StageKVHost). LOAD admits the width whole against live memory:
every lane at the memory plan's request, as the lane book charges lanes held at
once (QwenBatchLaneBook.reservedBytes). A Mac that cannot hold it now refuses
the load. Each lane is then charged its whole request state on every rank and
admitted against live memory again when it is reserved
(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 27B's eligible Hadamard projections take one of two row paths. Pair stages use the packed FP32 row path, one M=1 projection per row, so both machines agree byte for byte. A single Mac takes the same row path for a two-request decode step and batches calls of three or more rows (larger decode steps and prompt chunks) in one packed matmul, as provider 0.10.4 did. Existing LOAD allowances retain their constant-cache and activation charges; neither path introduces a persistent weight copy. The pair's arithmetic receipt changes independently of the Bonsai 9B row. This implementation establishes no new tensor-parallel capability, qualified hardware orientation, context ceiling or throughput claim; those remain properties of the recorded full-artifact runs.
The registered Nemotron prefix plan preserves complete prefill chunks and existing request bounds. Its existing prefix capture allowance remains conservative: capture uses fewer original frame boundaries and introduces no additional state type or weight allocation. Source and CPU frame checks do not clear earlier full-artifact negative qualifications; rerun each affected rank orientation and schedule with the unchanged numerical comparator.
The Gemma reopened thought channels change operates on CPU text and schema values. Parser tests do not establish full-model numerical, memory, throughput or concurrency qualification. This switch (on by default since 0.10.13) does not change hardware admission or model memory allowances.
The registered Gemma prefix plan shares the original-chunk grid rule with Nemotron. It retains the existing KV/capture allowances and does not add persistent storage. A partial or whole final prompt chunk is recomputed on a repeat. This framing correction adds no qualified hardware shape or performance claim; separately observed cross-chip numerical failures remain failed until the unchanged qualification gate passes.
Registered Gemma prompt projections use an explicit singleton-token reduction policy for supported BF16 affine packing, as described in inference. The exact arithmetic receipt separates older rectangular-projection results and cache identities. Component tests do not qualify a complete model, both rank orders, or prompt throughput. Keep existing cross-chip failures and require fresh full-artifact numerical and timing evidence for both scoped prompt policies. Attention and full-model composition retain their independent qualification requirements.
A Gemma 4 tensor-parallel rank is charged its own share, not the whole model
(Gemma4TensorParallelRequestBudget, every array at the allocator's bound):
| Charge | Held | Bytes (QAT 4-bit, 8,320-token request) |
|---|---|---|
| Weights: the plan's exact cut, overlap groups and zero rows included | per rank | 8,040,450,108 (8-bit: 14,915,635,260) |
| Its own KV heads of every layer (4 sliding, 1 full), residual rows | per request | about 364 MB (the whole model's: 719,380,600) |
| One prompt chunk's attention transient over its 8 query heads, or a decode step's one row on every layer where that is more (requests of 17 tokens or fewer) | per request | about 145 MB |
| FP32 partials (attention row, dense row, 8 expert rows and their packed copy) of a chunk, or of a decode step's row on all 30 layers where that is more, and 3 vocabulary rows | per request | about 113 MB |
Prompt-prefix capture at its deepest boundary: its own full-attention rows for its prompt and one window of every sliding layer (prefixCaptureBytes); none when its cache is off |
per request | 191,027,200 for an 8,319-token prompt (the LOAD quote's, for the memory plan's 32,768-token prompt: 441,384,960) |
Activation floor: UnifiedMemoryCap's conservative default, 5.5 GiB, until a pair measures one |
per rank | 5,905,580,032 |
| Freed-buffer cache (half the allocator headroom) | per rank | 1,073,741,824 |
| Eight sealed frames of the packed collective (512 x 101,376 bytes and the seal) | per rank | about 415 MB |
The layout's requestAllowance quotes one request at the memory plan's longest
context (65,536 tokens) and prompt plus the per-rank charges, and its
laneBytes that request's per-request charges again for each further lane. The
worker's LOAD gate reserves the allowance and the lane charge for every lane of
its saved width after the first beside the shard, the width the planner priced
(lane widths). A reservation or lane asks
the live gate for every held request, the new one and the per-rank charges. A
request past the memory plan, up to the profile's 262,144 tokens, is charged at
its own context (Gemma 4 native context). The
planner still charges at least the pipeline's whole-model
requestChargeEveryRankBytes. The prompt-prefix memory tier is charged
nowhere: its budget is half the room the load measures beside the shard and
that quote (QwenStagePrefixCache.budget(roomBytes:)), and its entries give
way before any refusal
(Gemma TP prompt prefixes). A rank
whose prefix cache is off charges no capture.
Nothing here is measured on a pair; see
inference.
A MiMo V2.6 tensor-parallel rank is charged its own share
(MiMoTensorParallelRequestBudget, every array at the allocator's bound). One
derivation gives the worker's LOAD gate, each reservation's charge and the
layout's requestAllowance:
| Charge | Held | Bytes (65,536-token request, exact bounds) |
|---|---|---|
| Weights: the plan's exact cut (no padding) | per rank | 84,013,770,176 |
| Paged KV at its own KV heads (2 full, 4 sliding), sliding pages twice | per request | 882,769,920 |
| Every layer's gathered history and the widest again (a decode step's command buffers keep it in flight) | per request | 902,658,560 |
| One chunk's full-attention scores at its 32 query heads, FP32, as if materialized | per request | 4,294,967,296 |
| One chunk's activations, its FP32 partials (attention, feed-forward, the sum, 8 expert rows) and 4 vocabulary rows | per request | about 174 MB |
Activation floor: UnifiedMemoryCap's conservative default, 5.5 GiB, until a pair measures one |
per rank | 5,905,580,032 |
| Freed-buffer cache (GLM's) | per rank | 4,294,967,296 |
| Eight sealed frames of a chunk's partial (512 x 16,384 bytes and the seal) | per rank | 67,117,056 |
The LOAD gate admits the shard with one request at the profile's longest context (65,536 tokens) and the per-rank charges, the planner's quote: about 100.5 GB, or about 104.8 GB (97.6 GiB) per rank with the 4 GiB loading headroom. That fits a 128 GB Mac. A reservation asks the live gate for its own request and the per-rank charges. Nothing here is measured on a pair; see inference.
Every installed rank decodes in speculative rounds (--mtp-depth 2, on by
default: ClusterMiMoTensorParallel) and adds the charges below. The LOAD gate
adds all three before anything is read, with the per-request terms at the
profile's longest request; READY's capacity and each reservation add the two
per-request terms. The planner's quote counts the same: the heads whole on
every rank (the layout's speculativeHead, each tensor in whole pages) and the
two per-request terms in the layout's requestAllowance
(MiMoTensorParallelResidentRuntime.placementRounds), so the plan admits only
pairs the LOAD gate admits.
| Charge | Held | Bytes |
|---|---|---|
| The three trained heads, whole on every rank (BF16) | per rank | 1,975,640,448 |
The drafter's state: the product's bounded declaration at a 512-token chunk and depth 2 (MiMoV26MTPAssistant.boundedRequestAllocation) |
per request | 438,426,984 |
The window's extra rows at depth 2: each sliding ring once more per extra row, one page per layer, the window's rows twice (MiMoTensorParallelRequestBudget.speculativeWindowBytes) |
per request | 36,347,904 |
With them a rank still fits a 128 GB Mac: 107,281,620,648 bytes (99.9 GiB) with the loading headroom, against a 115.2 GiB ceiling. See speculative rounds and placement.
TP layouts may carry allocator-bounded resident allocations outside their text weights. The planner adds them to weights, LOAD, request coexistence and GPU working-set fit; request floors never absorb this charge. The registered Qwen3.8 27B visual inventory is validated before quoting. A malformed or overflowing supplement fails layout decoding. This metadata proof does not qualify image or video inference on hardware. See inference residency.
The native Qwen27 TP media gate additionally charges bounded host preparation and native feature/tower allocations before decode. Header geometry is checked before image rasterization or video sampling; one clip retains its temporal geometry through the original tower. Cancellation retains preparation custody until the producer exits, then retains native roots until checked drain. A readiness ceiling is not a memory grant: every reservation still passes the live native/OS gate. See request-owned media.
QwenTensorParallelBatchBudget derives each lane's complete state from the
registered canonical tensor inventory. One shared maximum covers the original
prefill workspace, widest decode graph and logits gather. Retained scalar FP32
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 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) 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.
The verified loader reserves this full future budget while reading weights and
the vision tower. Reservation and live checks use the same ledger; readiness is
a ceiling, not a memory grant. Wider lanes require the exact27 model and keyed
pair. The tiny numerical fixtures do not establish safe full-artifact capacity,
throughput or automatic placement; each requires installed hardware evidence.
Capacity is not observed decode width: the TP driver briefly coalesces nearby
owner token credits within the bounded scheduling contract.
A completed native decode marker on both ranks is required to establish a width;
concurrent HTTP requests alone do not establish it.
An explicit local MLX_METAL_FAST_SYNCH=0|1 choice can reach an installed TP
worker through the typed owner launch. This enables a synchronization comparison
without changing model placement or arithmetic. TP workers default to fast
synchronization at every capacity, widened Qwen TP workers (the 9B, 27B and
both 35B A3B rows) included (WorkerCollectiveSynchronization). Both
paths still require paired
native progress, actual decode width, output comparisons and retirement; a
service-job setting alone proves none of these.
The optional MLX_EAGER_FENCE_COMMIT diagnostic also requires explicit typed
forwarding and a fresh native startup marker. Its default remains off; enabling
it is neither a qualified configuration nor evidence of batching efficiency.
Sources: libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/Qwen/Resources/QwenTensorParallelBatchBudget.swift
(derive) and
libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/Qwen/TensorParallel/QwenTensorParallelVerifiedLoad.swift
(load).
Qwen TP automatic batching (every registered TP row, each priced by its own
geometry) retains the feature-preserving TP mode filter.
TP uses the same canonical-inventory full request allowance as its native owner
at widths 2, 4, 6 and 8; a narrower reference request or installed chunk does not
shrink that floor. Every width is quoted at the memory plan's request (32,768
prompt plus 32,768 output tokens), including for Qwen3.8 27B, whose profile
advertises 262,144 tokens; a longer request is charged at its own context when
a rank reserves it (native context). During LOAD, this complete future reservation coexists with
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. Initial placement saves the
widest of these widths at which both ranks fit current observations, with
nothing credited (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
width propagation, not full-artifact TP throughput, media parity or native
concurrent execution. See automatic batching.
Sources: libs/darkbloom-cluster/Sources/DarkbloomClusterPlacement/ClusterPlacementPlanner.swift
(tensorRequirement) and
libs/darkbloom-cluster/Sources/DarkbloomClusterPlacement/ClusterShardAssessment.swift.
QwenTensorParallelBatchPrefixBudget prices one plain lane's prompt-prefix
capture, separately bounding every array with the native allocator metadata:
its own heads' keys and values to its deepest kept boundary, and one
convolution and SSM state for every boundary a prompt with that deepest
boundary keeps (pricedStates: the deepest, the margin boundary, and the
stripe boundaries up to nine, so at most eleven, and never fewer for a longer
prompt). Each request's reservation charges its own prompt's capture
(QwenTensorParallelRequestCharge); LOAD and the placement quote charge one
capture of the profile's longest prompt per lane (promptTokens), and nothing
for a resident tier. The geometry is the rank's own heads at LOAD and in each
rank's placement quote; without a rank, the full unsliced geometry covers either
rank and unequal shares. The existing live-state, gather, replacement and
collective charges remain, and a reused prefix does not lower admission or
refund the destination's future state.
The memory tier that keeps captures after their requests is charged nowhere.
Its budget is half the room LOAD measures beside its whole quote
(ClusterStagePrefixBudget.roomBytes, QwenStagePrefixCache.budget(roomBytes:)):
at most a thirty-second of the Mac's memory, in 256 MiB steps, and 0 when the
room is under 512 MiB. The reservation and running-batch gates do not credit
its entries as the owner's own allocations, nor, while the SSD writer is busy,
up to its queue's byte bound for the retired captures it still holds; the
writer drains and then the entries give way before either gate refuses
(QwenTensorParallelSnapshotCache.yieldingMemory). A capture always keeps what
its request's charge covers. With no tier budget it keeps nothing resident and
still writes its SSD record. A request whose prompt exceeds the memory plan's
is charged at its own prompt, outside LOAD's per-lane quote
(native context). The assistant's lanes
keep their single 4,096-token frontier and its two charged resident banks
(QwenTensorParallelMTPPrefixBudget). See prefix ownership.
The registered Qwen3.8 27B, one rank's own heads at the memory plan (32,768
prompt tokens, 65,536 context, 16 KiB allocator pages;
QwenTensorParallelBatchPrefixTests, QwenTensorParallelPrefixPlacementTests):
| Term | Before (qwen-tp-batch-grid-prefix-4096-v1) |
Now (qwen-tp-batch-prefix-depth-v2) |
|---|---|---|
| A lane's capture | 212,860,928 B (4,096 tokens) | 1,764,753,408 B (rows to 32,256 and nine recurrent states) |
| Resident tier in the quote | 425,721,856 B (two banks) | 0 (half the measured room) |
| LOAD request bytes, one lane | 9,184,591,872 B | 10,310,762,496 B |
| LOAD request bytes, eight lanes | 28,471,181,312 B | 40,460,599,296 B |
| Idle pairs the planner places tensor parallel on, one lane | 2 x 36 GiB and larger | the same; a rank needs 1,126,170,624 B more |
| The same, eight lanes | 2 x 96 GiB and larger | the same; a rank needs 11,989,417,984 B more |
The planner rows leave out the vision tower's resident bytes, as the served
layout does; both columns leave them out alike.
Source: libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/Qwen/Resources/QwenTensorParallelBatchPrefixBudget.swift
(captureBytes, derive).
A drained automatic batch replacement uses the device index and this pair's recorded keyed-link measurement. Missing or invalid measurements continue to exclude TP from automatic choice; a valid measurement permits cost comparison but does not prove that TP is faster or that any model is hardware-qualified.
The registered Qwen3.8 27B provider route admits only tensor parallel because its installed media and committed-token-logprob contracts require that mode. This is a feature-preservation filter, not a change to measured speed or memory estimates; missing link, supported shape or capacity still blocks placement. See Qwen27 feature-preserving mode selection. CPU metadata/READY tests do not qualify full-artifact cross-Mac TP batching, media, accuracy, lifecycle or throughput.
Qwen27 cluster media response_format follows standalone HTTP semantics:
shared prompt preparation and, for nonstream output, JSON/schema post-validation.
It requires no token constraint or additional native model allocation. Forced
media tool choices and nondefault processing controls remain unsupported; source
acceptance does not qualify actual image/schema model answers.
QwenTensorParallelMTPInventory pins all 31 assistant arrays to the registered artifact and configuration before payload reads. Replicated packed weights, constructor bounds, two largest read buffers and aligned-read scratch remain additive during LOAD. Metadata quotation and native LOAD derive the same complete per-rank allowance; admitted request capacity never follows an unpriced speculative width.
QwenTensorParallelBatchMTPBudget prices each request's assistant history and pages (the prompt's trusted rows bounded as in inference), retained target state, copy-on-write pages and accepted-token queue. After a cohort round a row keeps only its own recurrent SSM state: it replays from its own committed input, and a fully accepted state is copied out of the cohort's final states (Qwen35 GatedDeltaNet compact replay, copies only). So each surviving lane is charged its own S window rows of SSM state, not B x S (QwenTensorParallelBatchMemoryTests.cohortSurvivorKeepsOnlyItsOwnRows measures them). Every other retained term of the earlier cohort (convolution-sized window inputs that may still view the cohort's arrays, hidden rows, logits and scalars) stays charged at the whole B x S backing per surviving lane. A separate new verification cohort, its whole B x S rectangle and its workspace remain charged once, shared, at the same time. Collective and carry backing use the admitted width times verification length, including the seed; a tiny prefill chunk cannot shrink that reservation. First-draft scratch is shared once because assistant drafts execute serially, while the assistant weights load once per owner.
The owner retains its full reservation through checked target and assistant retirement. Failed LOAD roots keep process-lifetime custody and cannot be refunded after an unsuccessful native drain. Metadata fit and tiny fixtures remain distinct from measured full-artifact memory or throughput qualification.
Code: libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/Qwen/TensorParallel/QwenTensorParallelBatchMTPBudget.swift (derive), libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/Qwen/TensorParallel/QwenTensorParallelMTPLoad.swift (QwenTensorParallelMTPAbandonedLoad), and libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/Placement/ClusterPlacementTensorBatchBudget.swift (ClusterPlacementTensorBatchBudget).
A requested cluster stop keeps the follower available until the leader's owned
part has exited. Local service custody and idle publication must confirm that
retirement before the peer stop is sent; a timeout is not proof that device
memory is free. Admission limits and native memory guards are unchanged. See
planned cluster stop ordering and
provider-swift/Sources/ProviderCore/Inference/Distributed/Onboarding/ClusterService.swift
(ClusterService.stopLocalPart).
The qwen forced-call thinking switch changes prompt/output processing only. It adds no hardware capability or memory grant; parser fixtures do not qualify model residency, throughput or concurrent GPU loads.
The gpt-oss commentary content switch changes prompt/output processing only. It adds no hardware capability or memory grant; parser fixtures do not qualify model residency, throughput or concurrent GPU loads.
The qwen stray thinking-close markers switch changes prompt/output processing only. It adds no hardware capability or memory grant; parser fixtures do not qualify model residency, throughput or concurrent GPU loads.