paradox0bytes commited on
Commit
89b1717
·
verified ·
1 Parent(s): 3643d96

Upload Modelfile2

Browse files
Files changed (1) hide show
  1. Modelfile2 +53 -0
Modelfile2 ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ./unsloth.Q8_0.gguf
2
+
3
+ TEMPLATE """{{- if or .System .Tools }}<|start_header_id|>system<|end_header_id|>
4
+ {{- if .System }}
5
+
6
+ {{ .System }}
7
+ {{- end }}
8
+ {{- if .Tools }}
9
+
10
+ Cutting Knowledge Date: December 2023
11
+
12
+ When you receive a tool call response, use the output to format an answer to the orginal user question.
13
+
14
+ You are a helpful assistant with tool calling capabilities.
15
+ {{- end }}<|eot_id|>
16
+ {{- end }}
17
+ {{- range $i, $_ := .Messages }}
18
+ {{- $last := eq (len (slice $.Messages $i)) 1 }}
19
+ {{- if eq .Role "user" }}<|start_header_id|>user<|end_header_id|>
20
+ {{- if and $.Tools $last }}
21
+
22
+ Given the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt.
23
+
24
+ Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}. Do not use variables.
25
+
26
+ {{ range $.Tools }}
27
+ {{- . }}
28
+ {{ end }}
29
+ Question: {{ .Content }}<|eot_id|>
30
+ {{- else }}
31
+
32
+ {{ .Content }}<|eot_id|>
33
+ {{- end }}{{ if $last }}<|start_header_id|>assistant<|end_header_id|>
34
+
35
+ {{ end }}
36
+ {{- else if eq .Role "assistant" }}<|start_header_id|>assistant<|end_header_id|>
37
+ {{- if .ToolCalls }}
38
+ {{ range .ToolCalls }}
39
+ {"name": "{{ .Function.Name }}", "parameters": {{ .Function.Arguments }}}{{ end }}
40
+ {{- else }}
41
+
42
+ {{ .Content }}
43
+ {{- end }}{{ if not $last }}<|eot_id|>{{ end }}
44
+ {{- else if eq .Role "tool" }}<|start_header_id|>ipython<|end_header_id|>
45
+
46
+ {{ .Content }}<|eot_id|>{{ if $last }}<|start_header_id|>assistant<|end_header_id|>
47
+
48
+ {{ end }}
49
+ {{- end }}
50
+ {{- end }}"""
51
+ PARAMETER stop <|start_header_id|>
52
+ PARAMETER stop <|end_header_id|>
53
+ PARAMETER stop <|eot_id|>