[GH-ISSUE #12464] Alibaba DeepResearch #8280

Closed
opened 2026-04-12 20:49:38 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @itzpingcat on GitHub (Oct 1, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12464

I would like this model. It excels at browser use and uncovering hidden info in the web. It is currently SOTA in all those catagories, surpassing proprietary models.
https://huggingface.co/Alibaba-NLP/Tongyi-DeepResearch-30B-A3B

Originally created by @itzpingcat on GitHub (Oct 1, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12464 I would like this model. It excels at browser use and uncovering hidden info in the web. It is currently SOTA in all those catagories, surpassing proprietary models. https://huggingface.co/Alibaba-NLP/Tongyi-DeepResearch-30B-A3B
GiteaMirror added the model label 2026-04-12 20:49:38 -05:00
Author
Owner

@rick-github commented on GitHub (Oct 1, 2025):

ollama run hf.co/mradermacher/Tongyi-DeepResearch-30B-A3B-GGUF:Q4_K_M

The template with this model doesn't allow control of thinking. This Modelfile does that:

FROM hf.co/mradermacher/Tongyi-DeepResearch-30B-A3B-GGUF:Q4_K_M
TEMPLATE """
{{- $lastUserIdx := -1 -}}
{{- range $idx, $msg := .Messages -}}
{{- if eq $msg.Role "user" }}{{ $lastUserIdx = $idx }}{{ end -}}
{{- end }}
{{- if or .System .Tools }}<|im_start|>system
{{ if .System }}
{{ .System }}
{{- end }}
{{- if .Tools }}

# Tools

You may call one or more functions to assist with the user query.

You are provided with function signatures within <tools></tools> XML tags:
<tools>
{{- range .Tools }}
{"type": "function", "function": {{ .Function }}}
{{- end }}
</tools>

For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
<tool_call>
{"name": <function-name>, "arguments": <args-json-object>}
</tool_call>
{{- end -}}
<|im_end|>
{{ end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 -}}
{{- if eq .Role "user" }}<|im_start|>user
{{ .Content }}<|im_end|>
{{ else if eq .Role "assistant" }}<|im_start|>assistant
{{ if (and $.IsThinkSet (and .Thinking (or $last (gt $i $lastUserIdx)))) -}}
<think>{{ .Thinking }}</think>
{{ end -}}
{{ if .Content }}{{ .Content }}
{{- else if .ToolCalls }}<tool_call>
{{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
{{ end }}</tool_call>
{{- end }}{{ if not $last }}<|im_end|>
{{ end }}
{{- else if eq .Role "tool" }}<|im_start|>user
<tool_response>
{{ .Content }}
</tool_response><|im_end|>
{{ end }}
{{- if and (ne .Role "assistant") $last }}<|im_start|>assistant
{{ if and $.IsThinkSet (not $.Think) -}}
<think>

</think>

{{ end -}}
{{ end }}
{{- end }}"""
$ ollama create tongyi-deepresearch:30b-a3b-q4_K_M -f Modelfile

$ ollama run hf.co/mradermacher/Tongyi-DeepResearch-30B-A3B-GGUF:Q4_K_M hello
<think>
Okay, the user sent "hello". I need to respond appropriately. Let me start by acknowledging their greeting. I should probably say something like, "Hello! How can I assist you today?" That's friendly and opens the door for them to ask questions or request help. I should make sure the tone is welcoming and helpful. 
Wait, is there anything else I should add? Maybe check if they need information on something specific. No, keeping it simple is better here. Just a straightforward greeting and offer assistance. Yeah, that works. Let me go with that.
</think>

Hello! How can I assist you today?

$ ollama run tongyi-deepresearch:30b-a3b-q4_K_M hello
Thinking...
Okay, the user sent "hello". I need to respond appropriately. Let me start by acknowledging their greeting. I should probably say something like, "Hello! How can I assist you today?" That's friendly and opens the door for them to ask questions or request help. I should keep it simple and approachable. Let me make sure 
there's no typo and that the tone is correct. Yep, that should work.
...done thinking.

Hello! How can I assist you today?

$ ollama run tongyi-deepresearch:30b-a3b-q4_K_M --think=false hello
Hello! How can I assist you today? 😊

<!-- gh-comment-id:3355533651 --> @rick-github commented on GitHub (Oct 1, 2025): ``` ollama run hf.co/mradermacher/Tongyi-DeepResearch-30B-A3B-GGUF:Q4_K_M ``` The template with this model doesn't allow control of thinking. This Modelfile does that: ```dockerfile FROM hf.co/mradermacher/Tongyi-DeepResearch-30B-A3B-GGUF:Q4_K_M TEMPLATE """ {{- $lastUserIdx := -1 -}} {{- range $idx, $msg := .Messages -}} {{- if eq $msg.Role "user" }}{{ $lastUserIdx = $idx }}{{ end -}} {{- end }} {{- if or .System .Tools }}<|im_start|>system {{ if .System }} {{ .System }} {{- end }} {{- if .Tools }} # Tools You may call one or more functions to assist with the user query. You are provided with function signatures within <tools></tools> XML tags: <tools> {{- range .Tools }} {"type": "function", "function": {{ .Function }}} {{- end }} </tools> For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags: <tool_call> {"name": <function-name>, "arguments": <args-json-object>} </tool_call> {{- end -}} <|im_end|> {{ end }} {{- range $i, $_ := .Messages }} {{- $last := eq (len (slice $.Messages $i)) 1 -}} {{- if eq .Role "user" }}<|im_start|>user {{ .Content }}<|im_end|> {{ else if eq .Role "assistant" }}<|im_start|>assistant {{ if (and $.IsThinkSet (and .Thinking (or $last (gt $i $lastUserIdx)))) -}} <think>{{ .Thinking }}</think> {{ end -}} {{ if .Content }}{{ .Content }} {{- else if .ToolCalls }}<tool_call> {{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}} {{ end }}</tool_call> {{- end }}{{ if not $last }}<|im_end|> {{ end }} {{- else if eq .Role "tool" }}<|im_start|>user <tool_response> {{ .Content }} </tool_response><|im_end|> {{ end }} {{- if and (ne .Role "assistant") $last }}<|im_start|>assistant {{ if and $.IsThinkSet (not $.Think) -}} <think> </think> {{ end -}} {{ end }} {{- end }}""" ``` ```console $ ollama create tongyi-deepresearch:30b-a3b-q4_K_M -f Modelfile $ ollama run hf.co/mradermacher/Tongyi-DeepResearch-30B-A3B-GGUF:Q4_K_M hello <think> Okay, the user sent "hello". I need to respond appropriately. Let me start by acknowledging their greeting. I should probably say something like, "Hello! How can I assist you today?" That's friendly and opens the door for them to ask questions or request help. I should make sure the tone is welcoming and helpful. Wait, is there anything else I should add? Maybe check if they need information on something specific. No, keeping it simple is better here. Just a straightforward greeting and offer assistance. Yeah, that works. Let me go with that. </think> Hello! How can I assist you today? $ ollama run tongyi-deepresearch:30b-a3b-q4_K_M hello Thinking... Okay, the user sent "hello". I need to respond appropriately. Let me start by acknowledging their greeting. I should probably say something like, "Hello! How can I assist you today?" That's friendly and opens the door for them to ask questions or request help. I should keep it simple and approachable. Let me make sure there's no typo and that the tone is correct. Yep, that should work. ...done thinking. Hello! How can I assist you today? $ ollama run tongyi-deepresearch:30b-a3b-q4_K_M --think=false hello Hello! How can I assist you today? 😊 ```
Author
Owner

@itzpingcat commented on GitHub (Oct 2, 2025):

thank you!

<!-- gh-comment-id:3358558174 --> @itzpingcat commented on GitHub (Oct 2, 2025): thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#8280