fs90 commited on
Commit
72782f4
·
verified ·
1 Parent(s): ae4819e

Upload Modelfile

Browse files
Files changed (1) hide show
  1. Modelfile +68 -0
Modelfile ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Modelfile for Ollama (GGUF)
2
+ # Auto-generated using Unsloth's template mapper
3
+ # This uses the model.Q4_K_M.gguf quantization
4
+ #
5
+ # Note: You can change the FROM line to use a different quantization
6
+ # Available quantizations in this directory:
7
+ # - model.F16.gguf
8
+ # - model.Q8_0.gguf
9
+ # - model.Q6_K.gguf
10
+ # - model.Q4_K_M.gguf
11
+
12
+
13
+ FROM ./model.Q4_K_M.gguf
14
+ TEMPLATE """{{ if .Messages }}
15
+ {{- if or .System .Tools }}<|start_header_id|>system<|end_header_id|>
16
+ {{- if .System }}
17
+
18
+ {{ .System }}
19
+ {{- end }}
20
+ {{- if .Tools }}
21
+
22
+ You are a helpful assistant with tool calling capabilities. When you receive a tool call response, use the output to format an answer to the original use question.
23
+ {{- end }}
24
+ {{- end }}<|eot_id|>
25
+ {{- range $i, $_ := .Messages }}
26
+ {{- $last := eq (len (slice $.Messages $i)) 1 }}
27
+ {{- if eq .Role "user" }}<|start_header_id|>user<|end_header_id|>
28
+ {{- if and $.Tools $last }}
29
+
30
+ Given the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt.
31
+
32
+ Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}. Do not use variables.
33
+
34
+ {{ $.Tools }}
35
+ {{- end }}
36
+
37
+ {{ .Content }}<|eot_id|>{{ if $last }}<|start_header_id|>assistant<|end_header_id|>
38
+
39
+ {{ end }}
40
+ {{- else if eq .Role "assistant" }}<|start_header_id|>assistant<|end_header_id|>
41
+ {{- if .ToolCalls }}
42
+
43
+ {{- range .ToolCalls }}{"name": "{{ .Function.Name }}", "parameters": {{ .Function.Arguments }}}{{ end }}
44
+ {{- else }}
45
+
46
+ {{ .Content }}{{ if not $last }}<|eot_id|>{{ end }}
47
+ {{- end }}
48
+ {{- else if eq .Role "tool" }}<|start_header_id|>ipython<|end_header_id|>
49
+
50
+ {{ .Content }}<|eot_id|>{{ if $last }}<|start_header_id|>assistant<|end_header_id|>
51
+
52
+ {{ end }}
53
+ {{- end }}
54
+ {{- end }}
55
+ {{- else }}
56
+ {{- if .System }}<|start_header_id|>system<|end_header_id|>
57
+
58
+ {{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>
59
+
60
+ {{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>
61
+
62
+ {{ end }}{{ .Response }}{{ if .Response }}<|eot_id|>{{ end }}"""
63
+ PARAMETER stop "<|start_header_id|>"
64
+ PARAMETER stop "<|end_header_id|>"
65
+ PARAMETER stop "<|eot_id|>"
66
+ PARAMETER stop "<|eom_id|>"
67
+ PARAMETER temperature 1.5
68
+ PARAMETER min_p 0.1