Repository navigation
Model picker: context length hint, and the preset note as a tooltip - #7755
Conversation
Says what the number started as and that it can be changed. Sits in the shared block, so the picker and the Run Settings sidebar both get it.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e17adb343
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| Unsloth automatically uses 95% of your device's maximum | ||
| supported context, but you can adjust it. |
There was a problem hiding this comment.
State the actual automatic context policy
When Context Length is left on Auto, this claim is incorrect: LlamaCppBackend._fit_context_to_vram selects the full native context when it fits or the largest context fitting the applicable memory budget, and the discrete-GPU budget uses _CTX_FIT_VRAM_FRACTION = 0.97; other paths use different policies. Nothing consistently selects 95% of a device's supported context, so this guidance can mislead users about both the chosen value and how much headroom remains. Describe the VRAM-aware fit instead of asserting 95%.
Useful? React with 👍 / 👎.
The context line now says what the default is without naming a percentage. The preset note was a paragraph under the buttons, which pushed the section tall for text that is read once. It moves to the info tooltip on the section header, where the rest of the panel keeps its explanations. The active and saved summaries still show inside it.
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! 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". |
The fit starts from the model's native context and reduces it to what the device can hold, so the device's memory is the ceiling, not the starting point. Say that instead.
|
The facts here are right, and they still applied after the reword, so fixed in 65d2e23. Checked each claim rather than taking them:
The 95% line had already gone in an earlier commit on this branch, but the replacement was wrong in a subtler way. It said the default is the maximum context your device supports, when the call site starts from Now reads:
That covers both branches, including the paths that honor the request verbatim, since those do not lower it. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. 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". |
Bring in unslothai/unsloth main through unslothai#7755 after the recent unslothai#7683 sync. Preserve the train-page model and dataset preflight, cached resource pins, MLX validation, local fix commits, and the PR-side UI/UX work. Carry upstream's persistent advanced-settings preference, inventory exports, desktop training guard, and generalized native file filters into the reworked flows.
Context Length hint
Adds a line under the Context Length slider saying where the number came from:
That matches the loader: the field defaults to the model's native context, and
_fit_context_to_vramreduces it to the largest context that fits the memory budget, returning the request verbatim when KV metadata is unavailable or the cache is offloaded to CPU RAM.The model picker and the Run Settings sidebar render the same block, so both surfaces get it from the one change. It sits under the slider and above the existing VRAM warning, which keeps the amber line next to the value it refers to, and uses the muted helper style the panel already uses for descriptions.
Preset note
The note about what a preset stores was a paragraph under the Save and Delete buttons. It is read once and then takes up height on every visit, and it was the only explanation in the panel not behind the usual info affordance.
It moves to an
InfoHinton the Preset section header, passed throughheaderAction, which exists for this and keeps the control a sibling of the label and chevron rather than a button inside a button. The dynamic parts are unchanged: the active load summary and, when it differs, the summary saved in the preset both still show inside the tooltip.The panel's tooltip trigger toggles on click as well as hover, so the note stays reachable on touch.
Testing
npm run typecheckcleannpm test: 300 passing, 0 failingnpm run buildcleanbiome checkon both touched files matchesmainexactly