diff --git a/.github/workflows/provider-tests.yml b/.github/workflows/provider-tests.yml index 7b6c59f21f..dc8642eb92 100644 --- a/.github/workflows/provider-tests.yml +++ b/.github/workflows/provider-tests.yml @@ -1153,6 +1153,17 @@ jobs: DARKBLOOM_CLUSTER_METADATA_BUILD_JOBS: '12' DARKBLOOM_CLUSTER_METADATA_BUILD_ROOT: ${{ runner.temp }}/cluster-native-metadata run: bash libs/darkbloom-cluster/Tests/PrefillScheduleChecks/run.sh + # The worker package's own request lifecycle tests (WorkerTests, + # WorkerLaneTests: the coordinator over its real pipes with a fake + # runtime, CPU only), which no other job runs: among them D6's no-exit + # path, a running request ended alone for a rank's memory while the + # worker serves the next. A debug build of its own, on all the cores. + - name: Run the worker's request lifecycle tests + if: ${{ !cancelled() && steps.toolchain.outcome == 'success' }} + timeout-minutes: 45 + env: + DARKBLOOM_WORKER_TEST_JOBS: '12' + run: bash libs/darkbloom-cluster-worker/Tests/LifecycleChecks/run.sh # Only pushes to master and dev save the cluster build (SAVE_CACHES). - name: Record source timestamps for the cluster build if: ${{ !cancelled() && env.SAVE_CACHES == 'true' && steps.capability-checks.outcome == 'success' && steps.cluster-build-cache.outputs.cache-hit != 'true' }} @@ -1186,8 +1197,8 @@ jobs: # runner scripts under libs/darkbloom-cluster/Tests # (scripts/cluster-test-plan.py focused lane) and the pairing, diagnostics # and placement flow runners; - # shard 2 runs the stage metadata, provisioning, onboarding and console - # runners. They need no test + # shard 2 runs the stage metadata, provisioning, onboarding, console and + # pair-check qualification runners. They need no test # products. Both shards read the one lane test-cluster-focused, which the # route requests for 2 jobs (provider-plan.yml). name: Cluster Focused Checks (shard ${{ matrix.shard }}) @@ -1296,6 +1307,12 @@ jobs: - name: Run cluster console checks if: ${{ !cancelled() && matrix.shard == 2 && steps.toolchain.outcome == 'success' }} run: bash provider-swift/Tests/ClusterConsoleChecks/run.sh + # The pair-check driver against two fake workers, and the qualification + # comparator and readers: no model, no GPU, no second Mac. + - name: Run cluster qualification checks + if: ${{ !cancelled() && matrix.shard == 2 && steps.toolchain.outcome == 'success' }} + timeout-minutes: 20 + run: bash libs/darkbloom-cluster-worker/Tests/QualificationChecks/run.sh - name: Run cluster pairing checks if: ${{ !cancelled() && matrix.shard == 1 && steps.toolchain.outcome == 'success' }} run: bash provider-swift/Tests/ClusterPairingChecks/run.sh @@ -1372,6 +1389,13 @@ jobs: python3 scripts/test-prepare-prompt-fixtures.py python3 scripts/test-prepare-mimo-prompt-fixtures.py python3 scripts/test-prepare-mimo-image-http-fixtures.py + # The GPT-OSS checkpoint and replay tools' CPU tests: no model, no MLX and + # no server. They need Python 3.11+; ubuntu-24.04's python3 is 3.12. + - name: Test the GPT-OSS checkpoint and replay tools offline + if: ${{ !cancelled() }} + run: | + python3 --version + python3 -m unittest discover -s scripts -p 'test_gptoss_*.py' -v provider-test-gate: name: Provider Tests @@ -1421,7 +1445,8 @@ jobs: # audit against the sources and this workflow, the provider shard plan, # the component classifier, the tested-change lookup, the route, the # workflow pins, the test products hand-off, the resource sampler, the - # Date comparison check and the prompt fixture downloaders. + # Date comparison check, the prompt fixture downloaders and the GPT-OSS + # checkpoint and replay tools. - name: Require the CI plan checks env: PLAN_CHECKS_RESULT: ${{ needs.ci-plan-checks.result }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d1a688f07..8514862c3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,1148 @@ or console deployment, feature activation, model promotion or hardware qualification. Sections marked historical retain the original candidate's qualification, opt-in and deployment limits rather than claiming activation. -## v0.10.10 — candidate (unpublished) +## v0.10.12 — candidate (unpublished) -Prepared on 2026-11-06; tagging and publication are separate steps. +Prepared on 2026-11-11; tagging and publication are separate steps. + +### Upgrade and rollout notes + +- 0.10.12 makes two-Mac pairs sturdier and wider: a pair keeps serving when one of its Macs runs short of memory, a Gemma 4 pair's pipeline serves the model's whole context, and Gemma 4 and GLM-5.3-Flash pairs in tensor parallel serve more than one request at once where both Macs' memory holds them. The toolchain (Xcode 27.2, macOS 27.2 SDK), `libs/mlx` and `libs/mlx-swift` are 0.10.11's, so the GPU kernels (`mlx.metallib`) are unchanged; `libs/mlx-swift-lm` (Swift model code) moves to `ad8a5860e5`. +- **Behaviour changes to read first:** + - **`darkbloom start` no longer asks how this Mac serves.** On a Mac with no saved choice it serves the Darkbloom network and this Mac's local API (Both), and Darkbloom keeps serving while you use the Mac; it saves that choice (`[local] mode = "both"`, `me_first = false`). Saved choices are never rewritten, so a Mac set to "Both, me first" keeps pausing. `darkbloom local` serves only you. Scripts and the desktop app's Start without its local API take the same default where nothing is saved (#2008). + - **`darkbloom cluster` is simpler:** it no longer asks how the pair serves (always through Darkbloom, with the leading Mac's local API beside it, never pausing for new setups), picks tensor parallel or pipeline by itself for a new model (a pair's own model keeps its last mode), ends on one line ("✓ Serving on both Macs", details in `darkbloom status`), and on a terminal waits for "Press Enter to exit." `darkbloom cluster local` still asks, for a pair only you use (#2007). + - **A pair keeps serving when one Mac runs short of memory partway through a request, in every pair mode** (tensor parallel and pipeline; Qwen 3.8 27B, Gemma 4, GLM-5.3-Flash, MiMo V2.6, GPT-OSS). That request alone ends, on both Macs, with one Mac's memory 503 (`request_exceeds_node_budget`); the next request is served. Before, the pair's worker exited and the pair was down for about a minute (0.10.11's known issue D6). Proven on the M5 Ultra pair with the real memory check. + - **A Gemma 4 pair's pipeline serves the model's whole context** again: prompts up to 262,143 tokens and answers up to 32,768, as in tensor parallel and on one Mac (0.10.11 capped it at 65,536). Each Mac's memory check still decides, request by request, whether a long one fits now. + - **More requests at once on a pair:** a Gemma 4 26B (QAT 4-bit) pair in tensor parallel serves 2 requests at once, and a GLM-5.3-Flash pair in tensor parallel the widest of 8, 6, 4 or 2 that both Macs hold beside the model (it said 8 on any two Macs before). Each Mac reserves that width when the model loads; if the memory isn't there at that moment, a GLM pair loads with fewer and takes more requests as memory allows. + - **A pair takes the requests whose first token it can deliver in time, and only those.** Once a pair had measured how fast it reads prompts, 0.10.11 could turn away every Darkbloom request as "deadline unreachable". It now estimates each request's first token from its own measured speed and the prompts it is still reading. + - **Typed refusals:** a pair's API that is starting or stopping answers every request, the first included, with a 503 `pair_api_unavailable` and `Retry-After: 10`; an image or video sent to a model that doesn't take it is refused with `unsupported_media`; a video or audio decode fault is a retryable 503 with the reason `media_memory_unavailable`, which no longer marks the Mac's token budget as full. + - **Updates and the watchdog:** a `darkbloom restart` (or `stop` then `start`) you run in the first 10 minutes after an update no longer counts as a failed start, so it can't roll the update back; a crash, a hang or a reboot still counts. The watchdog brings back a provider job that launchd lost while it was enabled, and says in `~/.darkbloom/watchdog.log` when something restarts the provider so often that a new release is never promoted. + - **Selected models come back by themselves:** a model you selected that didn't fit at start, or that an Autopilot operation unloaded, is retried when memory frees, never by evicting another selected model. Ten minutes after it began waiting, a model outside your selection that keeps it out only by serving Darkbloom requests finishes its requests and is unloaded. `darkbloom stop`, `restart` and `start` no longer need `--force` when a model's unload never finishes. +- **A GLM-5.3-Flash Mac no longer reads as full while it serves nothing:** its heartbeat reports only the requests it holds, not the memory its engine keeps for reuse (which grew to 90–99 % and turned most GLM requests away from idle Macs), and a request waiting behind another's prompt counts once (#1964). +- **Nemotron Super with images and video** serves JSON output (`json_object`, `json_schema`), tools and `tool_choice`, as with text, and takes WebP, GIF and BMP under any image label; other formats are refused as `unsupported_media` (#1922, #1962). The coordinator sends media with JSON or tools only to Super Macs on 0.10.12. +- **No more stuck MiMo requests behind the idle speed check:** a request that arrives during the check stops waiting when cancelled, and after 30 s is refused as busy so Darkbloom sends it elsewhere; while the check is overdue the model reads `crashed` and gets no new requests (#1966). `darkbloom stop`, `restart` and `update` no longer wait out requests the coordinator already cancelled (at most 30 s after the cancel) (#1968). +- **A MiMo slot whose engine stops stepping stops taking requests (#1967):** an engine whose native work failed reads `crashed` at once, and a native MiMo slot whose queue holds work with nothing running reads `crashed` after 30 s, so Darkbloom routes around it and the slot is retired. +- **Gemma 4 26B QAT drafts with exact MTP acceptance** by default: each committed token is the model's own draw, so its outputs follow the model's distribution (exact in distribution, not bit-identical to decoding without MTP), at a speed cost of about 0–4 %. Only the catalog `gemma-4-26b-qat-4bit` changes; every other model keeps its rule, and `mtp_acceptance_by_model` with `"gemma-4-26b-qat-4bit" = "typical"` restores the old one (#1974). +- **An answer that repeats itself word for word stops early, as `length`:** after about 2,000 repeated tokens instead of running to its output limit (up to 131,072 tokens), so the Mac is free sooner; only exact repetition counts, never in an answer's first 4,096 tokens, and tool calls and JSON answers are never cut. On by default except for Nemotron Super; `DARKBLOOM_LOOP_GUARD=0` turns it off (#2005; window 16). +- **GLM-5.3-Flash answers a JSON `response_format` with an image or video on one Mac**, as its text JSON mode does; before, every such request was a 400 (#2009). A pair still refuses it. +- **Qwen 3.5/3.6 requests that can't speculate cache their prompts again** (a penalty, a `stop` string, logprobs, `logit_bias` or a token constraint): they record the MTP head's prompt history and save the same prefix checkpoints a speculating request saves, so these builds, which keep the card's penalty, cache again (#1965 with mlx-swift-lm #398; window 8b: exact, memory accounted and capped). +- **Nemotron 3.5 Lightning serves plain decode under `mtp_mode = "auto"`:** its MTP head sped up only a lone request and halved decode beside a second one; plain decode keeps production's throughput (#1969, window 7). +- **A stream that stores its prompt's checkpoint no longer waits for row-by-row coding:** the SSD checkpoint export reads rows in batches and codes them on up to four cores, so the end of a stream (and its terminal) comes much sooner; the checkpoint bytes are unchanged (#1971, window 7). +- **Gemma 4's MTP assistant upgrade no longer races the serving engine:** attaching the assistant to a model that already serves reuses the KV types observed at load instead of running a forward, which could crash the provider ("Attempting to eval an array without a primitive") when a request arrived during the upgrade (#1985, window 8b). +- **A long MiMo prefill no longer trips the engine watchdog:** a native MiMo step may run up to 120 s (the engine's prefill progress lease) before the watchdog seals the engine, instead of 30 s, so slower Macs (M3 Ultras take three to four times an M5 Ultra's 15.6 s at 170k tokens) finish long prompts; a step that never returns is still caught (#1989; window 8c: sealed at the limit under a 5 s override, a 170k prefill with no crash, identical output). +- **`darkbloom status` lists early-ended requests by cause, paid or unpaid** (#1980). The causes are exact once the coordinator sends the reason, which it does from the coordinator update of 11-11. One known gap until platform #792 ships: an owner's own request stopped mid-answer shows as "paid". +- **Nemotron Super's prompt cache restores exactly:** it saves native-precision prefix checkpoints, so an answer from a cached prompt is the answer the same prompt gets without the cache; checkpoint files are about 15 % larger, and older Super checkpoints are skipped and age out within 30 minutes (#2002; window 11: 3/3 prompts exact). +- **Qwen 3.8 27B drafts with exact MTP acceptance on single Macs** (#1999): its outputs follow the model's distribution (exact in distribution, not bit-identical to decoding without MTP). It costs about 4–5 % decode speed while a Mac serves one Qwen 3.8 request at a time and nothing with several; pairs are unchanged (they were already exact). `mtp_acceptance_by_model` with `"EigenLabs/Qwen3.8-27B-4bit-mtp" = "typical"` restores the old rule (window 8d: acceptance 0.73 vs 0.89–0.90, text matches MTP-off, no loops). +- **Gemma 4 no longer turns away text requests while an image request is being answered;** it still waits while the image is read in (mlx-swift-lm #402; window 12: text beside a decoding image admitted 16/16 within its deadline). +- **Tool calls under `tool_choice: auto` come back as the model wrote them**, as with OpenAI, instead of failing the request; strict, required and named tools are still checked. A refusal's error frame names the check that failed (`tool_check`) (#2003; window 13). +- **Faster first tokens and tool calls (the SDK, `libs/mlx-swift-lm` `093563be11`):** a Gemma 4 prompt's cold first token is about 7 % sooner on M5 Macs, with exactly the same output (row-mapped NAX prefill, on by default; `DARKBLOOM_GEMMA4_NAX_ROW_MAP=0` turns it off); a Qwen 3.5-family first token is 10–12 % sooner under MTP for requests that send `presence_penalty: 0`; a tool parameter declared nullable now takes `null`. An opt-in early response before the SSD checkpoint write finishes ships off by default (`DARKBLOOM_PREFIX_CACHE_SSD_TERMINAL_BEFORE_PUBLICATION=1`). +- **Smaller changes:** `darkbloom models catalog` ends by naming up to three models this Mac could select but hasn't downloaded, with their size (print only; `--json` unchanged; #1957); a pair's planner can't run out of stack (planning runs on its own 16 MiB thread); a pair's leading Mac backs off (30 s up to 10 min) while the other Mac is away and starts at once when it answers; `darkbloom status` says whether fan control is on, and keeps an older authorization denial visible (as do `doctor` and `verify`); truer words on a paired Mac after `cluster leave` and in `doctor`, and the split question names each mode's context; Gemma 4 reasons with `tool_choice` `none`; the desktop app recommends models from what Macs with the same chip earn. +- **Known issues (none blocks this release):** + - On a Mac of 48 GB or less, a very long Gemma 4 pipeline request can get the memory 503 partway through its prompt (past about 190,000 tokens at 48 GB, about 85,000 at 36 GB), for that request alone. + - A GLM-5.3-Flash tensor-parallel request that ends at its first token for memory can leave its prompt's stored prefix on the other Mac until it is evicted; it is never served stale. + - After `darkbloom update --rollback` to 0.10.11, a Gemma 4 or GLM pair set up on 0.10.12 must run `darkbloom cluster` again: 0.10.11 can't read the saved width. +- Pair owners: both Macs of a pair must run the same version; a pair on 0.10.11 updates itself at its slot, or at once with `darkbloom update` on each Mac. `darkbloom update --rollback` puts back 0.10.11. +- Pairs still on 0.10.10 stop serving through Darkbloom once 0.10.12 registers, until they update (0.10.12 and 0.10.11 hold 24 pair approvals each, the coordinator keeps 64). +- The registration keeps 0.10.11's fields; its cluster runtime facts change where the modes do: Gemma 4's pipeline qualification serves the whole context again, and the tensor-parallel widths follow each Mac's memory. Deploy the coordinator that ships with 0.10.12 first. +- The 50 entries below are the pending fragments rendered verbatim, except where the release notes reword one; CI-only entries change no provider behaviour. + +### `status`, `doctor` and `verify` keep an older denial visible + +- A provider's last coordinator authorization was shown only while it was at most 10 seconds old. An App Attest lease already stayed visible until it expires, but an older `none` (a denial) or `legacy` report vanished from `darkbloom status`, `doctor` and `verify`, so a Mac the coordinator had denied could look healthy. Such a report now stays visible as dated history: `Last reported authorization: received 10m ago; not a fresh dispatch grant. …` in `status`, and a `last reported authorization` line in `doctor` and `verify`, INFO for legacy and WARN for a denial. +- History never stands in for a current grant or the public proofs: it offers no MDM removal or migration, and `doctor` and `verify` still run the trust and public attestation checks after it. `darkbloom verify` now fails on a WARN or FAIL line, not on an INFO line. + +### A stream that stores its prompt's checkpoint no longer waits for row-by-row coding + +- When a request's prompt checkpoint is written to the SSD prefix tier at a quantized checkpoint precision (`balanced`, the default), the response's terminal waits until the checkpoint is written. Writing it read the checkpoint's attention rows one row at a time and coded each on one CPU core. On GLM-5.3-Flash every read also rechecked the native binding, so on an M5 Ultra the stream stayed open 63 s after a 200k-token prompt's last token and 17 s after a 57k-token one; in production on 0.10.11, Gemma 4 26B requests with 4–32k-token prompts waited a median 1.2–1.6 s, GPT-OSS 20B 8–32k 1.7 s and GLM-5.3-Flash ≥ 128k 51 s, and the Mac kept the request's memory reserved meanwhile. +- The export now reads a head's rows in batches of up to 256 KiB, codes each batch on up to four cores (a quarter of the Mac's active cores) and rotates eight lanes at a time. The checkpoint's bytes are unchanged, so restores and their answers are exactly as before. CPU coding cost per 512-wide row falls from about 3 µs to about 0.6 µs on an M5 Ultra. + +### CI: a Darkbloom Sandbox without the Darkbloom cache uses no Actions cache + +- On a Darkbloom Sandbox that the plane gave no Darkbloom cache, `actions/cache` read and wrote GitHub's own Actions cache through the gateway. A `master` push on 2026-11-05 (job 127018716621) saved `.git`, a 1.69 GiB Swift build, the SwiftPM repositories and a Metal library to the `refs/heads/master` scope; `dev` pushes on 2026-11-07 and 2026-11-09 saved `.git` to `refs/heads/dev`. +- Each routed job that uses a cache now first runs `Choose this job's Actions cache`. On a runner named `darkbloom-*` without `DARKBLOOM_CACHE_URL` it sets `CI_ACTIONS_CACHE=off`, and every `actions/cache` step and `actions/setup-node` cache then skips. Darkbloom jobs with the plane's cache, Blacksmith and GitHub-hosted jobs, and the Blacksmith-only release workflows keep their caches. +- A restored `.git` is now discarded, before any git command reads it, if it is not a directory, holds a symbolic link or any hook but git's samples (also in `.git/modules`), or has a config that sets `core.fsmonitor` or `core.hooksPath` or includes another file. This holds on every runner. + +### CI: every Cluster GPU Tests shard asks Darkbloom first + +- Each of the 3 Cluster GPU Tests shards now asks the Darkbloom plane for a sandbox on a lane of its own (`test-cluster-gpu-1`, `test-cluster-gpu-2`, `test-cluster-gpu-3`; 4x24 while sizes are on). Each falls back alone to `blacksmith-12vcpu-macos-27` when the plane does not grant it. A lane routes only when the approval's `lanes` names it; on 2026-11-10 it named `test-cluster-gpu-1` and `test-cluster-gpu-2` but not `test-cluster-gpu-3`. +- Shard 2 no longer needs 42 GiB. The paged verify/prefill attention bench (`paged-verify-bench`) bounds MLX's freed-buffer cache to 1 GiB, as a ready Qwen tensor-parallel rank does. Before, the cache kept every prompt chunk's attention temporaries, and the bench's process reached 34.26 GiB. The bench also prints its peak active memory and cache size for each run. +- A full CI run now asks for 15 macOS jobs instead of 14. The GPU lanes come last in the lane table, so the `DARKBLOOM_MACOS_LANES` cap drops them first. + +### CI: the cluster qualification checks build with the job's selected Xcode + +- `libs/darkbloom-cluster-worker/Tests/QualificationChecks/run.sh` now uses the Xcode and SDK the job's toolchain step selected (`PROVIDER_SDKROOT`), so it no longer fails on a runner whose default developer directory is the command-line tools (`SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" cannot be located`). Local runs keep `xcrun`'s own selection. CI only; no provider behaviour changes. + +### Provider CI: smaller job sizes for the cluster runtime shards + +- The cluster runtime tests that drove the shards' memory now run with MLX's freed-buffer cache bounded: 4 GiB for the GLM-5.3 paged KV, row invariance, depth invariance and window census tests and Qwen's prefix-depth test, 1 GiB for the Gemma 4 paged synthetic stages and the GLM-5.3 prefix SSD restore. MLX's default cache kept every prefill frame's temporaries, which no later request reuses. The bound changes no result, no assertion and no shard's time. +- Peak used memory: Cluster Runtime Tests shard 2 from 26.51 to 14.64 GiB, shard 3 from 13.21 to 10.71, shard 5 from 15.33 to 11.48 (the largest sample before and after). +- While `DARKBLOOM_JOB_SHAPES` is `on`, the lane of runtime shards 2 and 3 (`test-cluster-2`) asks for 4x24 instead of 12x32, and the lane of shards 4 and 5 (`test-cluster-3`) for 4x16 instead of 4x24. The other lanes keep their sizes; `docs/developer/build.md` (Job sizes) has each job's sampled memory from 20 full dev runs. + +### CI: the desktop review package asks Darkbloom first + +- The manually dispatched Desktop App job that builds the unsigned macOS review package (`unsigned-desktop-review`) now asks the Darkbloom plane for a sandbox Mac on lane `desktop-package`. It falls back to `blacksmith-12vcpu-macos-27` when the plane does not grant it. +- The job is renamed from `review-package` to `desktop-package`, so that its lane has the job's name, as the lane of every unsharded routed job does. +- Pull requests and pushes do not ask for this lane: the job runs only on manual dispatch. + +### Simpler two-Mac cluster setup + +- The first Mac's last line while it waits is set apart and stressed: "→ Now run `darkbloom cluster` on the other Mac" (`darkbloom cluster local` names its own command). +- `darkbloom cluster` no longer asks how the pair serves: it always serves through Darkbloom with the leading Mac's local API beside it, and Darkbloom keeps serving while you use that API: once the pair switches, starts or is shown serving, the leading Mac saves `[local] mode = "both"` and, where no `me_first` is saved, `me_first = false` (a run that changes nothing saves nothing; a pair already serving Both with the pause on keeps it until its next start, and the screen says so). To have Darkbloom pause for you again, set `[local] me_first = true` on the leading Mac and run `darkbloom restart`. A pair saved as Only me or as the Darkbloom network alone switches when `darkbloom cluster` runs and says so in one line; `darkbloom start`, an update or a restart never changes how a pair serves. "Change how the pair serves" is gone from the menu; `darkbloom cluster local` stays the local-only command. +- Where a pair can't serve through Darkbloom (no login, no approval), the screen says "To use the pair just for yourself, run `darkbloom cluster local`." instead of offering "Serve locally only". +- `darkbloom cluster` chooses tensor parallel or pipeline by itself for a new model: tensor parallel unless it can't run on these Macs or this pair measured it slower. A pair's own model keeps the mode it last served in, also when a stopped pair starts again. The model list no longer shows modes. `darkbloom cluster local` still asks, with the same choice tagged Recommended and preselected. +- A start ends on one standout line, "✓ Serving on both Macs" (locally: "…, on your local API at http://localhost:"), and "`darkbloom status` for details", the same on both Macs. The pair's card (log, login, commands) is in `darkbloom status`. +- On an interactive terminal, both Macs end with "Press Enter to exit." (q and Esc too); `NO_COLOR`, `TERM=dumb`, pipes, `CI` and runs without a terminal never wait, and the screen's lock is released first, so another `darkbloom cluster` or `start` isn't refused. The pair keeps serving. + +### A two-Mac pair takes the requests whose first token it can deliver in time, and only those + +- Once a pair had measured how fast it reads a prompt, it turned away every Darkbloom request as "deadline unreachable", even one it could serve at once. Darkbloom sends a first-content deadline with every request, and the pair estimated no first token at all. +- Now the pair estimates each request's first token from its own measured prompt speed, behind the prompts it is still reading for the requests it already holds, since it reads them one after another. It takes a request whose first token comes in time and turns one away at once when it would not, so Darkbloom sends it to another Mac. Before, eight long prompts arriving together were all taken, and the last waited about a minute for its first token. + +### A pair's first answer after the other Mac's part stops is its typed 503, at once + +- When the part of the pair on the Mac that runs the pair's API stops or starts again (a stop, a restart, an update, a + crash) while that Mac stays on the cable, every request, the first one included, now gets a `503` with `code` + `pair_api_unavailable` and `Retry-After: 10` at once, on that Mac and through the other Mac's port alike. Before, the + first ones got `{"error":{"type":"invalid_request_error","message":"Provider capacity is temporarily unavailable."}}` + with no code, once after 19 seconds. The pair's API now answers "The pair's API takes no requests right now: the pair + is starting or stopping. Requests resume when it serves, …" while its pair doesn't serve, never holding a request until + it does, and a request made during the pair's warm-up request is refused at once instead of waiting for it. +- Both `503`s a pair's other Mac answers (`pair_mac_unreachable` and `pair_api_unavailable`), and the pair's API's own, + now end the same way: "…, or run `darkbloom stop`, then `darkbloom start --solo`, to serve this Mac alone (`darkbloom + start --solo` by itself is refused while this Mac's part of the pair holds its serving lock: up to 15 minutes after + the other Mac last answered over the cable)." +- Through the other Mac's port, a key it can't judge (another key in the local key format, such as the leading Mac's + own, which works through it while that Mac is there) gets the same `503` without the other Mac's name, instead of a + `401`. A missing key, one without `Bearer`, or one that isn't a local key still gets the `401`. +- While the pair's API on the leading Mac starts again, the other Mac's port stays up and answers those `503`s, instead + of refusing connections until that API is back, and its `darkbloom status`, `darkbloom local` and `darkbloom doctor` + say "Local API: http://127.0.0.1:/v1 on this Mac answers 503 for now." with the `503`'s words, instead of "not + listening on this Mac yet". +- A local request waiting for one of the pair's lanes when a stop or an update begins gets the same `503`, instead of a + `429`. A request without a key that reaches the pair's API while it stops gets the API's `401`, instead of a `503`. + +### A pair's leading Mac starts its part less often while the other Mac is away + +- While the other Mac of a pair doesn't answer (asleep, off, its cable out), the leading Mac keeps its part ready for 10 minutes so the pair re-forms when that Mac is back. Its part can't form the pair meanwhile, and each start reads its share of the model and registers with the coordinator again. A part that ended was started again every 30 seconds (every 48 seconds for a MiMo leader whose other Mac slept). It now waits twice as long as the last time, from 30 seconds up to 10 minutes (30 seconds, then 1, 2 and 4 minutes), and starts at once when the other Mac answers. While the other Mac answers, a part that keeps ending starts again as before (6, 12, 24, then every 30 seconds). +- `darkbloom cluster status` on the leading Mac says when, under the line that it waits for the other Mac: ``This Mac's part starts again in 4 min, or as soon as the other Mac answers: while the other Mac is away, each start waits twice as long as the last, up to 10 min.`` + +### Recommended models from Macs with the same chip + +The desktop app's "Recommended for your Mac" now ranks models by what Macs with +the same chip earned per day from each model over the last 24 hours (the typical +Mac first, then the average), when the coordinator publishes those figures in +`/v1/stats` `model_earnings[].by_chip`. Network-wide 7-day totals favor models +that many fast Macs serve, which can pay a slower Mac nothing. Without per-chip +figures, or when they cover no model this Mac can serve, the ranking falls back +to network totals as before. + +### Stopping no longer waits for requests the coordinator abandoned + +- Before, `darkbloom stop`, `restart` and `update` waited for every accepted request to finish, including requests the coordinator had already cancelled because their client left or their first token was late. A request stuck behind a stalled engine never finished, so the drain timed out after its full deadline and asked for `--force`. +- Now a request the coordinator cancelled counts for at most 30 s after the cancel. Its answer has nobody to go to; if its task has not ended by then, the drain stops waiting for it. Memory and eviction still treat it as in flight until it ends, and a native MiMo slot still retires only after its last request. + +### A Gemma Mac decoding an image request accepts deadline text again + +- A Gemma 4 Mac refused every text request with a first-content deadline (`deadline_unreachable`, profile reason `multimodal_work`) while an image or video request was anywhere in its engine, including the image's whole decode, which is about 98 % of its time there. On OpenRouter this was 0.9–1.8 M refused attempts a day on 11-08..11-10, almost all on M5 Macs, and 16–59 K requests a day ended as 429s. +- The SDK now refuses only while the image request still has prompt work (until it has sampled from its whole prompt). After that its decode is priced like any other decode row, so the text request is admitted when its first token fits the deadline. Image requests themselves, other models' media (all causal) and text-only engines are unchanged. + +### Gemma reasons with `tool_choice` `none` + +- A Gemma 4 request with `tool_choice` `none` and reasoning on could not open its thought: the sampler that keeps tool calls out also masked Gemma's reasoning delimiters, `<|channel>` and ``. Such a request now reasons and answers as it does without `tool_choice`; before, it could repeat until it hit its output limit. Tool-call markers stay refused, and required or named `tool_choice` is unchanged. + +### A Gemma 4 pair's pipeline serves the model's whole context + +- A Gemma 4 26B pair in the pipeline now accepts prompts up to 262,143 tokens and up to 32,768 output tokens within 262,144, as in tensor parallel and on one Mac. Before, its pipeline served the 32,768 + 32,768-token request (65,536 tokens). A pipeline Mac whose memory refuses a running request ends only that request. Each Mac's memory gate still decides, request by request, whether a longer one fits now. With lanes (a setup that prefills serially), the gate decides when the request starts, and a long request can still be refused partway through its prompt when the Mac runs short. + +### Gemma 4 tensor parallel serves 2 requests at once where both Macs' memory holds them + +- A Gemma 4 26B pair in tensor parallel served one request at a time. Through Darkbloom, every request beyond the + one it served was turned away as "at capacity". +- Now the setup sizes the QAT 4-bit pair the way it sizes Qwen 3.8 27B's tensor parallel: it serves 2 requests at + once where both Macs can hold them now beside the model. Each request after the first is charged everything one + request holds at the standard request (32,768 prompt plus 32,768 output tokens), about 2.6 GB on each Mac, and each + Mac reserves that width when the model loads, the planner counting that reservation while the model is read. +- Why 2: on two M5 Ultras every request got its own tokens at 2, 4 and 8 at once, but each request was served fastest + at 2 (77 tok/s each and 95.5 in all, against 48.5 and 96.2 at 4). The 8-bit model still serves one request at a + time; nothing has qualified its lanes yet. +- The setup screen and the number the pair reports to Darkbloom are the same width. Where only one request fits, + the pair saves no width and serves one request at a time, as before. +- Each request still gets exactly the tokens it gets alone. A request cancelled or refused for memory ends alone, + and the others keep running. + +### Gemma 4 compiled feed-forward dispatch + +Adopt the native SDK's shape-specialized feed-forward graph for eligible Gemma 4 +GPU decode and verification rows. A matched single-request M5 Max endpoint +comparison with 8K cached context measured a further 2.5–3.2% decode-proxy gain +over the prior dispatch change. Parameter updates, eager fallbacks and existing +attention, MTP, admission, prefix-cache and SSD-write behavior are preserved. +Broader concurrency and other-chip gains remain unqualified. + +### Gemma 4 native dispatch efficiency + +- Adopt the SDK's shared dense GeGLU reuse for eligible Gemma 4 models, preserving numerical expressions, parameter contracts, paged attention, prefix caching and SSD write policy. Gemma 4's decode command-buffer limits are unchanged by this entry. +- An initial warm 8K, single-request endpoint screen on one M5 Max measured a 3.5–3.9% decode-proxy improvement with matching outputs, together with an earlier scoped command-buffer limit that has since been replaced, so the gain is not attributed to the GeGLU change alone. Broader concurrency, prefill, clustering and other hardware remain unmeasured; memory and admission safeguards are unchanged. + +### Gemma 4 row-mapped NAX prefill + +Adopt the native SDK's shared plain-greedy metadata shortcut and guarded Gemma 4 +row-mapped NAX prefill route, enabled by default within its existing hardware, +shape and evaluation guards. Exact `DARKBLOOM_GEMMA4_NAX_ROW_MAP=0` restores the +original graph, with the override forwarded when creating a LaunchAgent job. +Same-app M5 Max comparisons in both orders measured 6–7% lower cold HTTP time to first generated +frame for uncached 4K/8K single requests, with exact paired outputs. A longer +warm decode control was neutral. These are not additive speedups or concurrency, +other-chip or clustering claims; attention, MTP, admission, prefix caching and +SSD-write policies are unchanged. + +### A GLM-5.3-Flash Mac no longer reads as full while it serves nothing + +- A GLM-5.3-Flash Mac's heartbeat now reports as used only the requests it holds, as its own admission charges them. It used to report the memory its engine keeps after every request and reuses for the next, which grew to 90–99 % of the budget, so Darkbloom turned most GLM requests away while the Mac sat idle. A GLM Mac can now take as many requests at once as its memory admits. +- A GLM request waiting for another's prompt to finish is now counted once. It was counted twice on this Mac's own API, so a 256 GB M5 Ultra took two long requests at once instead of three. + +### GLM-5.3-Flash answers a JSON format with an image or video on one Mac + +- A GLM-5.3-Flash Mac now serves a JSON `response_format` (`json_object` or `json_schema`) together with image or video input. Before, it refused every such request with HTTP 400 `Invalid inference request.` (failure code `invalid_request`) before any media work. +- It works as GLM's text JSON mode does: the instruction renders in the media prompt, reasoning streams on its own channel, and the answer is withheld until generation ends, then checked and exposed once. An answer that isn't the JSON asked for is a 422 with no content. +- Still refused with 400: a required or named `tool_choice` with image or video input, and a JSON format with image or video input on a cluster pair (the pair's media routes don't withhold the answer). +- Darkbloom's coordinator answers these requests itself, without dispatching, for Macs on earlier provider versions. + +### GLM-5.3-Flash tensor parallel serves as many requests at once as both Macs' memory holds + +- A GLM-5.3-Flash pair in tensor parallel served up to eight requests at once on any two Macs. Its load checked + memory for one request only, so a pair with room for fewer still told Darkbloom eight. +- Now the setup sizes GLM the way it sizes Gemma 4 26B and Qwen 3.8 27B in tensor parallel. It saves the widest of 8, + 6, 4 or 2 requests at once that both Macs can hold now beside the model, and each Mac reserves that width when the + model loads. Each request after the first is charged what it adds at the standard request (32,768 prompt plus + 32,768 output tokens): about 9.7 GB. +- The setup screen and the number the pair reports to Darkbloom are the same width. Where only one request fits, the + pair saves no width and serves one request at a time. +- When a Mac has less memory free at load time than at setup, the pair still loads: each Mac reserves as many of the + saved requests as it can hold then, at least one, and takes the others as memory allows. On two M5 Ultras an + 8-request pair whose Mac had other programs using 38.68 GiB did not load at all; it now loads with 6 reserved. +- A pair set up before this version is planned again by itself after the update, as after every Darkbloom update, + and saves its width then. +- Each request still gets exactly the tokens it gets alone. + +### Developer tooling + +- Add an offline GPT-OSS publisher checkpoint repacker that preserves MXFP4 + experts and BF16 non-expert tensors, with source/output verification and + comparison receipts. Add frozen-request replay guards for paged attention, + effective prefix reuse and complete streams. These tools do not change the + registered model or establish candidate qualification. + +### A request no longer waits forever behind the idle speed check + +- Before, a request that arrived while the provider ran its idle speed check (MiMo repeats it whenever the Mac is idle) waited for the check to finish, with no time limit, and ignored its coordinator's cancel. If the check stopped making progress, every later request on the Mac was accepted and never started: the coordinator timed each one out, and `darkbloom stop` waited 600 s for them and gave up. +- Now a cancelled request stops waiting at once, and any request stops waiting after 30 s and is refused as busy, so the coordinator sends it elsewhere. While the check is overdue the model reads `crashed` in the heartbeat, so no new requests are routed to it; it serves again as soon as the check finishes. + +### Nemotron 3.5 Lightning serves plain decode instead of its MTP head + +- Under the default `mtp_mode = "auto"` Lightning now serves plain decode instead of its embedded MTP head. The head speculates for one request only: beside a second request each step became a slower hidden-returning step, and production decode fell from about 110 to about 54 tok/s (11-09). It also charged about 45 KB of head state per context token, so a Lightning slot's token budget was about an eighth of its KV and many Macs could not admit one request with the default 32,768 output tokens. Plain decode commits a Metal command buffer every 100 operations instead of after almost every MoE layer. A single request at temperature 0 keeps the same output. Explicit `mtp_mode = "on"` keeps the head. +- The gain is not universal, on an M3 Ultra: a single request at the artifact's default temperature 1.0 stays about even, text the head predicted very well (counting, repeats, tables) runs up to about 30% slower, and a row decoding beside another request's long prompt runs at about half the head's rate. +- Sampled output follows the target's own distribution: the head's lossy `typical` acceptance no longer applies to Lightning. +- Its complete checkpoints keep native rows by default, as they did beside the head, so a cache hit's output does not move. A global `balanced` in a saved `provider.toml` does not change that; `k4v4`, a per-model setting or the process switch do. Lightning's target-only artifact and explicit `mtp_mode = "off"` follow the same default. +- Cache identity includes the MTP configuration, so a provider's existing Lightning checkpoints stop matching and age out within their 30-minute lifetime. + +### Answers that repeat themselves verbatim stop early, as `length` + +- An answer that starts repeating one block of text word for word now stops after about 2,000 repeated tokens instead of running to its output limit (up to 131,072 tokens, 25–40 minutes on one Mac). It ends like an answer cut at `max_tokens`: `finish_reason` is `length`, the usage counts the tokens produced, and the request is paid as usual. The Mac is free for the next request sooner. +- Only exact repetition counts: the last 2,048 tokens or more must repeat one block of 8–512 tokens at least 8 times in a row, and never within an answer's first 4,096 tokens. A tool call, a JSON answer and a forced tool call are never cut. +- On by default for Gemma 4, Qwen 3.5/3.6/3.8, GPT-OSS, Nemotron 3.5 Lightning, GLM-5.3 and MiMo. Nemotron 3.5 Super is not covered yet: its requests take Super's own route. `DARKBLOOM_LOOP_GUARD=0` turns it off. + +### A media decode refusal no longer marks the provider's token budget as full + +- A video or audio reader that fails twice with a decoder, hardware or interruption fault, and a Nemotron Super video whose decode allowance runs out, are still refused as a retryable 503 (failure code `capacity`). Their error reason is now `media_memory_unavailable`, not `capacity_busy`. +- The coordinator still sends the request to another provider, up to its three capacity refusals. It no longer reads the refusal as a full token budget, so the provider's budget for the model is not clamped to zero for up to 5 minutes, and the provider gets no capacity strikes. + +### A slow MiMo step no longer stops the MiMo slot for good + +- Before, a native MiMo step that ran longer than 30 s, such as a prefill step deep into a long prompt on an M3 Ultra, made the engine's step watchdog seal the engine. The engine never took another step, even after the slow step finished, and the slot stopped serving until MiMo was reloaded. +- Now a native MiMo step may run up to 120 s, the time the engine already allows a prefill to go without progress. A step that never finishes is still caught, after two minutes instead of 30 s. Other models keep 30 s. + +### Models catalog names the models this Mac could add + +- `darkbloom models catalog` now ends with the catalog models that are not downloaded and that this Mac could select: at most three rows with id and download size, larger first, then `darkbloom models download ` and `darkbloom switch`. The note is printed only when there is at least one such model. +- A model is named when the `darkbloom start` picker would offer it to this Mac (required runtime capabilities present, not a hidden build or one replaced under a public alias), it is an active text model, its listed `min_ram_gb` is at most this Mac's memory, and it fits the provider's load budget alone. Free disk space, the memory reserve and memory in use at load time, the coordinator's minimum provider version and the provider's trust status are not checked, and the note says so. +- The note only prints: nothing is downloaded, selected or saved, and no request is added. The table's catalog request now also asks for the public aliases (`include_aliases=1`); the `--json` request and output are unchanged. + +### Gemma 4 26B QAT drafts with exact MTP acceptance + +- The catalog `gemma-4-26b-qat-4bit` now uses exact draft acceptance by default: each token a speculating sampled request commits is the model's own draw, so its outputs follow the model's distribution (exact in distribution; the tokens are not bit-identical to decoding without MTP). Every other model keeps its built-in rule; the 8-bit Gemma builds draft only with `mtp_mode = "on"` and stay typical. +- Its assistant drafts most Gemma rows, and typical acceptance keeps drafts the model would rarely have sampled; once a repetition starts the drafter predicts it and it is kept. On OpenRouter's GPQA run of 10-31 every Gemma answer drafted under typical acceptance and 30 % ran to the 32,768-token cap with no answer. +- Exact keeps fewer drafts, so MTP speeds a Gemma stream up a little less: a speed cost of about 0–4 % (0.96x of typical at one request in the 10-07 measurements, 0.99–1.01x in the 11-10 M5 Ultra A/B). `mtp_acceptance_by_model` with `"gemma-4-26b-qat-4bit" = "typical"` restores the old rule. + +### Qwen 3.8 27B drafts with exact MTP acceptance on a single Mac + +- The catalog `EigenLabs/Qwen3.8-27B-4bit-mtp` (and its head-less target `EigenLabs/Qwen3.8-27B-4bit`) now uses exact draft acceptance by default: each token a speculating sampled request commits is the model's own draw, so Qwen 3.8's outputs follow its distribution (exact in distribution; the tokens are not bit-identical to decoding without MTP). This applies on every single-Mac path: network serving, Only me / `--local`, and both MTP upgrades. Qwen 3.8 pairs never used typical acceptance, and every other model keeps its built-in rule. +- On a single Mac a lone Qwen 3.8 request drafts, and typical acceptance keeps drafts the model would rarely have sampled. On Qwen3.5-9B typical acceptance made long answers loop to the output cap (13 of 31 draws, against 0 of 31 under exact). Qwen 3.8's own production records point the same way, though they are observational: while the fleet moved from 0.9.17 (exact) to 0.9.18 (typical), Macs on typical ran long Qwen 3.8 answers to their `max_tokens` about 3.6 times as often on the same traffic. Since 11-09, every one of the 229 single-Mac Qwen 3.8 answers of 8,192 tokens or more that ended at their cap had drafted; none of the 33 long answers that never drafted did. +- Exact keeps fewer drafts, so Qwen 3.8 decodes about 4–5 % slower on single Macs, all of it while a Mac serves one request at a time (a lone request runs at about 0.93x of typical in the 10-07 measurements). A Mac serving several requests at once is unchanged. `mtp_acceptance_by_model` with `"EigenLabs/Qwen3.8-27B-4bit-mtp" = "typical"` restores the old rule. + +### MTP assistant upgrade: no forward on the model while it serves + +- When a provider attaches the verified MTP assistant to a model that is already serving (the idle upgrade), building the replacement engine no longer runs a forward on that model. It reuses the KV types observed when the model was first loaded. +- A forward from the preparing thread could race the serving engine. With Gemma 4's compiled feed-forward (mlx-swift-lm `093563be` and later), that race crashed the provider with `Attempting to eval an array without a primitive` when a request arrived during the upgrade, typically the first request after a start. + +### Nemotron Super serves JSON output, tools and its settings with images and video + +- An image or video request to Nemotron 3.5 Super now takes the same request plan as a text request. `response_format` (`json_object` and `json_schema`), `tools`, `tool_choice` (auto, none, required or a named function), `parallel_tool_calls` and `min_p: 0` are served with media. Before, the Mac refused every such request as `invalid_media` (400). +- Tool calls and JSON answers with media are withheld and validated as for text: an invalid JSON answer or a broken forced tool choice returns 422, or ends a stream with an error event. +- Nemotron Super now advertises `native_media_tools`, so the coordinator sends it forced tool choice with media and media in tool results. It also advertises `native_media_controls`, which a coordinator can require before it sends a Super request with media and a JSON response format or tools, so Macs without this release do not receive them. +- A media-route refusal names its cause by its failure code. A request control that the text route also refuses (`logit_bias`, `n > 1`, `min_p` other than 0, `prompt_cache_key`, `top_logprobs` outside 0 to 20) is `invalid_request` (400), as are a prompt whose visual tokens do not fit the context and text that names `` or `