bots-garden/mini-mepublic Fork
⑂ feature/memory-search
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
🛟 Updated. 8941766Unverified · on feature/memory-search · k33g · 16d ago
turn-reasoning-off.md · 70 lines · 4.3 KBmarkdown
Blame HistoryOpen raw

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

  1. Find your provider in the configuration file (provider:).

  2. Add the server's own switch under sampling.

    For dmr, llamacpp or llmman — all llama.cpp underneath:

    sampling:
      temperature: 0.0
      max_tokens: 4096
      chat_template_kwargs:
        enable_thinking: false
    

    For ollama:

    sampling:
      temperature: 0.0
      max_tokens: 4096
      reasoning_effort: none
    

    The keys you write are merged with the built-in ones (temperature, top_p, max_tokens): only the switch needs adding.

  3. 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)
    391
    

    Measured 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: false removes the 💭 block, the window's ‣ thinking entry and the editor's thought chunks. The model still reasons — same time, same tokens.

  • The model ignores the switch. enable_thinking is 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, with low, medium or high. On dmr, llamacpp or llmman, pass it the same way, under chat_template_kwargs:

    sampling:
      temperature: 0.0
      max_tokens: 4096
      chat_template_kwargs:
        reasoning_effort: low
    

    Use it with care:

    • Reported to work by a user with llmman and llamacpp; not measured in this project (no test, no timing) and not tried on dmr.
    • 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 raises Unexpected reasoning effort ….
    • Templates differ even within a family. Qwen3.5's reads enable_thinking only (on/off). Qwen3.8's (hf.co/unsloth/Qwen3.8-27B-GGUF) reads both: reasoning_effort is low, medium or xhigh (its default; high means xhigh), and only when enable_thinking is not false. Read the template before choosing a value: llmman shows it with curl -s localhost:17434/api/show -d '{"model":"<id>"}', in the template field.
    • On ollama, reasoning_effort goes at the top level of sampling, not under chat_template_kwargs; only none has been measured there.
    • Compaction summaries do not follow it — see below.
  • Turn it off for one run. Keep two configuration files, or start the server itself without reasoning (for llama-server, see its --reasoning-budget option).

  • Compaction summaries. Nothing to do: mm turns reasoning off for the summary of /compact and of the automatic compression, whatever sampling says. On dmr, llamacpp and llmman it sets enable_thinking: false in chat_template_kwargs, keeps your other template variables, and lowers a reasoning_effort you set there to low — gpt-oss's template has no "off", so a summary from that model still reasons a little and that counts against context.summaryMaxTokens. On ollama it sends reasoning_effort: none.

See also

 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
# 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

1. Find your provider in the configuration file (`provider:`).

2. Add the server's own switch under `sampling`.

   For `dmr`, `llamacpp` or `llmman` — all llama.cpp underneath:

   ```yaml
   sampling:
     temperature: 0.0
     max_tokens: 4096
     chat_template_kwargs:
       enable_thinking: false
   ```

   For `ollama`:

   ```yaml
   sampling:
     temperature: 0.0
     max_tokens: 4096
     reasoning_effort: none
   ```

   The keys you write are merged with the built-in ones (`temperature`, `top_p`, `max_tokens`): only the switch needs adding.

3. 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)
   391
   ```

   Measured 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: false` removes the `💭` block, the window's `‣ thinking` entry and the editor's thought chunks. The model still reasons — same time, same tokens.
- **The model ignores the switch.** `enable_thinking` is 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`, with `low`, `medium` or `high`. On `dmr`, `llamacpp` or `llmman`, pass it the same way, under `chat_template_kwargs`:

  ```yaml
  sampling:
    temperature: 0.0
    max_tokens: 4096
    chat_template_kwargs:
      reasoning_effort: low
  ```

  Use it with care:
  - Reported to work by a user with `llmman` and `llamacpp`; not measured in this project (no test, no timing) and not tried on `dmr`.
  - 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 raises `Unexpected reasoning effort …`.
  - Templates differ even within a family. Qwen3.5's reads `enable_thinking` only (on/off). Qwen3.8's (`hf.co/unsloth/Qwen3.8-27B-GGUF`) reads both: `reasoning_effort` is `low`, `medium` or `xhigh` (its default; `high` means `xhigh`), and only when `enable_thinking` is not `false`. Read the template before choosing a value: llmman shows it with `curl -s localhost:17434/api/show -d '{"model":"<id>"}'`, in the `template` field.
  - On `ollama`, `reasoning_effort` goes at the top level of `sampling`, not under `chat_template_kwargs`; only `none` has been measured there.
  - Compaction summaries do not follow it — see below.
- **Turn it off for one run.** Keep two configuration files, or start the server itself without reasoning (for llama-server, see its `--reasoning-budget` option).
- **Compaction summaries.** Nothing to do: `mm` turns reasoning off for the summary of `/compact` and of the automatic compression, whatever `sampling` says. On `dmr`, `llamacpp` and `llmman` it sets `enable_thinking: false` in `chat_template_kwargs`, keeps your other template variables, and lowers a `reasoning_effort` you set there to `low` — gpt-oss's template has no "off", so a summary from that model still reasons a little and that counts against `context.summaryMaxTokens`. On `ollama` it sends `reasoning_effort: none`.

## See also

- The `sampling` key and what it forwards: [configuration reference](../reference/configuration.md).
- Where reasoning comes from and why `mm` reads it itself: [Thinking models](../explanation/thinking-models.md).
- Why each server is told in its own words: [Providers](../explanation/providers.md).