[GH-ISSUE #5232] [TUI] strata tune: tune a model by name, preview with --plan, and explain every result #3114

Open
opened 2026-11-07 14:38:11 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @yudhanjaya on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5232

Area

[TUI] (the Terminal: strata tune auto, and strata launch --tune)

What do you want to do?

Tune a model without knowing profile names, and understand what the tuner did.

Three things make strata tune auto hard to use today:

  1. The target must be a saved profile name or a JSON path. People type the model they know (strata tune iq3_s).
  2. It starts a 20-minute (or 2-hour) job with no preview. Whether a setting will be tried, or left out and why, is only visible after the run,
    and a large model can fit one or two settings into the quick budget.
  3. A run ends with about four lines. The result already holds every setting's outcome, the skipped ones with reasons and the noise
    figures, but none of it is shown or kept (the temp folder is deleted on exit), so "nothing was changed" cannot be explained.

Proposal, all of it additive (no flag, JSON field or exit code is removed or renamed; the fields the desktop app reads are unchanged):

  • strata tune <name> is strata tune auto <name>. A name resolves to an exact profile, an installed model (strata models list) or a unique
    part of a name. A model with several saved setups gets the one used last, and the others are named. A name that fits several or none is
    refused with the options and the closest names; nothing is guessed.
  • strata tune auto --plan prints what would be tried on this PC, what is left out and why (and which flag would unlock settings skipped for answer
    differences), about how many engine runs that is, and the run time it assumes. It starts nothing. Its list is the one the tuner then measures (tested).
  • After a tune, an account of what the settings measured, the gain a setting needed to count and the noise it had to beat, each setting tried with a plain verdict
    and the reason it did not count, what was left out, and one next step for every way a tune can end. Saved privately (0600) under the presets folder's
    reports/, without per-run argument lists; strata tune report [--markdown] prints it again (the Markdown holds no paths or keys, for a [Benchmark] issue).
  • Progress lines say which run of how many and what was measured so far.

Example of the new text (stub run, wording only):

Your settings: 60.0 tok/s answers, 1500 tok/s prompts (measured 3 times: 60, 60.04, 59.98)
To count, a setting had to be at least +3.0% faster; identical runs on this PC differed by 0.1%.
What was tried:
  Keep more of the conversation in graphics memory  faster        +10.0% against your settings, faster in 2 of 2 rounds
Next: 'IQ3_XXS 128K' is applied at every start. See why each setting was chosen with 'strata presets show', or go back with 'strata presets undo'.

Status: implemented on a fork branch with tests (320 tuning tests pass on the bundled Python), and exercised on one Linux CUDA rig (four real tunes; the first
three ended as #5078 describes, the fourth completed once the reserve was in the setup). Not run: other backends, Windows or macOS, the desktop app. It is Python only; no engine change.

Questions for the maintainers

  1. Is this scope acceptable, and do you prefer one PR or several (my split would be: crash/OOM handling that closes #5078; the report and progress; the
    name lookup and --plan)?
  2. The report adds fields to the tune result (noise.threshold_pct, a reason on a setting that did not win, a kind on a skipped one). Is additive growth
    of that JSON fine for the app?
  3. A follow-up I would only do with your agreement: suggestions from existing benchmark data. bench/results/ and strata bench run's results.json already
    carry hardware, versions and the effective options, so a lookup of "similar machines used these settings" would not need the issue tracker. Should a suggestion
    only ever be shown (never applied), and which results count as comparable (the standard protocol only, or the older community reports too)?

What do you do today instead?

Look up the profile name with strata profile list, pass it to strata tune auto, wait, and read strata presets show. After a failed or no-gain tune there
is nothing to read; with --work-dir the engine logs are kept, but that flag is not the default and its run files hold the run's API key.

Related: #5078 (crash message), #4805 (GUI error detail), #4895 (waiting for memory), #4821 (tuning under --parallel; not part of this).

Originally created by @yudhanjaya on GitHub (Nov 4, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5232 ### Area [TUI] (the Terminal: `strata tune auto`, and `strata launch --tune`) ### What do you want to do? Tune a model without knowing profile names, and understand what the tuner did. Three things make `strata tune auto` hard to use today: 1. The target must be a saved profile name or a JSON path. People type the model they know (`strata tune iq3_s`). 2. It starts a 20-minute (or 2-hour) job with no preview. Whether a setting will be tried, or left out and why, is only visible after the run, and a large model can fit one or two settings into the quick budget. 3. A run ends with about four lines. The result already holds every setting's outcome, the skipped ones with reasons and the noise figures, but none of it is shown or kept (the temp folder is deleted on exit), so "nothing was changed" cannot be explained. Proposal, all of it additive (no flag, JSON field or exit code is removed or renamed; the fields the desktop app reads are unchanged): - `strata tune <name>` is `strata tune auto <name>`. A name resolves to an exact profile, an installed model (`strata models list`) or a unique part of a name. A model with several saved setups gets the one used last, and the others are named. A name that fits several or none is refused with the options and the closest names; nothing is guessed. - `strata tune auto --plan` prints what would be tried on this PC, what is left out and why (and which flag would unlock settings skipped for answer differences), about how many engine runs that is, and the run time it assumes. It starts nothing. Its list is the one the tuner then measures (tested). - After a tune, an account of what the settings measured, the gain a setting needed to count and the noise it had to beat, each setting tried with a plain verdict and the reason it did not count, what was left out, and one next step for every way a tune can end. Saved privately (0600) under the presets folder's `reports/`, without per-run argument lists; `strata tune report [--markdown]` prints it again (the Markdown holds no paths or keys, for a `[Benchmark]` issue). - Progress lines say which run of how many and what was measured so far. Example of the new text (stub run, wording only): ``` Your settings: 60.0 tok/s answers, 1500 tok/s prompts (measured 3 times: 60, 60.04, 59.98) To count, a setting had to be at least +3.0% faster; identical runs on this PC differed by 0.1%. What was tried: Keep more of the conversation in graphics memory faster +10.0% against your settings, faster in 2 of 2 rounds Next: 'IQ3_XXS 128K' is applied at every start. See why each setting was chosen with 'strata presets show', or go back with 'strata presets undo'. ``` Status: implemented on a fork branch with tests (320 tuning tests pass on the bundled Python), and exercised on one Linux CUDA rig (four real tunes; the first three ended as #5078 describes, the fourth completed once the reserve was in the setup). Not run: other backends, Windows or macOS, the desktop app. It is Python only; no engine change. ### Questions for the maintainers 1. Is this scope acceptable, and do you prefer one PR or several (my split would be: crash/OOM handling that closes #5078; the report and progress; the name lookup and `--plan`)? 2. The report adds fields to the tune result (`noise.threshold_pct`, a `reason` on a setting that did not win, a `kind` on a skipped one). Is additive growth of that JSON fine for the app? 3. A follow-up I would only do with your agreement: suggestions from existing benchmark data. `bench/results/` and `strata bench run`'s `results.json` already carry hardware, versions and the effective options, so a lookup of "similar machines used these settings" would not need the issue tracker. Should a suggestion only ever be shown (never applied), and which results count as comparable (the standard protocol only, or the older community reports too)? ### What do you do today instead? Look up the profile name with `strata profile list`, pass it to `strata tune auto`, wait, and read `strata presets show`. After a failed or no-gain tune there is nothing to read; with `--work-dir` the engine logs are kept, but that flag is not the default and its run files hold the run's API key. Related: #5078 (crash message), #4805 (GUI error detail), #4895 (waiting for memory), #4821 (tuning under `--parallel`; not part of this).
Author
Owner

@yudhanjaya commented on GitHub (Nov 4, 2026):

For reference, the implementation of what is proposed here is on a branch of my fork: tuner-clarity (compare with main: 5 commits, current main, no conflicts). It is not a PR; I will open one only with your agreement on scope.

It separates by concern if you prefer several PRs (the commits are in a different order on the branch, so I would rebase each group):

320 tuning tests pass; four real tunes on one Linux CUDA rig. Not run: other backends, Windows, macOS, the app. Benchmark-based suggestions (question 3) are not started.

<!-- gh-comment-id:6636220916 --> @yudhanjaya commented on GitHub (Nov 4, 2026): For reference, the implementation of what is proposed here is on a branch of my fork: [`tuner-clarity`](https://github.com/yudhanjaya/Strata/tree/tuner-clarity) ([compare with main](https://github.com/Niko1221/Strata/compare/main...yudhanjaya:tuner-clarity): 5 commits, current `main`, no conflicts). It is not a PR; I will open one only with your agreement on scope. It separates by concern if you prefer several PRs (the commits are in a different order on the branch, so I would rebase each group): - crash and out-of-memory handling, which is what #5078 reports: [`c3d70693`](https://github.com/yudhanjaya/Strata/commit/c3d70693), [`0c26e53f`](https://github.com/yudhanjaya/Strata/commit/0c26e53f), [`80f8cda8`](https://github.com/yudhanjaya/Strata/commit/80f8cda8) - the report, saved reports and progress lines: [`87e64122`](https://github.com/yudhanjaya/Strata/commit/87e64122) - tuning by name and `--plan`, with a docs section: [`39373af9`](https://github.com/yudhanjaya/Strata/commit/39373af9) 320 tuning tests pass; four real tunes on one Linux CUDA rig. Not run: other backends, Windows, macOS, the app. Benchmark-based suggestions (question 3) are not started.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3114
No description provided.