-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathModelfile-phi-4
More file actions
33 lines (25 loc) · 911 Bytes
/
Copy pathModelfile-phi-4
File metadata and controls
33 lines (25 loc) · 911 Bytes
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
# ollama create phi-4-smcleod-16k:Q6_K -f modelfiles/Modelfile-phi-4
FROM ../phi-4.etf16-Q6_K.gguf
PARAMETER num_ctx 16384
TEMPLATE """{{ if .System }}<|system|>
{{ .System }}<|end|>
{{ end }}{{ if .Prompt }}<|user|>
{{ .Prompt }}<|end|>
{{ end }}<|assistant|>
{{ .Response }}<|end|>
"""
# TEMPLATE """{{{ if .System }}<|im_start|>system<|im_sep|>{{ .System }}<|im_end|>{{ end }}{{ if .Prompt }}<|im_start|>user<|im_sep|>{{ .Prompt }}<|im_end|><|im_start|>assistant<|im_sep|>{{ end }}{{ .Response }}<|im_end|>"""
PARAMETER stop "<|user|>"
PARAMETER stop "<|assistant|>"
PARAMETER stop "<|end|>"
PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_sep|>"
PARAMETER stop "<|im_end|>"
PARAMETER num_keep 128
### 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 ##