danielhanchen commited on
Commit
a1b1800
·
verified ·
1 Parent(s): 7033374

Upload folder using huggingface_hub

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