dnivra26 commited on
Commit
1ccf75b
·
verified ·
1 Parent(s): ace86b8

Trained with Unsloth - Ollama Modelfile

Browse files
Files changed (1) hide show
  1. Modelfile +54 -0
Modelfile ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ FROM qwen2.5-coder-7b-instruct.Q5_K_M.gguf
3
+ TEMPLATE """{{- if .Suffix }}<|fim_prefix|>{{ .Prompt }}<|fim_suffix|>{{ .Suffix }}<|fim_middle|>
4
+ {{- else if .Messages }}
5
+ {{- if or .System .Tools }}<|im_start|>system
6
+ {{- if .System }}
7
+ {{ .System }}
8
+ {{- end }}
9
+ {{- if .Tools }}
10
+
11
+ # Tools
12
+
13
+ You may call one or more functions to assist with the user query.
14
+
15
+ You are provided with function signatures within <tools></tools>:
16
+ <tools>
17
+ {{- range .Tools }}
18
+ {"type": "function", "function": {{ .Function }}}
19
+ {{- end }}
20
+ </tools>
21
+
22
+ For each function call, return a json object with function name and arguments within <tool_call></tool_call> with NO other text. Do not include any backticks or ```json.
23
+ <tool_call>
24
+ {"name": <function-name>, "arguments": <args-json-object>}
25
+ </tool_call>
26
+ {{- end }}<|im_end|>
27
+ {{ end }}
28
+ {{- range $i, $_ := .Messages }}
29
+ {{- $last := eq (len (slice $.Messages $i)) 1 -}}
30
+ {{- if eq .Role "user" }}<|im_start|>user
31
+ {{ .Content }}<|im_end|>
32
+ {{ else if eq .Role "assistant" }}<|im_start|>assistant
33
+ {{ if .Content }}{{ .Content }}
34
+ {{- else if .ToolCalls }}<tool_call>
35
+ {{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
36
+ {{ end }}</tool_call>
37
+ {{- end }}{{ if not $last }}<|im_end|>
38
+ {{ end }}
39
+ {{- else if eq .Role "tool" }}<|im_start|>user
40
+ <tool_response>
41
+ {{ .Content }}
42
+ </tool_response><|im_end|>
43
+ {{ end }}
44
+ {{- if and (ne .Role "assistant") $last }}<|im_start|>assistant
45
+ {{ end }}
46
+ {{- end }}
47
+ {{- else }}
48
+ {{- if .System }}<|im_start|>system
49
+ {{ .System }}<|im_end|>
50
+ {{ end }}{{ if .Prompt }}<|im_start|>user
51
+ {{ .Prompt }}<|im_end|>
52
+ {{ end }}<|im_start|>assistant
53
+ {{ end }}{{ .Response }}{{ if .Response }}<|im_end|>{{ end }}"""
54
+ SYSTEM """You are Qwen, created by Alibaba Cloud. You are a helpful assistant."""