Repository navigation
Stop unsloth chat and unsloth inference ignoring the model's recommended settings - #11478
Conversation
Review + reproduction evidencePinned head: This changes the CLI only, so nothing in the Studio UI changes and there are no screenshots. Instead I recorded the sampling values the backend actually generated with. Setup: Modal L4, Studio Chat recommendation (
(temperature / top_p / top_k / repetition_penalty). All runs exited 0 and produced a reply. Tests: the 4 new tests in Checks: static safety scan and worktree checks (workflow perms/pins, skips, merge-aware revert) are clean. Staging CI on #144 finished: 14/16 workflows green, including Mac UI + API + Update + Inference, Unsloth API/UI/GGUF, and Windows API/UI/GGUF. The 2 reds do not come from this PR:
Notes (non-blocking): the CLI now resolves sampling with the same |
|
Confirmed the CLI path in unsloth_cli/_inference.py was still sending the hardcoded 0.7/0.9/40/1.1 instead of the model recommendation from resolve_effective_sampling, and the before and after table matches what I would expect for Gemma 3. Will get this reviewed. |
|
Codex review on a staging copy (Lyxot#66, diff identical to this PR at f354029) converged on the first pass with no findings: Lyxot#66 (comment) There were no review threads to address on this PR. CI on the staging PR: 47 passed, 2 skipped, 2 failed. Neither failure touches
The upstream run's other failures are unrelated too: the |
Lyxot
left a comment
There was a problem hiding this comment.
LGTM. Unset sampling flags now fall through to the same resolve_effective_sampling path the server uses, both over HTTP and in-process. Codex review and CI results are in the comment above; the CI failures are unrelated to this change.
…ded settings (unslothai#11478) * CLI: let unset sampling flags fall back to the model's recommended values * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
unsloth chatandunsloth inferencealways sent temperature 0.7, top_p 0.9, top_k 40 and repetition penalty 1.1. So the per-model settings added in #7335 never reached the CLI, and a Gemma 3 chat ran at 0.7/0.9/40/1.1 instead of 1.0/0.95/64/1.0.These flags are now empty by default, so the model's recommended values are used, and any flag that is typed still wins. This works with a running Studio, with
--no-serverand on Mac. Tested with Gemma 3: the settings the model actually ran with now match what the Studio Chat page recommends.