Repository navigation
GLM-5.3-Flash: a refused prefix restore's release no longer stops the provider - #2436
Merged
Merged
Conversation
Pin mlx-swift-lm 59919868: the 0.10.16 SDK pin (4144be23) plus the change of Layr-Labs/mlx-swift-lm#471. Releasing a first-token deadline request whose GLM prefix restore was refused no longer moves the restore's MTP assistant charge, which its checkpoint stage still holds, into the engine's memory ledger. That growth could be refused under memory pressure, and the release then trapped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 5 tasks
jonathan308
marked this pull request as ready for review
November 20, 2026 18:25
This was referenced Nov 20, 2026
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pins
libs/mlx-swift-lmto995f3a5e: the current SDK pin4144be23plus the change of Layr-Labs/mlx-swift-lm#471 (its commits cherry-picked; the four files it touches are byte-identical to #471's head2b7021a9). Branchsdk/provider-0.10.16-glm-release-fix. #471 merged into mlx-swift-lmmainas4bec0c2435.What changes for a provider: a GLM-5.3-Flash request submitted with a first-token deadline prepares its complete-prefix restore, including the MTP assistant state, before publication. Until publication commits it, that assistant's charge belongs to the restore's checkpoint stage. When the restore is refused, the engine discards the request. That release used to retire the assistant binding as if the request held the charge, which added it to the memory ledger as growth. Under memory pressure the process ledger refused the growth and the provider stopped with a Swift trap (
AdmissionV2.releaseAllLocked), then relaunched minutes later. Now the release only deactivates that binding; the stage keeps the charge and refunds it once the restore's native work retires. Other models, published restores and ordinary requests are unchanged.Before
flowchart TD A[GLM deadline admission prepares prefix restore + MTP assistant] --> B[Publication refused] B --> C[discardDeadlineRejectedRequest -> releaseAll] C --> D[Stage-held assistant charge added to ledger: growth] D --> E{Process headroom?} E -- no --> F[Swift trap: provider stops] E -- yes --> G[Charged twice until assistant leases die]After
Changes
libs/mlx-swift-lm4144be23→995f3a5e.changelog.d/glm-refused-prefix-restore-release.md.docs/architecture/inference.md: the GLM MTP + complete-prefix paragraph states where a restore's assistant charge lives and what a refused restore's release does.Validation
GLM5NextCompleteCheckpointTests.refusedNativeMTPPrefixAdoptionReleasesWithoutChargeGrowth(real tiny GLM target and MTP assistant) runs in mlx-swift-lm Fork Tests on Allow self-route keys to use owned local models #471. Its red control is Red control for #471: tests without the change (do not merge) mlx-swift-lm#472 (the test without the change).python3 scripts/changelog.py check: 25 valid fragments.scripts/docs-impact-check.py --base origin/dev: coverage OK.scripts/docs-check.sh: the one problem it reports (docs/developer/build.mdcitesdeploy/gcp/templates/d-inference-ci.json) is already ondev.5c34062dea.Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com