How do I disable thinking for gemma4 in ollama?
Posted by ich_hab_deine_Nase@reddit | LocalLLaMA | View on Reddit | 8 comments
I run ollama in combination with LibreChat using docker compose. Have been using gemma3 for quite some time. Now switched to gemma4 only to discover, that is does thinking before it answers me.
I want to disable thinking for that model. Is there a way to do that?
chibop1@reddit
Type
/set nothinkin CLI.fuemmenneunzig@reddit
This works!
AlwaysInconsistant@reddit
Add “You are an American” to the system prompt.
ich_hab_deine_Nase@reddit (OP)
That did the trick. Thank you!
Herr_Drosselmeyer@reddit
Why does nobody ever read the documentation?
https://huggingface.co/google/gemma-4-26B-A4B-it
ich_hab_deine_Nase@reddit (OP)
Not helpful. Nothing to remove from empty system prompt.
Herr_Drosselmeyer@reddit
If there is no <|think|> token at the start of your prompt, there should be no thinking happening. But there will be thinking block, because it will always generate one, but it should be empty.
I haven't used Ollama in a long time and have never used LibreChat, so I don't know how either of them handle prompts. Check the thinking block and see if it's empty. If so, you're good. If not, then find a way to see the raw prompt and check whether the <|think|> token hasn't been snuck in there.
KokaOP@reddit
you can remove the think tag from the system prompt i you can, that will disable it