Update README.md
Browse files
README.md
CHANGED
@@ -32,12 +32,56 @@ This is a pretty heavy to run model if you want on device ai's for phones I'd re
|
|
32 |
To use this model, you must use a service which supports the GGUF file format.
|
33 |
Additionaly, this is the Prompt Template: it uses the qwen2 template.
|
34 |
```
|
35 |
-
|
36 |
-
|
37 |
-
{{
|
38 |
-
{{ .
|
39 |
-
{{
|
40 |
-
{{ .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
```
|
42 |
|
43 |
Or if you are using an anti prompt: <|end|><|assistant|>
|
|
|
32 |
To use this model, you must use a service which supports the GGUF file format.
|
33 |
Additionaly, this is the Prompt Template: it uses the qwen2 template.
|
34 |
```
|
35 |
+
<thinking>
|
36 |
+
|
37 |
+
{{- if .Suffix }}<|fim_prefix|>{{ .Prompt }}<|fim_suffix|>{{ .Suffix }}<|fim_middle|>
|
38 |
+
{{- else if .Messages }}
|
39 |
+
{{- if or .System .Tools }}<|im_start|>system
|
40 |
+
{{- if .System }}
|
41 |
+
{{ .System }}
|
42 |
+
{{- end }}
|
43 |
+
{{- if .Tools }}
|
44 |
+
# Tools
|
45 |
+
You may call one or more functions to assist with the user query.
|
46 |
+
You are provided with function signatures within <tools></tools> XML tags:
|
47 |
+
<tools>
|
48 |
+
{{- range .Tools }}
|
49 |
+
{"type": "function", "function": {{ .Function }}}
|
50 |
+
{{- end }}
|
51 |
+
</tools>
|
52 |
+
For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
|
53 |
+
<tool_call>
|
54 |
+
{"name": <function-name>, "arguments": <args-json-object>}
|
55 |
+
</tool_call>
|
56 |
+
{{- end }}<|im_end|>
|
57 |
+
{{ end }}
|
58 |
+
{{- range $i, $_ := .Messages }}
|
59 |
+
{{- $last := eq (len (slice $.Messages $i)) 1 -}}
|
60 |
+
{{- if eq .Role "user" }}<|im_start|>user
|
61 |
+
{{ .Content }}<|im_end|>
|
62 |
+
{{- else if eq .Role "assistant" }}<|im_start|>assistant
|
63 |
+
{{ if .Content }}{{ .Content }}
|
64 |
+
{{- else if .ToolCalls }}<tool_call>
|
65 |
+
{{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
|
66 |
+
{{ end }}</tool_call>
|
67 |
+
{{- end }}{{ if not $last }}<|im_end|>
|
68 |
+
{{ end }}
|
69 |
+
{{- else if eq .Role "tool" }}<|im_start|>user
|
70 |
+
<tool_response>
|
71 |
+
{{ .Content }}
|
72 |
+
</tool_response><|im_end|>
|
73 |
+
{{ end }}
|
74 |
+
{{- if and (ne .Role "assistant") $last }}<|im_start|>assistant
|
75 |
+
{{ end }}
|
76 |
+
{{- end }}
|
77 |
+
{{- else }}
|
78 |
+
{{- if .System }}<|im_start|>system
|
79 |
+
{{ .System }}<|im_end|>
|
80 |
+
{{- end }}{{ if .Prompt }}<|im_start|>user
|
81 |
+
{{ .Prompt }}<|im_end|>
|
82 |
+
{{ end }}<|im_start|>assistant
|
83 |
+
{{ end }}{{ .Response }}{{ if .Response }}<|im_end|>{{ end }}
|
84 |
+
|
85 |
```
|
86 |
|
87 |
Or if you are using an anti prompt: <|end|><|assistant|>
|