Qwen3.5 keeps thinking #147
-
Environment
What I ExpectI want to strictly limit the model's reasoning/thinking phase so it doesn't consume the entire What I Triedresponse = llm.model.create_chat_completion(
messages=core_messages,
stream=True,
max_tokens=1024,
reasoning_budget=64, # Also tried 128, 256
reasoning_start_in_prompt=True,
reasoning_budget_message="\\n[reasoning budget exhausted]\\n",
)What the Logs ShowThe The Actual ProblemThe model continues generating tokens as if it is still "thinking." It does not stop at the forced end tag. Instead, it keeps producing text until it hits the global My Questionwhat is the recommended way to truly cap the total reasoning length so the model transitions to the actual answer promptly? Any guidance or workaround would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Update: Root Cause Found Root cause: min_p=0.0 I was setting min_p=0.0 explicitly because it's listed in the model's recommended sampling parameters page. I didn't realize this was the actual culprit until several rounds of isolating each parameter individually.
|
Beta Was this translation helpful? Give feedback.
-
|
👌Good practical analysis |
Beta Was this translation helpful? Give feedback.
Update: Root Cause Found
Root cause: min_p=0.0
I was setting min_p=0.0 explicitly because it's listed in the model's recommended sampling parameters page. I didn't realize this was the actual culprit until several rounds of isolating each parameter individually.
Once min_p is omitted entirely (not passed as 0.0, but left out of the call altogether), the ReasoningBudgetSampler behaves as expected: the forced end sequence is honored, and the model transitions cleanly into the answer phase right after the budget is exhausted.
codellm.model.create_chat_completion(messages=core_messages,stream=True,max_tokens=1024,# tools=tools_schema,temperature=1.0,top_p=0.95,top_k=20,# min_p=0.0,…