atsintli commited on
Commit
f5151ca
·
verified ·
1 Parent(s): de6cafa

(Trained with Unsloth)

Browse files
Files changed (1) hide show
  1. Modelfile +52 -0
Modelfile ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ {{- $lastUserIdx := -1 -}}
4
+ {{- range $idx, $msg := .Messages -}}
5
+ {{- if eq $msg.Role "user" }}{{ $lastUserIdx = $idx }}{{ end -}}
6
+ {{- end }}
7
+ {{- if or .System .Tools }}<|im_start|>system
8
+ {{ if .System }}
9
+ {{ .System }}
10
+ {{- end }}
11
+ {{- if .Tools }}
12
+
13
+ # Tools
14
+
15
+ You may call one or more functions to assist with the user query.
16
+
17
+ You are provided with function signatures within <tools></tools> XML tags:
18
+ <tools>
19
+ {{- range .Tools }}
20
+ {"type": "function", "function": {{ .Function }}}
21
+ {{- end }}
22
+ </tools>
23
+
24
+ For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
25
+ <tool_call>
26
+ {"name": <function-name>, "arguments": <args-json-object>}
27
+ </tool_call>
28
+ {{- end -}}
29
+ <|im_end|>
30
+ {{ end }}
31
+ {{- range $i, $_ := .Messages }}
32
+ {{- $last := eq (len (slice $.Messages $i)) 1 -}}
33
+ {{- if eq .Role "user" }}<|im_start|>user
34
+ {{ .Content }}<|im_end|>
35
+ {{ else if eq .Role "assistant" }}<|im_start|>assistant
36
+ {{ if (and $.IsThinkSet (and .Thinking (or $last (gt $i $lastUserIdx)))) -}}
37
+ <think>{{ .Thinking }}</think>
38
+ {{ end -}}
39
+ {{ if .Content }}{{ .Content }}
40
+ {{- else if .ToolCalls }}<tool_call>
41
+ {{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
42
+ {{ end }}</tool_call>
43
+ {{- end }}{{ if not $last }}<|im_end|>
44
+ {{ end }}
45
+ {{- else if eq .Role "tool" }}<|im_start|>user
46
+ <tool_response>
47
+ {{ .Content }}
48
+ </tool_response><|im_end|>
49
+ {{ end }}
50
+ {{- if and (ne .Role "assistant") $last }}<|im_start|>assistant
51
+ {{ end }}
52
+ {{- end }}