From af95afaf97ae6c7bdc3028235d9d41daaccd6451 Mon Sep 17 00:00:00 2001 From: jonathan308 <5055076+jonathan308@users.noreply.github.com> Date: Fri, 20 Nov 2026 13:07:50 -0800 Subject: [PATCH 1/2] GLM-5.3-Flash: a request whose prefix restore is refused gets its own assistant binding Pin mlx-swift-lm 6f5cc339: the current SDK pin (995f3a5e) plus the change of Layr-Labs/mlx-swift-lm#473. An ordinary request whose GLM prefix restore is refused prefills cold; its MTP assistant no longer reuses the refused restore's stage-funded binding, so that restore's retirement no longer fails the engine's native completion. Co-Authored-By: Claude Opus 5.5 --- changelog.d/glm-refused-prefix-restore-cold-start.md | 11 +++++++++++ docs/architecture/inference.md | 5 ++++- libs/mlx-swift-lm | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 changelog.d/glm-refused-prefix-restore-cold-start.md diff --git a/changelog.d/glm-refused-prefix-restore-cold-start.md b/changelog.d/glm-refused-prefix-restore-cold-start.md new file mode 100644 index 0000000000..1e8ff3362c --- /dev/null +++ b/changelog.d/glm-refused-prefix-restore-cold-start.md @@ -0,0 +1,11 @@ +### GLM-5.3-Flash: a request whose prefix restore is refused gets its own assistant + +- When a GLM-5.3-Flash prefix-cache restore was refused, the request + continued with a cold prefill. Until the refused restore finished retiring, + the request's MTP assistant could be set up on the restore's binding, whose + memory the restore still held. If the restore then retired while the + request was running, the engine stopped with a native completion failure, + failing that request and the others on the engine. +- The request now gets its own assistant binding. The refused restore keeps + its memory until it retires (mlx-swift-lm `6f5cc339`, the current SDK pin + plus this fix). diff --git a/docs/architecture/inference.md b/docs/architecture/inference.md index 029c8240db..4f6b7f5866 100644 --- a/docs/architecture/inference.md +++ b/docs/architecture/inference.md @@ -1796,7 +1796,10 @@ speculative batch. The profile composes with the complete-prefix store assistant state is charged to its checkpoint stage until publication moves it to the request. When a deadline admission's restore is refused, releasing the request leaves that charge on the stage, which refunds it once the restore's -native work retires (`AdmissionV2.retireMTPBindingLocked`). +native work retires (`AdmissionV2.retireMTPBindingLocked`). An ordinary request +whose restore is refused prefills cold with its own assistant binding; the +refused restore's binding is unlinked at issuance and keeps its stage charge +(`AdmissionV2.issueMTPBinding`). `DARKBLOOM_GLM_RECTANGULAR_VERIFY=0` (also `false`, `no`, `off`) selects the serial-target single-proposal profile (`GLM5NextProtectedModel.resolvedMTPConfiguration`). Prefill interleave keeps the global diff --git a/libs/mlx-swift-lm b/libs/mlx-swift-lm index 995f3a5ec4..6f5cc33902 160000 --- a/libs/mlx-swift-lm +++ b/libs/mlx-swift-lm @@ -1 +1 @@ -Subproject commit 995f3a5ec4f370842b81c0781726a45ef5f6aa08 +Subproject commit 6f5cc339027caeab7018650e7867313aa4fc12fa From d39ac804d69eb9baf2e695cc6dc081e58cc1a210 Mon Sep 17 00:00:00 2001 From: jonathan308 <5055076+jonathan308@users.noreply.github.com> Date: Fri, 20 Nov 2026 13:41:45 -0800 Subject: [PATCH 2/2] Changelog: scope the refused-restore fix to ordinary requests (review) Co-Authored-By: Claude Opus 5.5 --- .../glm-refused-prefix-restore-cold-start.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/changelog.d/glm-refused-prefix-restore-cold-start.md b/changelog.d/glm-refused-prefix-restore-cold-start.md index 1e8ff3362c..613de8e72c 100644 --- a/changelog.d/glm-refused-prefix-restore-cold-start.md +++ b/changelog.d/glm-refused-prefix-restore-cold-start.md @@ -1,11 +1,12 @@ ### GLM-5.3-Flash: a request whose prefix restore is refused gets its own assistant -- When a GLM-5.3-Flash prefix-cache restore was refused, the request - continued with a cold prefill. Until the refused restore finished retiring, - the request's MTP assistant could be set up on the restore's binding, whose - memory the restore still held. If the restore then retired while the - request was running, the engine stopped with a native completion failure, - failing that request and the others on the engine. +- When a GLM-5.3-Flash prefix-cache restore was refused for an ordinary + request (one without a first-token deadline), the request continued with a + cold prefill. Until the refused restore finished retiring, the request's MTP + assistant could be set up on the restore's binding, whose memory the restore + still held. If the restore then retired while that assistant still held + allocations on its binding, the engine could stop with a native completion + failure, failing that request and the others on the engine. - The request now gets its own assistant binding. The refused restore keeps its memory until it retires (mlx-swift-lm `6f5cc339`, the current SDK pin plus this fix).