Sweaterdog commited on
Commit
89d1f6a
1 Parent(s): 86febfb

Update extras/Modelfile [EXPERIMENTAL]

Browse files
Files changed (1) hide show
  1. extras/Modelfile [EXPERIMENTAL] +39 -26
extras/Modelfile [EXPERIMENTAL] CHANGED
@@ -1,29 +1,42 @@
1
  FROM "YOUR/PATH/HERE"
2
 
3
- TEMPLATE """{SYSTEM}
4
- >>> Prompt:
5
- {INPUT}
6
- >>> What do you do?
7
- {OUTPUT}"""
 
8
 
9
-
10
- PARAMETER stop "<|object_ref_end|>"
11
- PARAMETER stop "<|video_pad|>"
12
- PARAMETER stop "<|im_end|>"
13
- PARAMETER stop "<|file_sep|>"
14
- PARAMETER stop "<|quad_end|>"
15
- PARAMETER stop "<|repo_name|>"
16
- PARAMETER stop "<|object_ref_start|>"
17
- PARAMETER stop "<|box_start|>"
18
- PARAMETER stop "</tool_call>"
19
- PARAMETER stop "<|box_end|>"
20
- PARAMETER stop "<|im_start|>"
21
- PARAMETER stop "<tool_call>"
22
- PARAMETER stop "<|PAD_TOKEN|>"
23
- PARAMETER stop "<|image_pad|>"
24
- PARAMETER stop "<|quad_start|>"
25
- PARAMETER stop "<|endoftext|>"
26
- PARAMETER stop "<|vision_"
27
- PARAMETER stop "<|fim_"
28
- PARAMETER temperature 1.5
29
- PARAMETER min_p 0.1
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  FROM "YOUR/PATH/HERE"
2
 
3
+ TEMPLATE """{{- if .Messages }}
4
+ {{- if or .System .Tools }}<|im_start|>system
5
+ {{- if .System }}
6
+ {{ .System }}
7
+ {{- end }}
8
+ {{- if .Tools }}
9
 
10
+ For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
11
+ <tool_call>
12
+ {"name": <function-name>, "arguments": <args-json-object>}
13
+ </tool_call>
14
+ {{- end }}<|im_end|>
15
+ {{ end }}
16
+ {{- range $i, $_ := .Messages }}
17
+ {{- $last := eq (len (slice $.Messages $i)) 1 -}}
18
+ {{- if eq .Role "user" }}<|im_start|>user
19
+ {{ .Content }}<|im_end|>
20
+ {{ else if eq .Role "assistant" }}<|im_start|>assistant
21
+ {{ if .Content }}{{ .Content }}
22
+ {{- else if .ToolCalls }}<tool_call>
23
+ {{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
24
+ {{ end }}</tool_call>
25
+ {{- end }}{{ if not $last }}<|im_end|>
26
+ {{ end }}
27
+ {{- else if eq .Role "tool" }}<|im_start|>user
28
+ <tool_response>
29
+ {{ .Content }}
30
+ </tool_response><|im_end|>
31
+ {{ end }}
32
+ {{- if and (ne .Role "assistant") $last }}<|im_start|>assistant
33
+ {{ end }}
34
+ {{- end }}
35
+ {{- else }}
36
+ {{- if .System }}<|im_start|>system
37
+ {{ .System }}<|im_end|>
38
+ {{ end }}{{ if .Prompt }}<|im_start|>user
39
+ {{ .Prompt }}<|im_end|>
40
+ {{ end }}<|im_start|>assistant
41
+ {{ end }}{{ .Response }}{{ if .Response }}<|im_end|>{{ end }}"""
42
+ SYSTEM You are Andy, a fine tuned model for playing Minecraft, made by SweaterDog