How to turn a model's reasoning off
A thinking model (Qwen3.5, Qwen3.x, gpt-oss…) reasons before it answers. On a simple question that costs seconds and tokens for nothing. This guide shows how to ask the server not to reason, for every turn. It assumes you already run mm with a YAML configuration file and a thinking model.
Steps
-
Find your provider in the configuration file (
provider:). -
Add the server's own switch under
sampling.For
dmr,llamacpporllmman— all llama.cpp underneath:sampling: temperature: 0.0 max_tokens: 4096 chat_template_kwargs: enable_thinking: falseFor
ollama:sampling: temperature: 0.0 max_tokens: 4096 reasoning_effort: noneThe keys you write are merged with the built-in ones (
temperature,top_p,max_tokens): only the switch needs adding. -
Ask a question and compare. With reasoning on, the line mode prints a dim
💭block before the🤖answer; with it off, the answer comes straight away:$ mm -p "What is 17*23? Answer with the number only." agent.yaml 🤖 391⚙ 0 command(s) 391Measured with Qwen3.5 4B on Docker Model Runner: under a second, where the same question took four seconds of reasoning.
Variants
-
Hide the reasoning but let the model think.
showThinking: falseremoves the💭block, the window's‣ thinkingentry and the editor's thought chunks. The model still reasons — same time, same tokens. -
The model ignores the switch.
enable_thinkingis a variable of the model's chat template: a template that does not read it (a model without a thinking mode, or with another variable name) is not affected. Check the model card for the variable its template reads. -
Lower the effort instead of turning it off. Some templates read a graded variable rather than an on/off one — gpt-oss's reads
reasoning_effort, withlow,mediumorhigh. Ondmr,llamacpporllmman, pass it the same way, underchat_template_kwargs:sampling: temperature: 0.0 max_tokens: 4096 chat_template_kwargs: reasoning_effort: lowUse it with care:
- Reported to work by a user with
llmmanandllamacpp; not measured in this project (no test, no timing) and not tried ondmr. - The variable's name and its values belong to the model's template, not to
mm, which forwards them unchecked. A template that does not read the variable ignores it without any error: compare the length of the💭block with and without the setting to know whether it took effect. A template that reads it may instead reject a value it does not know, and then every request fails: Qwen3.8's raisesUnexpected reasoning effort …. - Templates differ even within a family. Qwen3.5's reads
enable_thinkingonly (on/off). Qwen3.8's (hf.co/unsloth/Qwen3.8-27B-GGUF) reads both:reasoning_effortislow,mediumorxhigh(its default;highmeansxhigh), and only whenenable_thinkingis notfalse. Read the template before choosing a value: llmman shows it withcurl -s localhost:17434/api/show -d '{"model":"<id>"}', in thetemplatefield. - On
ollama,reasoning_effortgoes at the top level ofsampling, not underchat_template_kwargs; onlynonehas been measured there. - Compaction summaries do not follow it — see below.
- Reported to work by a user with
-
Turn it off for one run. Keep two configuration files, or start the server itself without reasoning (for llama-server, see its
--reasoning-budgetoption). -
Compaction summaries. Nothing to do:
mmturns reasoning off for the summary of/compactand of the automatic compression, whateversamplingsays. Ondmr,llamacppandllmmanit setsenable_thinking: falseinchat_template_kwargs, keeps your other template variables, and lowers areasoning_effortyou set there tolow— gpt-oss's template has no "off", so a summary from that model still reasons a little and that counts againstcontext.summaryMaxTokens. Onollamait sendsreasoning_effort: none.
See also
- The
samplingkey and what it forwards: configuration reference. - Where reasoning comes from and why
mmreads it itself: Thinking models. - Why each server is told in its own words: Providers.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|