Fix Qwen3 thinking model params overwritten by instruct defaults#15
Open
conorbronsdon wants to merge 2 commits into
Open
Fix Qwen3 thinking model params overwritten by instruct defaults#15conorbronsdon wants to merge 2 commits into
conorbronsdon wants to merge 2 commits into
Conversation
The instruct-model parameter block ran unconditionally after the `if "thinking"` block, silently overwriting the thinking-model's recommended parameters (Temperature=0.6, TopP=0.95) with the instruct defaults (Temperature=0.7, TopP=0.8). Add the missing `else` clause so thinking and instruct models each get their correct parameters per Qwen's best-practices docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The "thinking" and "qwen3" substring checks were case-sensitive, but model names use capitalized forms (e.g. Qwen3-235B-A22B-Thinking-2507). This caused thinking models to fall through to instruct defaults. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No activity for 30 days — this PR will be closed in 5 days unless updated. |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Summary
elseclause so the Qwen3 instruct-model parameters don't unconditionally overwrite the thinking-model parametersContext
The instruct-model parameter block (Temperature=0.7, TopP=0.8) ran after the
if "thinking"block without anelse, silently overwriting the thinking-model's recommended parameters (Temperature=0.6, TopP=0.95) for models likeQwen3-235B-A22B-Thinking-2507. Both sets of parameters reference Qwen's official best-practices docs on HuggingFace.Test plan
Qwen3-235B-A22B-Thinking-2507) get Temperature=0.6, TopP=0.95Qwen3-235B-A22B-Instruct-2507) get Temperature=0.7, TopP=0.8🤖 Generated with Claude Code
Generated description
Below is a concise technical summary of the changes proposed in this PR:
Ensure the
LLMHandler.get_llmmethod applies the correct Qwen3 best-practice temperature, TopP, TopK, and MinP values based on whether a thinking or instruct variant is requested. Update the model-name checks to normalize casing so the correct branch is chosen before the instruct defaults run.Latest Contributors(1)