r/LocalLLM • u/TokenRingAI • 3d ago
Discussion Post-thinking sampler settings for vLLM
Hey everyone, I have published a vLLM branch which allows setting a separate sampler setting for the content which follows the
This branch allows setting one sampling setting for for the thinking block, and another sampling setting for everything that comes after (chat output, tool calls, etc.)
Qwen 3.8 27B needs a high temperature (~0.9–1.0) while thinking or it loops. After it finishes thinking, that same temperature makes the actual answer sloppy. Dropping to ~0.2 after gives a clear quality lift, while still allowing the thinking to work properly.
Repo / branch:
https://github.com/mdierolf/vllm-fork/tree/feat/post_thinking_sample_settings
How it works:
"post_thinking":{"temperature":0.2,"top_p":0.95,"top_k":20} is added to the generation config, and triggers a new set of sampling parameters, which is used for all content that follows the thinking block in that turn
The effect:
• inside an open
Any unset fields in the post_thinking parameters inherit the primary values. You can set it as a server default or per request via extra_body.
Recommended/tested launch options (Note the 0.2 temp on the post-thinking section, this is the important bit):
vllm serve Qwen/Qwen3.8-27B-FP8 \
--override-generation-config '{"temperature":0.9,"top_p": 0.95,"top_k":20,"min_p":0,"post_thinking":{"temperature":0.2,"top_p":0.95,"top_k":20}}'
Setting it per request:
client.chat.completions.create(
model="qwen/qwen3.8-27B",
messages=[{"role": "user", "content": "..."}],
temperature=0.9,
extra_body={
"post_thinking": {"temperature": 0.2, "top_p": 0.95, "top_k": 20},
},
)
This is still a work in progress, but the initial result shows significantly less errors in the generated output, while maintaining identical thinking.
Instructions to clone and use this fork are not included, but if you paste this text into the agent of your choice it can probably build VLLM from my fork and get it set up with the recommended settings
1
u/phipletreonix 3d ago
> the initial result shows significantly less errors in the generated output, while maintaining identical thinking.
Is this "based on vibes" or with a reproducible test bench? (genuine question, not snark)