[GH-ISSUE #14903] Better documentation needed for hf.co -> Modelfile workflow conversion and API call differences native/openai #56112

Closed
opened 2026-04-29 10:16:37 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @Xnyle on GitHub (Mar 17, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/14903

Trying to get different Qwen3.5 models from hf.co to run I'm currently stuck trying to disable thinking.

Available (at least the one I found) documentation / examples do not answer the following questions:

  1. Why does the standard Ollama Template for qwen3.5 just contain .Prompt and nothing else?
  2. If i use for instance unsloth/Qwen3.5-35B-A3B-GGUF it contains {%- if enable_thinking is defined and enable_thinking is false %} but how is that supposed to be set?
  3. what about the {{ if and .IsThinkSet (not .Think) -}} present in the qwen3 Templates (those can be set for instance via think:true in the OpenAi compatible completions API?
Originally created by @Xnyle on GitHub (Mar 17, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/14903 Trying to get different Qwen3.5 models from hf.co to run I'm currently stuck trying to disable thinking. Available (at least the one I found) documentation / examples do not answer the following questions: 1. Why does the standard Ollama Template for qwen3.5 just contain .Prompt and nothing else? 2. If i use for instance unsloth/Qwen3.5-35B-A3B-GGUF it contains {%- if enable_thinking is defined and enable_thinking is false %} but how is that supposed to be set? 3. what about the {{ if and $.IsThinkSet (not $.Think) -}} present in the qwen3 Templates (those can be set for instance via think:true in the OpenAi compatible completions API?
GiteaMirror added the feature request label 2026-04-29 10:16:37 -05:00
Author
Owner

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

  1. Template rendering and parsing for some models has been moved to dedicated code.
  2. That's the Jinja template which is not supported in ollama. It corresponds to the {{ if and $.IsThinkSet (not $.Think) -}} in the Go template used by ollama. This is controlled by the think parameter in the API call.
  3. Thinking control via the OpenAI is done by setting reasoning_effort in the API call.
<!-- gh-comment-id:4073818326 --> @rick-github commented on GitHub (Mar 17, 2026): 1. Template rendering and parsing for some models has been moved to [dedicated code](https://github.com/ollama/ollama/tree/main/model/parsers). 2. That's the Jinja template which is not supported in ollama. It corresponds to the `{{ if and $.IsThinkSet (not $.Think) -}}` in the Go template used by ollama. This is controlled by the [`think`](https://github.com/ollama/ollama/blob/main/docs/api.md#parameters-1:~:text=use%20if%20supported-,think,-%3A%20%28for%20thinking%20models) parameter in the API call. 3. Thinking control via the OpenAI is done by setting [`reasoning_effort`](https://github.com/ollama/ollama/blob/main/docs/api/openai-compatibility.mdx#supported-request-fields:~:text=%5Bx%5D-,reasoning_effort,-%28%22high%22) in the API call.
Author
Owner

@Xnyle commented on GitHub (Mar 17, 2026):

Thank you. Got a clearer picture now.

Suggestion so that not every newcomer trips over the same traps:

There should be an overview explaining how tokenizer.chat_template lands in the generated Modelfile, how that's then probably the wrong template format and so on.

Also for example https://docs.ollama.com/capabilities/thinking should mention that for /completions it's a different field/behaviour. More cross references between "Capabilities" and the two different APIs in general.

<!-- gh-comment-id:4074283379 --> @Xnyle commented on GitHub (Mar 17, 2026): Thank you. Got a clearer picture now. Suggestion so that not every newcomer trips over the same traps: There should be an overview explaining how tokenizer.chat_template lands in the generated Modelfile, how that's then probably the wrong template format and so on. Also for example https://docs.ollama.com/capabilities/thinking should mention that for /completions it's a different field/behaviour. More cross references between "Capabilities" and the two different APIs in general.
Author
Owner

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

https://github.com/ollama/ollama/blob/main/docs/modelfile.mdx#template

<!-- gh-comment-id:4074328763 --> @rick-github commented on GitHub (Mar 17, 2026): https://github.com/ollama/ollama/blob/main/docs/modelfile.mdx#template
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#56112