File size: 1,007 Bytes
9ea491e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Sagui-4B: thinking + vision + code. Build with: ollama create sagui-4b -f Modelfile
FROM ./Sagui-4B-IQ3_XXS.gguf
FROM ./mmproj-Sagui-4B-F16.gguf

# ChatML. Control thinking per request: `ollama run sagui-4b --think=false` or "think": false in the API.
TEMPLATE """{{- if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 }}
{{- if eq .Role "user" }}<|im_start|>user
{{ .Content }}<|im_end|>
{{ else if eq .Role "assistant" }}<|im_start|>assistant
{{ .Content }}{{ if not $last }}<|im_end|>
{{ end }}
{{- end }}
{{- if and (ne .Role "assistant") $last }}<|im_start|>assistant
{{ if and $.IsThinkSet $.Think }}<think>
{{ else }}<think>

</think>

{{ end }}
{{- end }}
{{- end }}"""

PARAMETER stop "<|im_end|>"
PARAMETER stop "<|endoftext|>"

# Upstream sampling settings for non-thinking mode.
PARAMETER temperature 0.7
PARAMETER top_p 0.8
PARAMETER top_k 20
PARAMETER presence_penalty 1.5
PARAMETER num_ctx 16384