-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathModelfile-mistral
More file actions
70 lines (58 loc) · 2.03 KB
/
Copy pathModelfile-mistral
File metadata and controls
70 lines (58 loc) · 2.03 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# ollama create mistral-nemo-2407:q6_k_l -f modelfiles/Modelfile-mistral
# ollama create mistral-small-3.2-24b-2506-ud:q6_k_xl -f modelfiles/Modelfile-mistral
FROM ../mistral-small-3-2-24b-instruct-2506-ud-q6-k-xl/Mistral-Small-3.2-24B-Instruct-2506-UD-Q6_K_XL.gguf
FROM ../mistral-small-3-2-24b-instruct-2506-ud-q6-k-xl/mmproj-BF16.gguf
TEMPLATE """
{{- range $index, $_ := .Messages }}
{{- if eq .Role "system" }}[SYSTEM_PROMPT]{{ .Content }}[/SYSTEM_PROMPT]
{{- else if eq .Role "user" }}
{{- if and (le (len (slice $.Messages $index)) 2) $.Tools }}[AVAILABLE_TOOLS]{{ $.Tools }}[/AVAILABLE_TOOLS]
{{- end }}[INST]{{ .Content }}[/INST]
{{- else if eq .Role "assistant" }}
{{- if .Content }}{{ .Content }}
{{- if not (eq (len (slice $.Messages $index)) 1) }}</s>
{{- end }}
{{- else if .ToolCalls }}
{{- range $i, $_ := .ToolCalls }}[TOOL_CALLS]{{ .Function.Name }}[CALL_ID]{{ $i }}[ARGS]{{ .Function.Arguments }}
{{- end }}</s>
{{- end }}
{{- else if eq .Role "tool" }}[TOOL_RESULTS]{"content": {{ .Content }}}[/TOOL_RESULTS]
{{- end }}
{{- end }}
"""
PARAMETER stop "[INST]"
PARAMETER stop "[/INST]"
PARAMETER stop "</s>"
PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"
# Cline stop tokens
PARAMETER stop "</tool_call>"
PARAMETER stop "</tool_response>"
PARAMETER stop "</write_to_file>"
PARAMETER stop "</execute_command>"
### Tuning ##
# PARAMETER num_batch 1024
# PARAMETER num_batch 1024
# PARAMETER num_ctx 8192
# PARAMETER num_ctx 24572
# PARAMETER num_ctx 16384
PARAMETER num_ctx 32768
PARAMETER temperature 0.15
# PARAMETER top_p 0.8
### min_p sampling ##
# min_p works best with a bit of temperature
# PARAMETER temperature 0.2
# 1.0 disables top_p, so we can use min_p
# PARAMETER top_p 1.0
# PARAMETER min_p 0.9
### min_p sampling ##
# fit mistral large
# PARAMETER num_batch 64
## For codegen ##
# PARAMETER num_keep 512
# PARAMETER top_p 0.8 # default
# PARAMETER top_k 20 # default
# PARAMETER repetition_penalty 1.05 # default
# PARAMETER presence_penalty 0.2
# PARAMETER frequency_penalty 0.2
# PARAMETER repeat_last_n 50