Skip to content

Fix Qwen3 thinking model params overwritten by instruct defaults#15

Open
conorbronsdon wants to merge 2 commits into
rungalileo:mainfrom
conorbronsdon:fix/qwen3-thinking-params
Open

Fix Qwen3 thinking model params overwritten by instruct defaults#15
conorbronsdon wants to merge 2 commits into
rungalileo:mainfrom
conorbronsdon:fix/qwen3-thinking-params

Conversation

@conorbronsdon
Copy link
Copy Markdown
Contributor

@conorbronsdon conorbronsdon commented Mar 13, 2026

User description

Summary

  • Adds missing else clause so the Qwen3 instruct-model parameters don't unconditionally overwrite the thinking-model parameters

Context

The instruct-model parameter block (Temperature=0.7, TopP=0.8) ran after the if "thinking" block without an else, silently overwriting the thinking-model's recommended parameters (Temperature=0.6, TopP=0.95) for models like Qwen3-235B-A22B-Thinking-2507. Both sets of parameters reference Qwen's official best-practices docs on HuggingFace.

Test plan

  • Verify thinking models (e.g. Qwen3-235B-A22B-Thinking-2507) get Temperature=0.6, TopP=0.95
  • Verify instruct models (e.g. Qwen3-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_llm method 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)
UserCommitDate
pratik@galileo.aichanges-for-kimi-thinkingNovember 18, 2025
This pull request is reviewed by Baz. Review like a pro on (Baz).

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>
@conorbronsdon conorbronsdon marked this pull request as ready for review March 13, 2026 06:13
Comment thread v2/evaluate/llm_handler.py
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>
@galileo-automation
Copy link
Copy Markdown

No activity for 30 days — this PR will be closed in 5 days unless updated.

@conorbronsdon
Copy link
Copy Markdown
Contributor Author

@bhavsarpratik ?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants