[GH-ISSUE #14722] Qwen 3.5 does not respect the TEMPLATE field #35279

Closed
opened 2026-04-22 19:40:30 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @seamon67 on GitHub (Mar 8, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/14722

What is the issue?

When creating a Modelfile from Qwen 3.5 (I tested 27b and 122b), I put the
TEMPLATE field as

TEMPLATE """ {{ .System }} """

and then set a SYSTEM field as

SYSTEM """Testy Test."""

to make the model only see the System message and not any user messages.

Next, I started a chat with the model with a simple Hi.
The model was able to see the Hi.

Relevant log output


OS

Linux

GPU

Nvidia

CPU

AMD

Ollama version

0.17.7

Originally created by @seamon67 on GitHub (Mar 8, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/14722 ### What is the issue? When creating a Modelfile from Qwen 3.5 (I tested 27b and 122b), I put the TEMPLATE field as `TEMPLATE """ {{ .System }} """` and then set a SYSTEM field as `SYSTEM """Testy Test."""` to make the model only see the System message and not any user messages. Next, I started a chat with the model with a simple Hi. The model was able to see the Hi. ### Relevant log output ```shell ``` ### OS Linux ### GPU Nvidia ### CPU AMD ### Ollama version 0.17.7
GiteaMirror added the bug label 2026-04-22 19:40:30 -05:00
Author
Owner

@seamon67 commented on GitHub (Mar 8, 2026):

The 27b model was tested from a conversion from Safetensors.
The 122b model was pulled from the Ollama Registry.

<!-- gh-comment-id:4019996283 --> @seamon67 commented on GitHub (Mar 8, 2026): The 27b model was tested from a conversion from [Safetensors](https://huggingface.co/Qwen/Qwen3.5-27B). The 122b model was pulled from the Ollama Registry.
Author
Owner

@rick-github commented on GitHub (Mar 9, 2026):

If you did FROM qwen3.5:27b, then the new model is inheriting the PARSER and RENDERER from the parent model. You can avoid that by specifying the GGUF rather than the model:

ollama show --modelfile qwen3.5:27b | grep "^FROM " > Modelfile
echo 'TEMPLATE """ {{ .System }} """' >> Modelfile
echo 'SYSTEM """Testy Test."""' >> Modelfile
ollama create qwen3.5:14722
ollama run qwen3.5:14722 hi

See #14560 for overriding.

<!-- gh-comment-id:4023944422 --> @rick-github commented on GitHub (Mar 9, 2026): If you did `FROM qwen3.5:27b`, then the new model is inheriting the `PARSER` and `RENDERER` from the parent model. You can avoid that by specifying the GGUF rather than the model: ``` ollama show --modelfile qwen3.5:27b | grep "^FROM " > Modelfile echo 'TEMPLATE """ {{ .System }} """' >> Modelfile echo 'SYSTEM """Testy Test."""' >> Modelfile ollama create qwen3.5:14722 ollama run qwen3.5:14722 hi ``` See #14560 for overriding.
Author
Owner

@seamon67 commented on GitHub (Mar 9, 2026):

If you did FROM qwen3.5:27b, then the new model is inheriting the PARSER and RENDERER from the parent model. You can avoid that by specifying the GGUF rather than the model:

ollama show --modelfile qwen3.5:27b | grep "^FROM " > Modelfile
echo 'TEMPLATE """ {{ .System }} """' >> Modelfile
echo 'SYSTEM """Testy Test."""' >> Modelfile
ollama create qwen3.5:14722
ollama run qwen3.5:14722 hi

See #14560 for overriding.

I will wait for it to be fixed then.
Thanks!

<!-- gh-comment-id:4024040408 --> @seamon67 commented on GitHub (Mar 9, 2026): > If you did `FROM qwen3.5:27b`, then the new model is inheriting the `PARSER` and `RENDERER` from the parent model. You can avoid that by specifying the GGUF rather than the model: > > ``` > ollama show --modelfile qwen3.5:27b | grep "^FROM " > Modelfile > echo 'TEMPLATE """ {{ .System }} """' >> Modelfile > echo 'SYSTEM """Testy Test."""' >> Modelfile > ollama create qwen3.5:14722 > ollama run qwen3.5:14722 hi > ``` > > See [#14560](https://github.com/ollama/ollama/issues/14560) for overriding. I will wait for it to be fixed then. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#35279