Skip to content

GLM-5.3-Flash serving, residency safety and MiMo tool-schema parity - #1516

Merged
Gajesh2007 merged 51 commits into
masterfrom
work/glm53-flash-release
Oct 22, 2026
Merged

Gajesh2007 merged 51 commits into
masterfrom
work/glm53-flash-release

Conversation

@jonathan308

@jonathan308 jonathan308 commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Update 2026-10-21: every submodule pins its latest main

The head is now 56b89df05 (signed, Verified). It contains the latest master (through #1531) with no conflicts. mlx#37, mlx-c#16, mlx-swift#58, mlx-swift-lm#314/#325 and darkbloom-platform#114 are merged.

Submodule Pin (latest main) Relation to the qualified build
libs/mlx ad4745a2 (#37) identical tree to ad596687
libs/mlx-swift 67dc7528 (#58; mlx ad4745a2, mlx-c 5e9be4da) identical tree to d80124e
libs/mlx-swift-lm 0351444e (#314 as 19634dd8, then #325, #323) ffb71842 plus #318, #325 and #323: Nemotron Super/ModelOpt code and the mlx-swift main pin only; no GLM path reaches them

master merges (b5f30eb1f, 2498c5dfa, ec0d87ae1, fd9649540) bring #1519, #1527, #1533, the Nemotron 3.5 Super provider (#1510, #1538, #1528, #1531) and #1523. GLM and Super stay side by side in the shared provider files; the local chat responder tries Super's raw-chat hook before inferring a reasoning parser, which Super's owner refuses. Provider suites: 547 tests pass (one MiMo scanner test needs its separate fixture variable). GLM code and the metallib (156f2624…) are unchanged.

---|---|---|
| libs/mlx-swift | main 67dc7528 (#58; mlx main ad4745a2, mlx-c main 5e9be4da) | identical trees to d80124e, ad596687, fa6565d4 |
| libs/mlx-swift-lm | main 19634dd8 (#314) | ffb71842 plus #318 (Nemotron Super/ModelOpt only; no GLM path reaches it) |

GLM code and the metallib (156f2624…) are unchanged. A provider built from these pins (darkbloom f28c62bc…) gives output byte-identical to the qualified build in all 14 serial-target endpoint cases (391, 2.7K / 10.5K / 31.6K prompts, 256 / 1,024 decodes, 3-turn chat, image, concurrent pair, repeats).


Update 2026-10-21: paged attention only; three bit-identical speedups reach paged serving; #314 repinned to ffb71842

The head is now af2913787. Every commit is signed and Verified.

Commit Change
f0ff572f5, a450ae882, f4f8585db Pin mlx-swift-lm 13fba500, then 46e4d0ba (swift-format layout only): #314 with all four speedups on the paged path, including split-K paged decode attention. Docs: the qualification record's paged-attention section, the changelog fragment, docs/architecture/inference.md and the CLI reference's .serving description
af2913787 Pin mlx-swift-lm ffb71842 (#314 with ffb71842: paged decode keeps the absorbed attention). Docs: the qualification record and changelog fragment describe three bit-identical speedups; docs/architecture/inference.md returns to the earlier paged decode wording; the CLI reference names the native decode selection and sparse prefill kernels. The native pins and the metallib (156f2624…) are unchanged

#314 deprecates the contiguous GLM forward; serving is paged-only. Three speedups that reached only the contiguous path now reach paged serving, each bit-identical: the shared all-true validity and one-launch embedding, .nativeGEMM DSA/KDA prefill projections in .serving, and one-launch DSA payload staging. The fourth, split-K DSA decode attention for paged decode and MTP verification, stays off so serving output stays bit-identical to the qualified build (d9780e86…). It matches the contiguous arithmetic but not the qualified paged output: on the perplexity panel at 8-token steps it gives +0.0049 % perplexity (7.310244 vs 7.309884) and 97.60 % top-1 against absorbed decode attention, below the 99.4 % lossless bar, and the real-model MTP token check matched 20/30 sequences (the 2 prompts past 2,048 tokens differed). Its gain is given up: in the same-state endpoint A/B (A-B-B-A, medians of 6) the build with it (e31b5ba9…, SDK 12d00808) decoded 256 tokens after 10.5K- and 31.5K-token prompts 5.5 / 3.8 % faster. In that A/B the kept native projections made prefill 0–1 % faster; decode is as the previous build's.

Provider build darkbloom 6b95747e49d50d32b16018a53bc5fb22a77bd7db2478933e3495b1e15a22db02 (SDK ffb71842), metallib 156f2624…:

Check Result
New SDK GPU tests payloadKernelMatchesComposedRowsBitwise (BF16/FP16/FP32): pass
Perplexity panel, 15,901 positions, 2,048-token chunks bit-identical NLL and argmax (.nativeGEMM)
SDK real-model MTP tokens vs SDK 77a0d1d9 (6 prompts × 5 modes × 256) 30/30 identical token sequences, with identical MTP proposed/accepted counts in every mode
Endpoint serial-target mode vs d9780e86… (14 cases) 14/14 identical (391, 2.7K / 10.5K / 31.6K prompts, 256 / 1,024 decodes, 3-turn chat, image, concurrent pair, repeats). In the first run the concurrent pair's requests arrived 0.28 s apart and one differed; three reruns of the pair with simultaneous arrival are identical, both requests
Provider GLM suites with this SDK 192 + 12 Swift Testing and 5 XCTest pass
SDK GLM GPU suites (61) all assertions pass (env-gated benchmark/oracle skips only)
flowchart LR
  subgraph Before["Before (233195ac4, SDK 77a0d1d9)"]
    D1[paged decode / verify] --> A1[ones validity + embed copy + cast/concat payload + absorbed MLX attention per query]
    P1[paged prefill] --> G1[MLX qmm projections]
  end
  subgraph After["After (af2913787, SDK ffb71842)"]
    D2[paged decode / verify] --> A2[shared validity + one-launch streams + payload kernel + absorbed MLX attention per query, same bits]
    P2[paged prefill] --> G2[NAX prefill GEMM, same bits]
  end
Loading

The qualification of d9780e86… (the e35d965b9 recheck below) therefore applies to this build unchanged.


Update 2026-10-21: GLM thinking can be turned off; catalog lists the full context

The head is now 233195ac4. Every commit is signed and Verified.

Commit Change
233195ac4 GLM-5.3-Flash thinking-off: reasoning.enabled: false, enable_thinking: false, chat_template_kwargs enable_thinking/thinking: false or effort none/off end the prompt with <think></think> and the answer is content only. Thinking-off beside a thinking-on switch, effort level or budget is a 400. Hiding generated reasoning (reasoning.exclude: true, include_reasoning: false) stays a 400, renamed reasoningExclusionUnsupported, as for the other families. Docs, changelog and the qualification record's limits updated

How: the pinned template has no thinking switch and always ends with an open <think>. GLM5NextPromptPolicy adds enable_thinking: false to the render context; GLM5NextThinkingTokenizer (wrapping the GLM tokenizer once at load, so text, media and token counting all use it) appends the </think> token (154842, an atomic added token). That is the empty block the template writes for an assistant turn without reasoning. ReasoningPromptProbe already starts the reply parser in content mode after </think>. The platform sidecar (darkbloom-platform#114) appends the same text, so prompts and cache keys match. Other families are unchanged.

The catalog row glm-5.3-flash is re-registered with max_context_length 262,144 (the model's full context); the provider's admission refuses what one Mac cannot fit. Everything else in the row is unchanged.

flowchart LR
  subgraph Before["Before (e35d965b9)"]
    A1["reasoning.enabled false / enable_thinking false / effort none"] --> P1["GLM5NextPromptPolicy.validate"] --> X1["400 reasoningCannotBeDisabled"]
    B1["reasoning.exclude true"] --> X2["400"]
  end
  subgraph After["After (233195ac4)"]
    A2["reasoning.enabled false / enable_thinking false / effort none"] --> P2["GLM5NextPromptPolicy: context + enable_thinking false"] --> T2["GLM5NextThinkingTokenizer: ...&lt;think&gt; + &lt;/think&gt;"] --> OK2["200, content only (ReasoningPromptProbe: content mode)"]
    C2["thinking-off + effort / budget / true switch"] --> X3["400 invalid_request"]
    B2["reasoning.exclude true"] --> X4["400 reasoningExclusionUnsupported"]
  end
Loading

Validation: provider build, GLM prompt-policy, local chat/response, standalone server, prompt-contract and MiMo prompt suites pass (221 + 12 Swift Testing and 23 XCTest tests on the final head, MiMo prompt fixtures set); an independent review found no correctness, parity or other-family issues and its cleanups are applied; make docs-check, make docs-impact-check BASE=origin/master, make changelog-check pass. Not run on the model: no GPU time while the cluster runs; the change adds one prompt token on the thinking-off path only.


Update 2026-10-21: merged master, Nemotron-merged SDK, qualification recheck

The head is now e35d965b9. Every commit is signed and Verified.

Commit Change
dcf86d7fc Merge master (6 provider fixes; doc stamp conflicts only)
ab5084355 DiffusionGemmaReasoningEmissionTests: Responses objects echo the request's tools/tool_choice (OpenAI shape), so the tool name in response.created is not a leaked call; the test still refuses the call's argument, the thought marker, any function_call item or arguments, and the tool name in Chat Completions. This test failed on every head of this PR before
ab67c7cf6, 419bea278, 599c0c79b Pin mlx-swift c2cbef34 (core ad596687, C fa6565d4) and mlx-swift-lm 77a0d1d9 (#314), each merged with its main (Nemotron 3.5 Super chain)
e35d965b9 Qualification record: final recheck

Recheck of e35d965b9 on one M5 Ultra 256 GB, executable darkbloom d9780e86… (metallib 156f2624… unchanged; later commits change tests, one line break and docs):

Check Result
Tokens, serial-target mode 14/14 byte-identical to the previous final build (31.6K prompt, 3-turn chat, image, concurrent pair)
Endpoint / OpenRouter templates endpoint 18/23 (rest: informational, the known seed limit, a 64K-era probe — the 131,072-token bound is exact — and thinking-off/exclude refused by design); templates none failed
Images / video 45/51 (3 known glyph misreads, 3 outdated harness cases) / 15/15
Prefix cache, SSD restart 10,240 cached on repeat; after a restart 18,432 of 20,015 tokens cached, TTFT 1.99 s
Long context 64K and 125K needles pass
Admission flood 3 served, 5 clean 503, idle in 0.26 s, faults 0
Soak, 20 minutes 466 ok, 0 non-capacity errors, faults 0; memory pressure normal throughout
Performance same-state A/B vs the previous final build: prefill 1,904 / 1,935 / 2,019 vs 1,679 / 1,981 / 2,008 tok/s; decode 59.1 / 59.8 vs 60.1 / 60.6 — equal within variation

Update: other models keep production memory charges; GLM rechecked

The head is now 00a3e6c91. Every commit is signed and Verified.

Commit Change
3de98ebcb, 15d7a833d Pin mlx-swift 205ee3d8 (core 6ee3062c, mlx-c bd03297a) and mlx-swift-lm 322a231f (#314). The core reverts the one-page minimum in the Metal footprint policy (mlx#37 4a355746), so admission charges for every model other than GLM equal the current release. #314 merged main (#316: checkpoint imports staged from host zeros) and fixes its CI (lint, two tests). The compiled sources of 15d7a833d equal 3de98ebcb; only metadata and pins differ
7df9dac1f Qualification record: recheck on the final executable
00a3e6c91 Pin mlx-swift-lm 97b2ca6d (#314; tests only, library sources unchanged)

Why: with the page minimum, the SDK estimates for MTP drafters without a declared buffer layout (Qwen4 inline MTP, NemotronH35 MTP) grow from kilobytes to 37–671 MB per token, so those requests could never be admitted, and Qwen3.5 MTP's partitioned buffers cost about 32 KB more per token. Nothing installs the allocation cap the minimum was written for.

flowchart LR
  subgraph Before["Before (7be147ea8)"]
    P1[footprint policy: one-page minimum] --> Q1[Qwen4 / NemotronH35 MTP: 37-671 MB per token, never admitted]
    P1 --> G1[GLM serving MTP charge 4.89 GB]
  end
  subgraph After["After (7df9dac1f)"]
    P2[footprint policy as in the current release] --> Q2[other models charged as today]
    P2 --> G2[GLM serving MTP charge 4.05 GB]
  end
Loading

Recheck on one M5 Ultra 256 GB, final executable darkbloom 94a83e27…, metallib 156f2624… (unchanged):

Check Result
Tokens, serial-target mode 13/13 text cases identical to the pre-port and port builds; image identical to the previous final build; run-to-run 14/14
Admission flood, 8 × (~30K + 30K) 3 served, 5 clean 503, idle in 0.26 s, faults 0 (unchanged)
Performance prefill 1,899 / 2,023 / 2,009 tok/s; decode 62.2 / 67.7 tok/s (256 / 1,024)
SSD prefix tier across a restart 18,432 of 20,015 tokens cached after the restart, TTFT 2.31 s (DEBUG build, persistent key)
Long context 64K and 125K needles pass
Soak, 20 minutes 559 jobs, 0 non-capacity errors, faults 0, idle at the end; memory pressure normal throughout

GLM-5.3-Flash on one M5 Ultra: speedups, fixes and end-to-end qualification, 2026-10-21

The head is now 7be147ea8. The qualification record is docs/reports/2026-10-21-glm53-flash-single-mac-qualification.md (7be147ea8). Every commit is signed and Verified.

Commit Change
a0f2ca64f, 23eb9d377 Pin mlx-swift-lm (#314) 3ab6dd68 → e4eed647 → 48f1e000: the bitwise GLM kernel speedups ported from the cluster SDK, the MTP charge per chunk (4.89 GB fixed per MTP request instead of 11.31 GB), video frames kept at the 2 FPS sample, and the step-scratch deferral
27ccfd58d Hash model weights with uncached (F_NOCACHE) reads: the cached pre- and post-load hashes pushed ~150 GB of the just-loaded weights into the compressor (memory pressure warning, 17.5 s first-request stall)
6c6643cd9 Report why the SSD prefix store is off (/metrics detail="key_unavailable" and a log line instead of a silent nil); #if DEBUG-only DARKBLOOM_DEBUG_CACHE_KEY_FILE to test the SSD tier across restarts on ad hoc builds
d0e30380e Serve GLM-5.3-Flash video (video_url, inline MP4/QuickTime; the coordinator inlines https media)
a9ac83bc3 Accept OpenRouter's GLM reasoning controls (reasoning.enabled: true, include_reasoning, enable_thinking: true, reasoning.max_tokens → effort); thinking-off is refused with a clear message
dad2d68d1, 1216ffb84 GLM slot refusals and full-Mac (serving concurrency) refusals are thrown before the stream starts: a clean 503 instead of a 200 with a server_error frame
7be147ea8 Qualification record
e114fc348 Merge master (#1524; conflicts only in the error mapping and a doc stamp)
9fd00958f Docs: an omitted max_tokens defaults to min(4,096, half the bound)

Before / after

flowchart LR
  subgraph Before["Before (bc0f3ee9)"]
    L1[load] --> H1[cached weight hashes: ~150 GB compressed, pressure warning]
    R1[OpenRouter request with reasoning.enabled] --> X1[400]
    V1[video_url] --> X2[400 video not qualified]
    F1[long requests while memory is nearly full] --> X3[step refused: every row of the step fails; refusals shown as 200 + server_error]
    S1[ad hoc build] --> X4[SSD prefix store silently off]
  end
  subgraph After["After (23eb9d377)"]
    L2[load] --> H2[F_NOCACHE hashes: pressure normal]
    R2[OpenRouter request with reasoning.enabled] --> OK1[200, reasoning returned]
    V2[video_url] --> OK2[2 FPS sample → vision tower → target-only decode]
    F2[long requests while memory is nearly full] --> OK3[step deferred, newcomer waits, running rows continue; refusals are 503 before headers]
    S2[ad hoc build] --> OK4[metrics name key_unavailable; DEBUG key file for restart tests]
  end
Loading

Evidence on one M5 Ultra 256 GB

All runs use EigenLabs/GLM-5.3-Flash-MLX-NVFP4-mtp@8841c52a (aggregate 3aae613f…), the .serving policy and metallib 156f2624….

Check Result
Port bitwise (pre-port SDK vs port) endpoint deterministic mode 14/14 byte-identical; SDK real-model MTP 30/30 token sequences (target-only, serial, depths 1–3); perplexity 7.313970 vs 7.313970, 15,901/15,901 top-1
Performance, final head (128K listing, SSD tier, adaptive MTP) vs previous baseline prefill 2.7K / 10.5K / 31.5K 1,906 / 2,030 / 2,029 tok/s (+17 / +13 / +13 %), 64K 1,903, 125K 1,597; decode 256 / 1,024 64.0 / 65.7 (+10 / +22 %); c1 / c2 / c4 aggregate 61 / 74 / 95; same-day deterministic A/B: prefill +12.5–12.8 %, decode +16–18 %
Endpoint 391, streaming, stops, length, over-context 400, disconnect, efforts, tools auto (required/named 400), /v1/responses previous_response_id: pass
OpenRouter templates (emulated at the provider) 12/12 including both video templates, streaming and non-streaming
Prefix cache (SSD tier) 10.6K repeat TTFT 6.79 → 1.22 s; multi-turn reuse; media excluded; across a restart: 20K prompt 10.70 s → 2.15 s (18,432 cached)
Images / video images 48/51 (3 slashed-zero glyph misreads); video 15/15 with known content, refusals 400
Long context needles 32K and 60K 6/6; 128K and 190K pass; 250K refused at ~220K (single Mac memory) → catalog context set to 131,072
Admission 8 × 60K-token flood: 5 clean 503s, 3 served, no OOM/hang/fault; 3 concurrent long requests keep running
Soak 40 min (1,464 jobs) + 20 min confirmation (865 jobs): no hang, no fault, idle at end; final run 0 server_error
Memory pressure normal through load and every run

Limits

  • Default adaptive MTP is not run-to-run reproducible, even for seeded sampling.
  • Aggregate decode barely scales with concurrency, because MTP speculates for one row only.
  • The SSD tier needs a signed build's keychain-wrapped key.
  • 250K-token requests do not fit on one 256 GB Mac.
  • M5 Max is not measured.

Refactor pass

Done by separate reviewer agents for every provider and SDK change; their cleanups are included and no behaviour changed.


Single-Mac release split, 2026-10-20

This PR no longer depends on the two-Mac cluster PRs. The new head is bc0f3ee9:

  • 1bf438c0: merge of master (cb0748a8). It brings in Default deeper complete-checkpoint SSD restores on large-memory Macs #1520 (deeper complete-checkpoint SSD restores) and fix(ci): preserve threat-review context and diagnose failures #1522. The only conflicts were three docs "Last updated" lines.
  • bd43bdc5: pins the single-Mac native stack:
  • bc0f3ee9: build fix. The previous head d62bf6b5 did not compile:
    • LocalChatUploadResponder passed code: "previous_response_not_found" to openAIErrorResponse, which had no code parameter (error: extra argument 'code' in call).
    • The helper now takes an optional code, and the envelope encodes it only when present, so every existing error body is unchanged.
    • Tests: with the provider test build on this head, LocalResponseConversationTests plus four other server suites (StandaloneServerTests, LocalOutputTokenLimitTests, StandaloneServerModelAdmissionTests, LocalStreamingFailureTests) pass, 74 tests in 5 suites. That includes the previous_response_not_found code assertion.

The previous pins (mlx-swift bfaa8a90, core 3a179119, C 46bce47e) existed only on the cluster stack: #33 → #35, #14 → #15 and #54 → #56. The new stack is that stack without three pieces, all of which stay on the cluster branches:

  • the JACCL fixes;
  • the sealed all-sum;
  • the collective startup waits.

Metal kernel sources and the generated JIT copies are identical to the previous pin. The provider uses none of the removed C entry points. This PR's own files touch no cluster paths: no file under libs/darkbloom-cluster, and no tensor-parallel or JACCL path.

The single-Mac dependency chain, merged in this order: mlx → mlx-c → mlx-swift → mlx-swift-lm #314 → this PR. None of them includes cluster code.

Evidence: the provider builds and links in release (-c release, Xcode 27.1 / Swift 6.4) on the full single-Mac chain, with darkbloom sha256 e863e668…. The source-matched mlx.metallib is sha256 156f2624…a462d, byte-identical to the one built from the previous pin 3a179119, so the GPU code is unchanged. The changelog check (24 fragments), docs-impact-check.py against master and docs-check.sh (187 files) pass. No model was loaded with this build; single-Mac end-to-end qualification of this head is the next gate.

The October 19 "distributed text validation" section below came from the cluster stack's composition with this PR. It is not a test of this PR alone. Single-Mac end-to-end qualification of this head is the next gate.


Current distributed text validation — October 19

Parent-run installed endpoint validation used darkbloom cluster, with prefill chunk 2048 verified on both devices. Automatic placement selected 19 layers on M5 Max and 26 on Mac Studio over encrypted RDMA. 18 cold/warm requests and 3 decode requests passed.

Measurement Observed result
Cold HTTP prefill median, approximately 1.2k prompt tokens 404.7499 tokens/s
Cold HTTP prefill median, approximately 4.7k prompt tokens 377.1064 tokens/s
Cold HTTP prefill median, approximately 11.9k prompt tokens 369.0766 tokens/s
Initial kernel-cold request, 1,198 prompt tokens 257.8 tokens/s
Warm time to first token 0.359–0.489 seconds
Decode 31.1914–31.2270 tokens/s; median 31.1925

These are HTTP endpoint results from the parent’s installed composition, not a chunk-size-only A/B comparison: composition and placement also changed. They do not establish that every candidate PR tree was independently installed or tested.

Open gates: the built-in CLI probe returned HTTP 400 for enable_thinking:false; its repair is pending and is not included in these frozen commits. Startup required a one-off manual idle-file-cache purge on the peer; automatic recovery from a 20-layer load refusal subsequently selected 19 layers. MTP was off, images remain unqualified, and these requests do not establish sustained-soak, concurrent-batching, full-model-matrix or production readiness. No protected merge, release, deployment or catalog activation is part of this publication.

Previous source candidate, superseded by the split section above: d62bf6b54b4e8428fd9a2cf3091f01310a5938e0; SDK 42b8b6045077ec3363fde78e593d1d1d5900b639; native Swift bfaa8a90c1466bc11f7084a812581d1e61393022. Publication is dependency-first. Exact successor-head hosted CI and required human review remain open; historical CI entries below are not successor results.

Summary

Add native GLM-5.3-Flash (glm5_next) serving for the pinned EigenLabs NVFP4 artifact through the provider's managed load, paged KV, embedded MTP, complete-prefix cache, image prefill and tool-stream paths. This supersedes #1497 and includes the current master base ab423c1c.

The residency repair prevents an unsuccessful backend start or end from being treated as unsupported hardware or clean retirement. The bridge keeps the actual engine, KV reservation and activity guards until native work and the residency ticket both settle. Concurrent completion joins the same result; an unproven failure retains ownership until process exit. Unsupported hardware is detected before ticket creation.

Malformed GLM tool suffixes now produce a visible error before residual fallback text or partial calls are emitted. Compatibility shutdown logs a fixed diagnostic without copying the caught payload, the production build excludes the testing-only advertisement seam, and supplemental prompt vectors cover effort aliases and image-marker rendering.

The SSD fixture follow-up routes the shared prefix-cache helper and six bridge write fixtures through the existing test-volume selector. Invalid selection and directory-creation errors now propagate; production cache guards, assertions and cleanup remain unchanged.

MiMo Chat preparation now preserves original function schemas for the loaded exact mimo_v2 family, keeping provider/local serving, tokenization, recount and benchmark prompts aligned without changing other families or forced-tool admission.

Before

flowchart LR
  A["GLM native operation"] --> B["Residency start or end fails"]
  B --> C["Unsupported or early bridge cleanup"]
  C --> D["Retained native work loses its charge"]
  E["Malformed tool suffix"] --> F["Fallback text without visible failure"]
  classDef fault fill:#fee2e2,stroke:#b91c1c,color:#450a0a
  class B,C,D,E,F fault
Loading

After

flowchart LR
  A["Platform check before ticket"] --> B["Native owner and residency operation"]
  B --> C{"Both settled successfully?"}
  C -->|Yes| D["Publish or release once"]
  C -->|No| E["Keep engine, KV claim and activity guards"]
  F["Complete GLM tool suffix"] --> G{"Parser accepts all calls?"}
  G -->|Yes| H["Emit validated calls"]
  G -->|No| I["Visible generation failure"]
  classDef safe fill:#dbeafe,stroke:#2563eb,color:#172554
  classDef retained fill:#fef3c7,stroke:#b45309,color:#451a03
  class A,B,D,H safe
  class E,I retained
Loading

Evidence

  • Before: the residency integration regression lost its 2 GiB KV charge after an end fault (three failed assertions). Tool-forwarding regressions produced two failing tests with twelve issues.
  • Before the SSD fixture follow-up, public composition: scripts/run-provider-tests.sh completed in 622.036 seconds with 4,619 Swift Testing passes / 125 skips and 454 XCTest passes / 131 skips, zero failures. Counts are test executions across the script's processes; overlapping selections are not deduplicated. Ordinary fixture lanes used their required MiMo and canonical GLM reference fixtures. Real-model opt-ins and unavailable external lanes remain skips.
  • Separate fresh-process GPU checks: three actual factory/owner residency scenarios passed; 57 lifecycle tests passed with three intentional fault skips; all three fault cases then passed in isolated processes. No watchdog expired. The tested provider binary SHA-256 is 4ceb639694eea843ae5ab9fa8794fc336a28675166881be659615a4d8b41ad4e.
  • Native composition: Swift 2a9a1eb9, core adbc349b, C 2415568e; metallib SHA-256 156f2624f9f1b1413dfabd8b6e16423121b0e5b18e2573c23c4e023b606a462d. SDK runtime was compiled at 02ce18ee; the final df2ab20d pin changes only a Prism test assertion's type-checking decomposition. SDK production sources and package definition are identical between those commits. The SDK's full suite and compiler regression have separate evidence in SDK #314.
  • Independent residency/refactor and parser/forwarding reviews found no remaining corrective change. Four supplemental prompt goldens pass; these prove rendering, not image execution. Documentation, documentation-impact, changelog and whitespace checks pass.

Earlier M5 Ultra real-model throughput and image measurements belong to their original composition; they are not current-head or RDMA-cluster benchmarks. The current provider suite does not establish a live clustered GLM request.

SSD fixture follow-up evidence

  • The exact two-file repair received an independent behavior-preserving review: no further change warranted; test assertions, cleanup and negative path controls remain intact.
  • Local publication checks: docs-impact against current master, full docs lint, changelog validation/preview and whitespace checks. Normal repository hooks run on the focused change; no TypeScript or native build is required by those hooks. Exact-head public CI remains required after publication.
  • A separate private integration composition (SDK 490b147f, native 24cedb82) passed all ten required provider gates in 744.7 seconds. Its 263 general skip-event lines remain recorded; required isolated gates had zero skips. These different pins and private sources do not qualify this public head, and no installed GLM/RDMA request or production-readiness claim follows from that run. This follow-up changes no product runtime or dependency pin.

Before — SSD fixture setup

flowchart LR
  A["Write-expecting fixture"] --> B["Foundation temporary parent"]
  B --> C["Default volume below cache reserve"]
  C --> D["Donation correctly refused"]
  E["Directory creation error"] --> F["Setup error ignored"]
  classDef setup fill:#dbeafe,stroke:#2563eb,color:#172554
  classDef refusal fill:#fee2e2,stroke:#b91c1c,color:#450a0a
  class A,B setup
  class C,D,E,F refusal
Loading

After — SSD fixture setup

flowchart LR
  A["Write-expecting fixture"] --> B["SSDTestDirectory parent selection"]
  B --> C{"Override state"}
  C -->|Absent| D["Foundation default parent"]
  C -->|Valid| E["Selected test-only parent"]
  C -->|Invalid| F["Fixture setup throws"]
  D --> G["Create unique root or throw"]
  E --> G
  G --> H["Unchanged cache guards, assertions and cleanup"]
  classDef setup fill:#dbeafe,stroke:#2563eb,color:#172554
  classDef retained fill:#fef3c7,stroke:#b45309,color:#451a03
  class A,B,D,E,G,H setup
  class F retained
Loading

These diagrams describe test setup only. The production cache remains on its configured volume and retains the full free-space reserve and payload admission checks.

Remaining qualification

  • Required human review (still REVIEW_REQUIRED). Exact-head provider CI
    passed on 2d6240b25a12; dependency hosted gates remain open: SDK #314
    at 8c479ffc fails its final Run all test suites once stage, although its
    build, unit and focused stages pass; SDK main 14661d9b also has a failed
    Build and test job. Native core #35
    at 9e22e199 still fails Run the tests on the CPU within its Metal job;
    its build and preceding macOS tests pass. Native Swift #56
    at 91ff7858 is green. These are the latest observed dependency PR/main heads,
    distinct from the retained locally qualified pins. The public provider's
    focused CPU pass does not waive dependency full-suite failures.
  • Advisory threat review remains incomplete on 2d6240b25a12: its workflow
    succeeded but the saved report records an invalid model response, 22/629 source
    units covered, and unscanned submodule changes. No current findings were supplied;
    this is not a completed automated review or a replacement for required human approval.
  • Merge dependencies under separate authorization, then repin their actual merged commits and renew affected checks. The current pins are reachable PR commits.
  • Current-composition installed endpoint tests: full-size text and vision, MTP, prefix restore, concurrency, cancellation and sustained load. Distributed text endpoint results are recorded above; images, MTP, concurrency and sustained load remain unqualified.
  • Coordinator-connected real-model qualification and platform-owner deployment/catalog approval. Platform #114 carries the corresponding contract work.

The existing standalone/coordinator hardware gate still requires M5 Max or M5 Ultra with at least 256 GiB. This PR does not qualify a smaller host by itself or activate clustering. Public GLM required/named tool admission remains unsupported; internal forced-mode validation is defensive only. Rollback controls for persistent residency, prefix caching and rectangular verification remain documented in the provider configuration reference.

MiMo tool-schema parity

Model-blind provider normalization can change typeless-enum and Boolean-property
function schemas before native MiMo rendering. Retain original typed declarations
in MiMoV26ToolEvidence and restore them only for loaded exact mimo_v2 before
serving, tokenization, prompt recount and benchmark preparation. Hosted-tool
fallback uses the existing structural filter; malformed retained declarations,
reserved metadata, tool-choice and native admission remain strict. Other loaded
families retain their normalization.

Before — MiMo schemas

flowchart TD
  A["Same Chat function schema"] --> B["ProviderLoop model-blind normalization"]
  A --> C["LocalChatRequest original schema"]
  B --> D["Scheduler, recount and benchmark use changed schema"]
  C --> E["Native MiMo template uses original schema"]
  D --> F["Prompt IDs and counts can differ"]
  E --> F
  classDef input fill:#dbeafe,stroke:#2563eb,color:#172554
  classDef fault fill:#fee2e2,stroke:#b91c1c,color:#450a0a
  class A,B,C input
  class D,E,F fault
Loading

After — MiMo schemas

flowchart TD
  A["Chat body"] --> B["Capture original typed tool evidence"]
  B --> C{"Loaded exact mimo_v2?"}
  C -->|Yes| D["Restore and reject reserved metadata"]
  C -->|No| E["Existing family normalization"]
  D --> F["Existing tool-choice and native validation"]
  F --> G["Serving, tokenizeProviderBody, promptTokenFloor, benchmarkPrompt"]
  G --> H["Same schema and exact prompt IDs"]
  classDef input fill:#dbeafe,stroke:#2563eb,color:#172554
  classDef guard fill:#fef3c7,stroke:#b45309,color:#451a03
  classDef safe fill:#dcfce7,stroke:#15803d,color:#14532d
  class A,B,E input
  class C,D,F guard
  class G,H safe
Loading

Evidence — MiMo addition

  • Published source: signed and GitHub-Verified commit 2d6240b25a1267d3028cbd53afde7e7eaf7f06a9 is exactly the qualified 19-file tree; no source change followed the build or strict tests.
  • Before: two newly authored public reproductions expose provider/local
    schema mutation for typeless-enum and Boolean-property inputs. These fixed
    inputs are distinct from the unavailable historical external corpus.
  • After, source: five integrated regression methods assert exact prompt IDs
    through the real service with scripted generation, plus recount, benchmark,
    hosted fallback, malformed declarations, marker isolation and family isolation.
  • Actual public composition: the two-job CPU source build passed (384.356
    seconds, runner wall time) at SDK df2ab20d, native Swift 2a9a1eb9, nested
    core adbc349b and C 2415568e. Strict focused gates passed 86 tests (37 XCTest + 49 Swift Testing), with
    zero failures or required skips
    : schema 5 XCTest; adjacent 23 XCTest + 49
    Swift Testing; current consumer 9 XCTest. The optional historical corpus was
    not run and is not included in those counts.
  • Artifact binding: fresh public-source AOT 156f2624… was built with two
    jobs, deployment 26.2 and JIT OFF; its 43 compile commands, 456 transitive
    input hashes and nine completeness checks passed. Both colocated and Cmlx
    resource layouts use it. ProviderCoreTests SHA-256 is
    3864e2133cf8e906904074db959951bc37a5b6502ef2532cfdbc83133d633b78;
    binary/AOT hashes stayed unchanged around every gate. CPU selections use
    host tokenization and scripted generation; no public model/GPU fixture was run.
  • Preserved harness failure: an initial broad compiler tripwire stopped its
    controller without recording the wrapper exit; its five observed passing
    schema cases are not counted above. The renewed gates capture native process
    birth identity and owned ancestry, permit only package-manifest compilation,
    reject actual owned product compilation, and retain complete zero/skip gates.
    The retained failure required no product source change or provider rebuild.
  • Static checks: full docs lint (187 files), current-master docs-impact,
    explicit 19-file docs-impact, changelog validation/preview and staged whitespace
    pass. These checks establish source/documentation consistency only.
  • Independent refactor closure: the parent reviewed the final 19-file
    outgoing change and Copernicus source closure; no further source change was
    warranted. The qualified source freeze remained unchanged. Earlier GLM/SSD
    review outcomes above retain their recorded scope.

Linked issue

Continues this existing PR; the shared MiMo prompt regression is reproduced by
fixtures/prompt-contract/mimo-v26-schema-parity-v1.json.

Test plan

  • Documentation, documentation-impact, changelog and whitespace checks.
  • Rebuild actual public provider test products and bind source/binary/resources.
  • MiMoV26SchemaParityTests (five methods), required zero skips.
  • Adjacent prompt/template/local/decode/tool-choice suites, required zero skips.
  • Nine current MiMoV26ConsumerParityTests, with historical method separated.
  • Record optional historical corpus separately: NOT RUN, excluded from strict green.
  • Parent outgoing review and independent Copernicus source closure; no source change.
  • Previous published-head provider CI passed its recorded checks; new successor exact-head CI remains pending.
  • Required human approval remains pending on the current head.
  • All required end-to-end release gates; this source addition alone does not
    establish full-model, installed endpoint or live platform parity.

Components touched

  • provider-swift (Swift CLI and native prompt preparation)
  • docs and public fixed-input fixtures

Protocol / interface changes

No new envelope field, endpoint, configuration key, CLI flag or release version.
Native MiMo Chat preparation preserves original function schemas; the canonical
protocol reference records the provider-side behavior. External platform-owner
review and live parity remain separate gates.

Documentation impact

Canonical inference, hardware/recount, protocol, build, test and MiMo fixture
pages describe the implementation and evidence boundary. The public fixture
contains newly authored reproductions; it does not execute platform code.

Changelog

Adds changelog.d/mimo-schema-ingress-parity.md; preserves existing fragments
and the root release history. Changelog check and preview pass.

Notes for reviewers

Review the restoration points and the shared structural fallback together.
Original schema capture must not grant normalizer-marker trust or force-tool
capability. Reverting this source addition restores prior prompt behavior; it
requires no data migration or production operation.

Refactor Pass

The final 19-file MiMo addition has actual public focused CPU qualification and
parent-reviewed independent Copernicus source closure: no further source change
was warranted. The source freeze stayed unchanged after qualification. Earlier
GLM/SSD reviews retain their own scope. Previous published-head provider CI passed; new successor CI remains pending;
required human review, incomplete advisory coverage and the other documented
qualification gates remain open.

Merge Danger

Door: Two-way source rollback. Processes retaining unproven native work still require an actual exit before their memory can be reclaimed.

Blast Radius: Native inference. The shared tool router and residency policy also serve MiMo; their regression coverage is included in the provider suite. No release, catalog activation or production deployment is performed by this PR.

@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
d-inference Ready Ready Preview Oct 22, 2026 12:23am UTC
d-inference-console-ui-dev Ready Ready Preview Oct 22, 2026 12:23am UTC
d-inference-landing Ready Ready Preview Oct 22, 2026 12:23am UTC
darkbloom-status Ready Ready Preview Oct 22, 2026 12:23am UTC
eigen-homepages-darkbloom Ready Ready Preview Oct 22, 2026 12:23am UTC

Request Review

…, glm5_next_v1 gate), 2048-token steps, per-token admission rate, NVFP4 model id, refactor review
jonathan308 and others added 25 commits October 20, 2026 20:02
The GLM slot gate yielded its token_budget_exhausted refusal inside an
already returned stream, so the local endpoint committed a 200 SSE response
and rendered the refusal as "Response generation failed"/server_error. In
an 8-request flood of ~60K-token reservations on one M5 Ultra, 5 refusals
arrived that way. EngineV2Bridge.submitTokenized now throws
MultiModelBatchSchedulerEngineError.tokenBudgetExhausted for the GLM slot
refusals, as it already does for advertisedContextExceeded, so the local
endpoint returns 503 "Provider capacity is temporarily unavailable." before
headers (streaming or not) and the coordinator gets the typed retriable
capacity refusal. The non-throwing overload keeps its in-band error, and the
GLM media path no longer relabels the refusal as a construction failure.
Measured after the change: the same flood gives 5 clean 503s and serves the
3 requests that fit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mlx-swift-lm e4eed647 -> 48f1e000 (#314): a step whose scratch
reservation is refused is deferred (rows rolled back exactly, newcomers
requeued, admissions held until a running request leaves) instead of
failing every row of the step. With the SSD prefix store on, three
~60K-token GLM requests no longer all fail when the second finishes
prefill. No change on the success path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the serving concurrency is full, acquireServiceAllowance refuses the
request so routing moves on, but submitTokenized yielded that refusal inside
an already returned stream: local streaming clients got a 200 and an
immediate "Response generation failed"/server_error frame (non-streaming
clients already got 503). A 40-minute mixed soak on one M5 Ultra recorded
406 such frames in bursts at concurrency 4 (workers retrying at once); no
admitted request failed. The refusal is now thrown as
MultiModelBatchSchedulerEngineError.tokenBudgetExhausted before any stream
exists, so streaming and non-streaming requests both get 503 "Provider
capacity is temporarily unavailable." locally and the coordinator keeps its
typed retriable capacity refusal; the non-throwing overload keeps the same
in-band message. Measured: probes at concurrency 4+1 now return 503 for
stream and non-stream alike.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds docs/reports/2026-10-21-glm53-flash-single-mac-qualification.md: the
artifact, executable and metallib identities, the serving policy, every
check with its evidence (bitwise port gate, perplexity, endpoint, OpenRouter
templates, prefix cache incl. restart, images, video, long context,
admission, soak), the final performance table on one M5 Ultra 256 GB and the
known limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
libs/mlx-swift e03513c6 (mlx 4a355746, mlx-c 0a97d9ab) reverts the
one-page minimum on sub-page footprint quotations, so admission charges
for models other than GLM are unchanged from the current release.
libs/mlx-swift-lm 0d43713e (#314) merges main (#316: checkpoint imports
staged from host zeros), carries the matching pin and fixes CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
libs/mlx-swift 205ee3d8 (mlx 6ee3062c, mlx-c bd03297a) and
libs/mlx-swift-lm 322a231f. Only the core's fork.yaml and the pins
changed since 3de98eb; the compiled sources are identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the recheck of the final executable (darkbloom 94a83e27, #1516
15d7a83) after the core reverted the one-page footprint minimum and the
SDK merged main: tokens, admission flood, performance, prefix cache, SSD
restart, 125K context and a 20-minute soak all pass. GLM's serving MTP
charge is 4.05 GB per request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only tests changed since 322a231f: two GLM suites that create MLX arrays
move from the no-GPU unit tests to the kernel tests. The library sources
the final executable compiled are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Responses objects echo the request's tools and tool_choice (mlx-swift-lm
37eaf5d6, the OpenAI shape), so the streamed response.created event
contains the declared tool name. The test still refuses the leaked call
itself: the thought marker, the call's argument, any function_call item
or arguments, and the tool name anywhere in Chat Completions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
libs/mlx-swift c2cbef34 (core ad596687, C fa6565d4) and libs/mlx-swift-lm
a630039b (#314), which merge main of each repository: thread-scoped
command-buffer limits (mlx#36, mlx-swift#57), custom-kernel math modes
and the Nemotron 3.5 Super SDK stack. GLM's chain keeps the production
footprint policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Layout only since a630039b.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tests and layout only since a630039b.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final executable d9780e86 (SDK merged with the Nemotron 3.5 Super stack):
tokens identical to the previous final build, endpoint, OpenRouter
templates, images, video, prefix cache, SSD restart, 64K/125K context,
admission flood, a 20-minute soak and a same-state performance A/B.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thinking-off (reasoning.enabled false, enable_thinking false,
chat_template_kwargs enable_thinking/thinking false, effort none/off) adds
enable_thinking false to the render context. The pinned template has no
thinking switch and always ends with an open <think>, so
GLM5NextThinkingTokenizer, wrapping the GLM tokenizer once at load for text,
media and token counting, appends </think>: the empty block the template
writes for an assistant turn without reasoning. ReasoningPromptProbe starts
the reply in content mode. The platform sidecar appends the same text.

Thinking-off beside a thinking-on switch, effort level or budget is a 400.
Hidden reasoning (reasoning.exclude true, include_reasoning false) stays a
400, renamed reasoningExclusionUnsupported. Other families are unchanged.
Docs, changelog and the qualification record's limits (catalog now lists the
full 262,144 context) are updated.
#314 deprecates the contiguous GLM forward; the paged CBv2 target is the
only serving path. Four speedups that reached only the contiguous forward
now reach it: the shared all-true validity and one-launch embedding for
decode and verification steps, .serving's native NAX prefill projections,
one-launch DSA payload staging, and split-K DSA decode attention for paged
decode and MTP verification. The first three are bit-identical (the
perplexity panel's 15,901 positions match exactly at 2,048-token chunks);
the fourth gives paged decode the contiguous path's qualified arithmetic,
so output differs from the previous pin only past 2,048 tokens of history.

Native pins and the metallib (156f2624) are unchanged. Docs: the
qualification record's new paged-attention section (token check, same-state
A/B), the changelog fragment, the inference architecture page and the CLI
reference's .serving description.
8-token-step perplexity of the split-K decode attention (+0.0049 %), and the endpoint, template, needle, image, video and SDK GPU-suite re-qualification of 344b39e3.
#314 keeps paged decode attention bit-exact: the split-K paged path is
left off (perplexity +0.0049 %, top-1 97.6 % at decode-sized steps, below
the lossless bar). Three speedups reach paged serving bit-identically:
shared validity and one-launch embedding, native NAX prefill projections,
one-launch DSA payload staging.

darkbloom 6b95747e (metallib 156f2624 unchanged) is bit-identical to the
qualified d9780e86: SDK real-model MTP tokens 30/30 with identical MTP
counts, endpoint serial-target 14/14. The record, changelog, inference
architecture page and CLI reference now describe that state.
mlx-swift main 67dc7528 (#58; mlx main ad4745a2, mlx-c main 5e9be4da) has
exactly the tree of the qualified d80124e. mlx-swift-lm main 19634dd8 (#314)
is the qualified ffb71842 plus #318, which changes only Nemotron Super and
ModelOpt files that no GLM path reaches. The record and changelog name the
merged pins.
Brings #1519 (SSD checkpoint restore staging docs/tests; the same merged SDK pins as this branch, plus libs/mlx ad4745a2) and #1527 (Qwen3.8 forced tools). Conflicts were the Last updated stamps of docs/architecture/hardware-support.md and prefix-cache.md (master's date kept). No GLM code changes.
Brings the Nemotron 3.5 Super managed provider (#1510, #1538) and #1533.
Conflicts in the shared provider files keep both models side by side:
supported-model list and managed-load refusals, scanner load estimates
(GLM, then Super, then the existing paths; the combined optional chain is
split for the type checker), MTP preparation, the failed-build unwind
(master's restoreNewcomerReslice, then GLM's validated failure), the
standalone partition (Super excluded before GLM's local qualification) and
the local chat responder. There, Super's raw-chat hook is tried first and
the inferred reasoning parser applies only to the generic service: Super's
owner refuses a request parser, as on the coordinator path. Doc stamps
take master's date.
Brings #1528 (Nemotron Super video) and #1523 (Qwen3.8 reasoning effort 400). Conflicts: WeightHasher takes master's equivalent F_NOCACHE reader (internal, so the uncached parity test keeps calling it); the scheduler rethrows every engine error (master's, which includes GLM's capacity refusal); the load path keeps GLM's artifact ownership and Super's reload refusal; the fleet budget comment names both retained GLM memory and Super reservations.
Brings #1531 (Nemotron Super fused MTP verify window and NAX prefill) and its mlx-swift-lm pin 0351444e (main: 19634dd8 plus #325 and #323, Nemotron Super/ModelOpt only; no GLM code changes). Every submodule now pins its latest main: mlx ad4745a2, mlx-swift 67dc7528, mlx-swift-lm 0351444e.
main after #314 (19634dd8), #325 and #323; the later two only pin mlx-swift main and add Nemotron Super/ModelOpt code that no GLM path reaches.

This branch was successfully deployed

5 active deployments
Preview – d-inference — 56b89df0 Deployed Oct 22, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — 56b89df0 Deployed Oct 22, 2026 by vercel[bot]
Preview – d-inference-landing — 56b89df0 Deployed Oct 22, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — 56b89df0 Deployed Oct 22, 2026 by vercel[bot]
Preview – darkbloom-status — 56b89df0 Deployed Oct 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants