Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
ddc32c3
GLM-5.3-Flash provider: NVFP4 artifact, serving defaults (MTP/paged/p…
jonathan308 Oct 16, 2026
7ce7d17
GLM-5.3-Flash provider: rectangular adaptive MTP by default (DARKBLOO…
jonathan308 Oct 16, 2026
53baba8
GLM-5.3-Flash provider: coordinator mode (glm-5.3-flash, 262K context…
jonathan308 Oct 16, 2026
46d24f5
Pin mlx-swift-lm to the GLM-5.3-Flash native PR (Layr-Labs/mlx-swift-…
jonathan308 Oct 16, 2026
c2cea0d
Pin mlx-swift-lm to the GLM-5.3-Flash native PR head (Layr-Labs/mlx-s…
jonathan308 Oct 16, 2026
f8f0e45
Pin GLM MTP on by default for the local and coordinator identities
jonathan308 Oct 16, 2026
2a6f9e1
Expect the GLM refusal evidence that chat template controls now carry
jonathan308 Oct 16, 2026
ef5d2eb
Pin mlx-swift-lm to the GLM-5.3-Flash native PR head (Layr-Labs/mlx-s…
jonathan308 Oct 16, 2026
d9d0bc2
GLM-5.3-Flash review fixes: reserve step setup, drain consumers on re…
jonathan308 Oct 17, 2026
beb598c
Pin mlx-swift-lm to the GLM5-Next review-fix head dba98a56
jonathan308 Oct 17, 2026
ce9890f
Refactor pass and cancellation fix: a cancelled GLM unload still comp…
jonathan308 Oct 17, 2026
64a9a6a
Pin mlx-swift-lm to the GLM5-Next refactor-pass head b309cc2c
jonathan308 Oct 17, 2026
08329a2
Preserve GLM residency ownership and surface malformed tool output
jonathan308 Oct 18, 2026
8106051
Honor selected test volume in SSD write fixtures
jonathan308 Oct 18, 2026
2d6240b
fix: preserve MiMo tool-schema ingress parity
jonathan308 Oct 18, 2026
d62bf6b
Fix local response compatibility and update GLM runtime dependencies
jonathan308 Oct 19, 2026
1bf438c
Merge master into work/glm53-flash-release
jonathan308 Oct 20, 2026
bd43bdc
Pin the single-Mac native stack (no cluster dependency)
jonathan308 Oct 20, 2026
bc0f3ee
Carry the OpenAI error code in local error responses
jonathan308 Oct 21, 2026
27ccfd5
Hash model weights with uncached reads
jonathan308 Oct 21, 2026
6c6643c
Report why the SSD prefix store is off; DEBUG-only cache key file
jonathan308 Oct 21, 2026
d0e3038
Serve GLM-5.3-Flash video input
jonathan308 Oct 21, 2026
a9ac83b
Accept OpenRouter's GLM reasoning controls
jonathan308 Oct 21, 2026
a0f2ca6
Pin the SDK with GLM-5.3-Flash's single-Mac speedups
jonathan308 Oct 21, 2026
e114fc3
Merge master into work/glm53-flash-release
jonathan308 Oct 21, 2026
9fd0095
Document the omitted max_tokens default for GLM accurately
jonathan308 Oct 21, 2026
dad2d68
Refuse GLM capacity before the stream starts
jonathan308 Oct 21, 2026
23eb9d3
Pin the SDK with the step-scratch deferral
jonathan308 Oct 21, 2026
1216ffb
Refuse a full Mac before the stream starts
jonathan308 Oct 21, 2026
7be147e
Record the GLM-5.3-Flash single-Mac qualification
jonathan308 Oct 21, 2026
3de98eb
Pin the single-Mac native stack with production allocation footprints
jonathan308 Oct 21, 2026
15d7a83
Pin the single-Mac stack's fork.yaml fix
jonathan308 Oct 21, 2026
7df9dac
Record the GLM recheck on the production footprint policy
jonathan308 Oct 21, 2026
00a3e6c
Pin mlx-swift-lm 97b2ca6d (#314 test-suite fix)
jonathan308 Oct 21, 2026
dcf86d7
Merge master into work/glm53-flash-release
jonathan308 Oct 21, 2026
ab50843
Let Responses echo the declared tool in the disabled-thought test
jonathan308 Oct 21, 2026
ab67c7c
Pin the single-Mac stack merged with the Nemotron Super chain
jonathan308 Oct 21, 2026
419bea2
Pin mlx-swift-lm 152cd5c0 (#314 formatting)
jonathan308 Oct 21, 2026
599c0c7
Pin mlx-swift-lm 77a0d1d9 (#314 test tolerance on non-M5 GPUs)
jonathan308 Oct 21, 2026
e35d965
Record the final GLM recheck after merging main
jonathan308 Oct 21, 2026
233195a
GLM-5.3-Flash: serve thinking-off with a closed think block
jonathan308 Oct 21, 2026
f0ff572
Pin mlx-swift-lm 13fba500: GLM speedups reach paged serving
jonathan308 Oct 21, 2026
a450ae8
Qualification record: paged-attention perplexity and re-qualification
jonathan308 Oct 21, 2026
f4f8585
Pin mlx-swift-lm 46e4d0ba (#314 head: 13fba500 plus swift-format layout)
jonathan308 Oct 21, 2026
af29137
Pin mlx-swift-lm ffb71842: paged speedups, bit-exact
jonathan308 Oct 21, 2026
471c84f
Pin the merged mlx-swift and mlx-swift-lm main
jonathan308 Oct 21, 2026
b5f30eb
Merge master into work/glm53-flash-release
jonathan308 Oct 21, 2026
2498c5d
Merge master into work/glm53-flash-release
jonathan308 Oct 22, 2026
ec0d87a
Merge master into work/glm53-flash-release
jonathan308 Oct 22, 2026
fd96495
Merge master into work/glm53-flash-release
jonathan308 Oct 22, 2026
56b89df
Record and changelog: name the latest mlx-swift-lm pin 0351444e
jonathan308 Oct 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions changelog.d/glm53-native-prerequisites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### GLM-5.3-Flash native prerequisites

- Add the GLM-5.3-Flash target, trained MTP, media and bounded loader, with synthetic regression coverage. Full-model qualification remains a separate gate.
- Add a low-level GLM5 tool parser with schema-aware values and response-wide validation before tool-call emission, plus loaded-model-gated prompt controls. These do not advertise function calling, constrained decoding or media support for an unqualified model.
- Recognize the chat template shipped in `EigenLabs/GLM-5.3-Flash-MLX-NVFP4-mtp`, the official template with numeric attribute access written as `[0]` subscripts, so the ordinary pinned Swift-Jinja renders it without a dependency patch. It reproduces every official-template golden byte for byte.
- Price raw same-directory GLM5-Next discovery and managed loads with the raw source size plus native-copy, tokenizer and a measured `ceil(source / 32)` residual allowance, instead of disk × 1.2. The published NVFP4 artifact (181,752,181,866 bytes) therefore fits a 256 GiB Mac with the unchanged activation and minimum-KV headroom, where disk × 1.2 did not. Bounded metadata-only cache/provenance directories remain discoverable; nested integrity files and symlinks remain refused. Malformed layouts and separate-tokenizer compositions do not receive a loadable generic fallback.
- Add an explicit default-off, manifest/aggregate-pinned local GLM qualification selection; it never advertises the local download to the coordinator or changes default cohorts. It serves GLM only through its owned embedded-MTP engine, which the default `mtp_mode = "auto"` enables without any setting; target-only GLM loads, fallbacks and in-place recovery are refused, and local startup skips GLM with a message when `mtp_mode = "off"` or `DARKBLOOM_CBV2_MTP=0` disables MTP. Coordinator-connected mode sizes GLM for an enforced 262,144-token context, never the full model context. Size GLM sparse KV using its actual asymmetric FP32 rows, preserving the engine's separate three-generation KDA request charge.
- Expose retained GLM faults on local metrics (`darkbloom_glm5_next_retained_fault`, `darkbloom_glm5_next_retained_owner_objects`, `darkbloom_glm5_next_retained_resident_bytes`). An unproven GLM retirement keeps its pending-load lease, roots, ownership and activity without refund, and its unpublished bytes are excluded from fleet KV grants. A GLM slot whose unload, eviction or shutdown cannot prove retirement is charged its KV claim, keeps a frozen grant and is skipped for eviction. Other families still load and reclaim when capacity remains, but cannot grow into that memory; when the retained grant held the whole KV budget, their loads are refused.
- Load local GLM with the native serving execution policy and record it in the encrypted checkpoint identity. GLM prefill chunks and steps are each at most 2,048 tokens, with solo stripes off: paged prefill rows read each layer's latent history once instead of retaining one selected-latent read per query token, so a 2,048-token step's priced scratch fits the post-load envelope with four concurrent requests at 8K and 32K context; at the 262,144-token coordinator bound a 256 GiB host runs at most two or three. Local GLM selects its native paged KV backend automatically and refuses rather than falling back to contiguous; the encrypted SSD prefix store defaults on for the pinned GLM identity (`DARKBLOOM_PREFIX_CACHE=0` opts out). A GLM engine that refuses to activate reports the native reason, such as the step-scratch bytes needed and available, in the load error. A published GLM engine holds standing wired residency for its weights, bounded by the same safe ceiling as MiMo and released only after proven retirement; without it, 512-token prefill chunks measured 263–367 instead of 1,246 tok/s on a 256 GiB M5 Ultra. `DARKBLOOM_GLM_PERSISTENT_WIRED_RESIDENCY=0` rolls it back. On Neural-Accelerator GPUs routed-expert prefill uses the NAX expert kernel for NVFP4 banks too (real NVFP4 artifact: 1,955 instead of 1,585 tok/s at 2,048-token chunks, 1,486 instead of 1,246 at 512-token chunks; decode unchanged). Prefill chunks past position 2,048 use the native sparse-attention prefill kernel (native profiler, 8,192-token prompts at 2,048-token chunks: 2,000 instead of 1,340 tok/s; perplexity within noise, +0.018%).
- Refuse local GLM requests that exceed the enforced context with HTTP 400 before native admission, and default an omitted `max_tokens` to half that bound. Omitted sampling fields use the artifact's `generation_config.json`. `reasoning_effort` accepts `minimal`, `low`, `medium`, `high`, `xhigh` and `max`, mapped to the template's low/high/max levels as the platform does.
- Prepare GLM image input natively: the GLM prompt policy renders interleaved image parts, the vision tower runs one image at a time with fused attention on the GPU (query-tiled elsewhere; a 7,921-token image's tower drops from 28 s to 1.4 s) and checked evaluation, and the resulting causal spans carry no position state. The media reservation charges prepared pixels, the full-frame tower working set and each image's 8000-token cap. Images are served by the embedded-MTP serving engine, which accepts prepared causal media: image rows decode target-only and never reuse cached prefixes. A GLM load now requires the reviewed shipped chat template, and a selection file with the unsupported `tokenizer` field is refused.
- GLM MTP now verifies up to three drafted tokens per round in one target forward (rectangular verification, adaptive depth) by default, including with the GLM prefix cache, and sampled requests speculate through exact target-prefix acceptance. GLM MTP output is not token-identical to target-only greedy decoding: the multi-token verify forward can flip near-tie tokens. `DARKBLOOM_GLM_RECTANGULAR_VERIFY=0` restores serial single-proposal verification; the variable is forwarded to the launchd provider job.
- Reserve the GLM MTP layer's memory per request in proportion to that request's reserved tokens (a fixed amount plus bytes per token) instead of for the full model context, and price its index scratch from the actual selection path (the native sparse decode kernels pool in kernel; absorbed attention never expands selected latents). Under the serving policy with 2048-token steps and depth-3 verification this is 4.14 GB plus 33,900 bytes per reserved token, about 13.0 GB at 262,144 tokens instead of about 22.8 GB for every request.
- Serve GLM-5.3-Flash in coordinator-connected mode as catalog model `glm-5.3-flash`, downloaded through the normal model-revision path and loaded by the same managed native load, embedded MTP, paged KV, prefix cache and wired residency as the local opt-in. The coordinator catalog entry, the revision receipt and the loaded bytes must agree on one aggregate, and the reviewed shipped template stays mandatory. The enforced context is 262,144 tokens; a larger catalog `max_context_length` refuses the load. GLM loads only on Apple M5 Max or M5 Ultra with at least 256 GB of unified memory: the provider reports the new runtime capability `glm5_next_v1` only there, the build requires `apple_m5`, `mlx_nax` and `glm5_next_v1`, and other Macs report their chip and memory in the refusal. GLM requests reserve target KV (33,836 bytes per token; 8.87 GB for a full request), native step scratch and embedded-MTP state per actual reserved token, alongside the fixed recurrent and MTP charges, and the running-row cap is the largest the engine's step-scratch activation check admits; the slot reports that combined rate as `kv_bytes_per_token`, must hold one full-length request to publish, and refuses a request larger than its whole pool as capacity instead of queueing it.

- Retain GLM native owners and wired-memory policy entries after backend residency start/end faults. Refuse publication after a failed start and wait for pending ticket work before reporting clean retirement; unsupported platforms skip ticket creation before backend work. Keep the bridge engine, KV claim and activity guards through residency settlement so an end fault cannot erase the retained-memory charge.
- Reject malformed GLM tool suffixes instead of exposing parser fallback text, and report unproven compatibility shutdown through a fixed diagnostic while retaining resources.

- Add provider-hosted GLM aligned-read, descriptor-cache-policy and tiny-artifact loader regressions. They require the matching immutable SDK loader/reader implementation; native cases remain subject to exact-composition qualification.
- Build single-Mac GLM-5.3-Flash on the single-Mac native stack (`Layr-Labs/mlx-swift`, `mlx` and `mlx-c` `work/glm53-flash-release`). It carries the quantized tile-bound, allocation-cap, page-backed footprint and 512-thread launch fixes the GLM path needs, without the two-Mac JACCL, sealed all-sum and collective startup-wait changes, so this release does not depend on the cluster pull requests. Metal kernel sources are unchanged from the previous pin.
- Report why a complete-checkpoint SSD prefix store (the only GLM prefix cache) was not built instead of silently serving uncached: the provider logs one public line naming the model and a typed reason such as `key_unavailable` with the Keychain/Secure Enclave status (an ad hoc signed build has no keychain access group), and local `/metrics` adds `detail="<reason>"` to the `error` `prefix_cache_status`; the heartbeat reason stays `cache_init_failed`. DEBUG builds only can take a persistent cache key from an operator-created 32-byte, mode-0600 file named by `DARKBLOOM_DEBUG_CACHE_KEY_FILE` for qualification; release builds do not contain that path.
- Accept OpenRouter's GLM reasoning controls: `reasoning.enabled: true`, `reasoning.exclude: false`, `include_reasoning: true`, `enable_thinking: true` and `chat_template_kwargs` `enable_thinking`/`thinking: true` are no-ops that leave the prompt unchanged, and a positive `reasoning.max_tokens` without an effort selects `low` (up to 1,024), `high` (up to 8,192) or `max`. GLM thinking can be turned off with `reasoning.enabled: false`, `enable_thinking: false`, `chat_template_kwargs` `enable_thinking`/`thinking: false` or effort `none`/`off`: the prompt ends with an empty `<think></think>` block, as the template writes for an assistant turn without reasoning, and the answer is content only. Thinking-off combined with a thinking-on switch, an effort level or a reasoning budget gets HTTP 400. Hiding generated reasoning (`reasoning.exclude: true`, `include_reasoning: false`) still gets HTTP 400 with the fixed local message "GLM-5.3-Flash returns the reasoning it generates; reasoning.exclude true and include_reasoning false are unsupported. To turn thinking off, send reasoning.enabled false, enable_thinking false or reasoning_effort none." and code `unsupported_value`.
- Hash model weights with uncached (`F_NOCACHE`), page-aligned reads before and after a load, so integrity hashing no longer pulls a second copy of the weights through the file cache. On a 256 GB M5 Ultra the cached pre- and post-load hashes of GLM-5.3-Flash's 181.7 GB pushed about 150 GB of the just-loaded weights into the memory compressor (memory pressure warning) and stalled the first request. Digests are unchanged.
- Pin the SDK with GLM-5.3-Flash's bitwise kernel speedups for one Mac (mlx-swift-lm `e4eed647`): KDA prefill recurrence and long-step convolution, MoE NAX tile plan, shared experts inside the routed prefill launches where MLX itself would not split K (65 rows and more), faster MoE gathers and decode router, one-launch hyper-connection sites, DSA decode selection and prefill projections. On one M5 Ultra the greedy output is byte-identical to the previous pin (provider endpoint 14/14, SDK fixed-depth MTP 30/30 token sequences) while prefill is 12–13 % and decode 16–18 % faster. The MTP history work is now charged per prefill chunk, so each GLM MTP request reserves 4.89 GB fixed instead of 11.31 GB.
- Bring three bit-identical GLM-5.3-Flash speedups that previously reached only the deprecated contiguous forward to the paged path that serves it (mlx-swift-lm `0351444e`): decode and verification steps reuse a shared all-true validity mask and build their token embeddings in one launch; prefill attention projections on Neural-Accelerator GPUs run a native GEMM kernel that matches MLX's bit for bit; and each sparse-attention layer stages its KV rows in one launch. Output is bit-identical to the previous pin. Paged decode and MTP verification keep the absorbed attention: the split-K sparse decode attention stays off on the paged path because its output is not bit-identical to the previous pin. The prefill projections give bit-identical logits on a 15,901-position perplexity panel.
- A request refused because the Mac's serving concurrency is full, or (GLM) because the slot is full or the request can never fit it, now gets HTTP 503 with the fixed capacity message before any response headers, for streaming and non-streaming requests, instead of a 200 stream ending in a `server_error` "Response generation failed" frame. Coordinator-connected requests still receive a retryable `capacity`/503 `token_budget_exhausted` error, now sent before the stream with the usual capacity-rejection fields.
- Keep running GLM requests alive when memory is nearly full: a step whose scratch reservation is refused is now deferred instead of failing every row of the step; the requests admitted in that step wait for capacity and new admissions pause until a running request leaves (mlx-swift-lm `48f1e000`). On one M5 Ultra with the SSD prefix store, three ~60K-token requests previously all failed when the second finished prefill; now the running ones continue and the third waits.
3 changes: 3 additions & 0 deletions changelog.d/glm53-video-input.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### GLM-5.3-Flash video input

- Serve GLM-5.3-Flash `video_url` parts (inline `data:video/mp4` or `data:video/quicktime`) instead of refusing them with 400. The processor reads every frame of the constant-frame-rate track but converts and keeps only the 2 FPS official sample (RGB8, within its 512 MiB decoded-frame cap), and places each sampled frame pair as an image-token span with its timestamp; video rows decode target-only and never reuse cached prefixes, like images. The media reservation adds each video's token ceiling and, once, the processor's decoded-frame cap (videos decode one at a time). Variable-frame-rate clips, clips whose sampled frames exceed the decoded-frame cap and clips whose visual tokens exceed the shared 28,532-token prepared-pixel cap are refused with 400.
5 changes: 5 additions & 0 deletions changelog.d/local-responses-continuation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Local Responses continuation and reasoning

- Continue local Responses requests with `previous_response_id`, preserving input, reasoning and correlated tool history. Reject non-null invalid ID types and unavailable IDs with HTTP 400 before model acquisition; null remains absence.
- Bound continuation history with an application-local LRU. Response retrieval uses a separate in-memory object store, so a retrievable response can have expired continuation history; neither store survives application restart. `store: false` suppresses both new saves.
- Select omitted local reasoning parsers by model type while preserving explicit overrides. Keep unfinished prompt-side thinking in reasoning fields for collected Chat and Responses, retrieval and continued history, with the paired SDK parser repair; native parsed channels and token usage remain authoritative.
5 changes: 5 additions & 0 deletions changelog.d/mimo-schema-ingress-parity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### MiMo tool-schema ingress parity

- Preserve original MiMo Chat function-tool schemas across provider/local prompt rendering, serving, recount and benchmark preparation, including typeless enums and Boolean properties.
- Keep existing hosted-tool fallback, malformed-declaration refusal, reserved-schema metadata checks and other model families' normalization.
- Add public scripted-generation regressions; full-model and live platform qualification remain separate.
5 changes: 5 additions & 0 deletions changelog.d/ssd-test-volume-selection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### SSD test working-volume selection

- Honor the selected test working volume in SSD-prefix and bridge write fixtures,
and report directory setup errors directly. Production cache safeguards remain
unchanged.
Loading
Loading