Unsloth Studio: show which models have saved run settings and reset them per field or from the model menu by LeoBorcherding · Pull Request #12608 · unslothai/unsloth · GitHub
Skip to content

Unsloth Studio: show which models have saved run settings and reset them per field or from the model menu - #12608

Open
LeoBorcherding wants to merge 26 commits into
unslothai:mainfrom
LeoBorcherding:studio/run-settings-saved-indicator-and-reset
Open

LeoBorcherding wants to merge 26 commits into
unslothai:mainfrom
LeoBorcherding:studio/run-settings-saved-indicator-and-reset

Conversation

@LeoBorcherding

@LeoBorcherding LeoBorcherding commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Since #10216 you can save a model's run settings without loading it. Once you do that for a few models, it gets hard to manage:

  • Nothing in the model list shows which models have saved settings, so you have to open each one to check.
  • The only reset puts every field back to default at once. There's no way to undo just one field, or to clear a model's saved settings without opening its panel.

What's new

  • Dot on the gear. A model with saved run settings gets a small dot on its gear, and its row buttons stay visible instead of only showing on hover. You can see at a glance which models you've set up.
  • Reset run settings in the ⋮ menu. Shown only when the model has saved settings. It clears them in one click without opening the panel, and the toast keeps an Undo for 10 seconds.
  • Per-field reset in the Run Settings panel. Every setting in the panel (17 of them) has its own reset arrow next to its name, but the arrow only appears when that field differs from its default. A model with one changed setting shows one arrow, so most panels only show one or two. Clicking it puts just that field back. The footer button is renamed Reset all to make clear it resets everything.
  • Save state in the panel header. One line under the model name: "Saved for this model", "Unsaved changes", "Not saved" or "Using defaults". It compares against what's actually saved, so changing a field and then picking the saved value again goes back to "Saved for this model".

Nothing new becomes editable. Every gear here already opens on main, including another model's while one is loaded. This PR makes it visible what's saved and lets you take it back.

Not changed

What gets saved, the storage format, and what's sent when the model loads. Reset uses the same path as the existing Forget settings.

Before / after

Unsloth Desktop shells built from main 996a03f (before) and this branch ac84582 (after), same profile and backend, tester PC, Windows 11. Saved: Qwen3-1.7B (loaded, KV cache q8_0), gemma-4-E2B (Parallel Slots 2), gemma-4-26B UD-IQ3_S (KV cache q4_0, context 32768).

before after
Model list
Another model's settings while Qwen3 is loaded
Row ⋮ menu
The loaded model's settings

Editing another model while one is loaded. gemma-4-E2B has Parallel Slots and Vision saved away from their defaults, so those two show arrows. Clicking the Vision arrow puts it back to the default and the header turns to "Unsaved changes". Save returns it to "Saved for this model", and the Vision arrow is gone because the field is at its default again.

Reset from the row menu, then Undo. The dot disappears, the toast offers Undo, and Undo brings the dot back.

Resetting the model that's currently loaded. Qwen3 is running with KV cache q8_0 from its saved settings. Resetting it from the row menu deletes the saved copy but doesn't touch the running model, so its panel now says "Not saved" (Remember unticked) while still showing q8_0, which is what is running. Ticking Remember and saving makes it "Saved for this model" again.

Tests

Measured at ac84582:

  • 11 new unit tests for the saved-settings lookup, reset + undo, the loaded model's panel after a reset, and per-field reset (including Speculative Decoding "Auto" counting as the default). The two loaded-model and "Auto" cases fail without the fix.
  • 120 model-config tests and 201 contract tests pass; tsc clean.
  • The existing contract and Playwright tests now look for Reset all by its exact name.
  • Driven by hand in the Unsloth Desktop shells above. Pinned rows and non-GGUF rows get the same dot and reset through the same props: code read, not driven.

Before / after (Studio built from the merge base 115777de vs this branch)

Same seeded saved record on both sides (unsloth/gemma-3-270m-it-GGUF UD-Q4_K_XL, KV cache q8_0, Parallel Slots 2), chat model picker, On Device tab.

Model list. The gear on a model with saved run settings carries a dot and stays visible without hovering.

Row menu. "Reset run settings" appears only for a model with saved settings.

Run Settings panel. "Saved for this model" under the name, reset arrows only on the two changed fields (KV Cache Dtype, Parallel Slots), footer button "Reset all". The Estimated Memory Usage block is an async estimate that had not landed on one side when the shot was taken; it is not part of this change.

The same scene gives identical results in Chromium, Firefox and WebKit.

LeoBorcherding and others added 4 commits October 1, 2026 22:35
…-saved-indicator-and-reset

# Conflicts:
#	studio/frontend/src/features/model-picker/components/model-config-page.tsx
Main reverted the custom llama.cpp INI page, which took VisionRow with it, so the Vision reset button moves onto the inline Vision row. The row menu keeps both main's eject items and the run settings reset.
…d, and a loaded model's panel that sees a reset

The per-field and row-menu reset use Undo02Icon instead of a hand-gesture glyph, and sit right after the label rather than past the hover-only hint. The header compares against the saved record, so a field put back reads as saved again. Resetting from the row menu clears the saved flags on a mounted editor's draft (the loaded model's editor stays mounted), and Undo sets them back. Auto speculative decoding counts as the default. The Undo toast stays 10 s.
@LeoBorcherding

LeoBorcherding commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator Author

Merged main (4034997), no conflicts and nothing in this PR's files changed. Since the last review: reset icon is now Undo02, the per-field arrows sit right after each label, the header compares against the saved record, resetting the loaded model from the row menu marks its open panel unsaved, and Speculative Decoding "Auto" counts as the default. Tests added for the last two.

…out resolving the global speculative mode

A saved Auto (null) and the "auto" a loaded model's status writes still match, but an explicit
mode no longer folds into Auto when it equals today's global, so the header says Unsaved changes.
… them

Local GGUF and checkpoint rows, Hub search rows, NPU rows and fine-tuned rows opened run settings
but never passed savedFor, so a model saved through them showed no dot and no menu reset.
@LeoBorcherding

Copy link
Copy Markdown
Collaborator Author

Pushed d0d5cfe. Codex converged on the review mirror, LeoBorcherding/unsloth#131: clean at 12a9642, and d0d5cfe only touches tests.

Changes in this push (4034997..d0d5cfe):

  • a60d11a: a run-settings draft is compared to its saved record without resolving the global speculative mode, so Auto and a saved unset value no longer read as a change.
  • 7b37f2e, c6ba313: every row whose gear opens run settings now shows the saved mark and the reset action. That covers Hub search, NPU, local GGUF and checkpoint rows, and adapters. A contract test checks every gear.
  • b6f8c97, 4bd5adc: an Undo clicked before Forget's server reply is no longer deleted when that reply arrives. The same goes for a save under the model's other name (Hub repo id vs snapshot path).
  • 9ad54e3, 65f6d7f: the same protection for a save made in another tab, identical re-saves included. Each save now gets a unique stamp in localStorage.
  • 9ad54e3: non-GGUF models (Max Seq Length, MLX and NPU Context Length) get the per-field reset. It clears a saved pin in either field.
  • 7de4580, 12a9642: the saved-settings read returns a stable snapshot before the first subscription, including the read that migrates legacy settings.
  • d0d5cfe: test typing fix for tsconfig.test.json.

Each fix has a test that fails before it and passes after. "Repo tests (CPU, studio)" fails 2 tests (test_the_lengths_these_contracts_measure_still_follow_the_ui_scale, test_every_copy_source_is_allowed_by_the_dockerignore). Both fail the same way on main 115777d.

@LeoBorcherding
LeoBorcherding marked this pull request as ready for review October 7, 2026 14:56
@danielhanchen danielhanchen self-assigned this Oct 8, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 8, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 8, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 8, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member

danielhanchen added a commit to Imagineer99/unsloth that referenced this pull request Oct 8, 2026
LeoBorcherding added a commit to LeoBorcherding/unsloth that referenced this pull request Oct 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants