Repository navigation
Studio: follow a same-model MLX reload in the KV width and int8 prefill settings - #14210
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #8039
Summary
When another tab, or an API auto-switch, reloads the MLX model that is already resident with a different KV cache width or Int8 Prefill setting, this tab kept the old width, the old baseline and the old verdict. The status poll only seeded the MLX group on a model change, plus a recovery branch that needs every field still empty, so once the group held values a same-model reload was ignored. The editor then showed the old width, its verdict badge described a load that is no longer running, and the next Apply re-sent the old width, undoing the other client's change.
The rest of the per-model load settings group already handles this on
main:kvCacheDtype,tensorParallel,specDraftNMax,speculativeTypeandchatTemplateOverrideadvance their loaded baseline on every settled status and move the control only while it still sits on that baseline (#10627,resolveChatTemplateSeed). The shared Run settings draft (#10851), the matching editor keys in the sidebar and the model picker, and thesyncGenerationfence on status reads cover the other parts the issue listed.This PR puts the MLX group on that same rule and drops the separate recovery branch it no longer needs:
loadedMlxKvQuantRequested,loadedMlxInt8PrefillRequestedand the verdict fields (mlxKvQuantReason,mlxKvQuantNote,chatTemplateOverrideReason) follow every settled MLX status.mlxKvQuantandmlxInt8Prefillfollow while they equal their baseline, or on a model change. A value staged in this tab is kept, and its baseline still advances.Test plan
node --experimental-strip-types --test tests/same-model-reload-load-settings.test.ts: on the merge base the two MLX same-model reload cases fail ('8' !== '4','8' !== null); with this change all 5 pass. The GGUF case passes on both and pins the existing behaviour.npm test): 12681 tests, 0 failures.tsc -p tsconfig.app.json --noEmitclean.pytest tests/studio/test_model_picker_contracts.py tests/studio/test_chat_autoload_failure_gate.py tests/studio/test_cli_attach_load_knobs.py: 355 passed.Before / after
Two isolated Studio installs, one at this PR's merge base
a33463fand one at head927c1a4. This host has no MLX, so the page is given the status an MLX backend reports for a resident model loaded at 8-bit KV, on a Mac. The status then switches to the same model reloaded at 4-bit by another client, and the window regains focus, which is when Studio re-reads status.Before, Run settings still shows 8-bit and the 8-bit verdict over a model now running at 4-bit, so Reload would put it back to 8-bit. After, it shows 4-bit and the 4-bit verdict.
On real Apple Silicon (staging
macos-15), a tiny MLX model was loaded twice through Studio's MLX backend at 8-bit and then 4-bit; feeding the two statuses it reported through the merge base leaves the control on 8, and through this PR moves control and baseline to 4.