Tiny-R1-32B-Preview, which outperforms the 70B model Deepseek-R1-Distill-Llama-70B and nearly matches the full R1 model in math.
tools
32b
866 Pulls Updated 4 weeks ago
c636d4d25652 · 1.7kB
{{- if gt (len .Tools) 0 }}
<|im_start|>system
{{- if and (gt (len .Messages) 0) (eq (index .Messages 0).Role "system") }}
{{ (index .Messages 0).Content }}
{{- else }}
You are Qwen, created by Alibaba Cloud. You are a helpful assistant.
{{- end }}
# 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 }}
{{ json . }}
{{- 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><|im_end>
{{- else }}
{{- if and (gt (len .Messages) 0) (eq (index .Messages 0).Role "system") }}
<|im_start|>system
{{ (index .Messages 0).Content }}<|im_end>
{{- else }}
<|im_start|>system
You are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end>
{{- end }}
{{- end }}
{{- range $index, $message := .Messages }}
{{- if or (eq $message.Role "user") (and (eq $message.Role "system") (gt $index 0)) (and (eq $message.Role "assistant") (not $message.ToolCalls)) }}
<|im_start|>{{ $message.Role }}
{{ $message.Content }}<|im_end>
{{- end }}
{{- if and (eq $message.Role "assistant") $message.ToolCalls }}
<|im_start|>assistant
{{- if $message.Content }}
{{ $message.Content }}
{{- end }}
{{- range $message.ToolCalls }}
<tool_call>
{"name": {{ .Function.Name }}, "arguments": {{ json .Function.Arguments }}}
</tool_call>
{{- end }}
<|im_end>
{{- end }}
{{- if eq $message.Role "tool" }}
<|im_start|>user
<tool_response>
{{ $message.Content }}
</tool_response>
<|im_end>
{{- end }}
{{- end }}
<|im_start|>assistant