File size: 919 Bytes
9c49e3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# eurollm:9b-instruct -- Ollama base for the EuroLLM-9B-Teletype adapter.
#
# The GGUF does NOT carry a usable chat template or stop tokens in its metadata,
# so a bare `FROM ./gguf` yields a `{{ .Prompt }}` template with no stop: the
# model then never stops, rambling to the token cap (slow) and past the command
# (gibberish). Set ChatML and the stops explicitly, then:
#
#   ollama create eurollm:9b-instruct -f Modelfile
#
# The EuroLLM-9B-Teletype Modelfile builds its adapter `FROM eurollm:9b-instruct`,
# inheriting this template and these stops. Verify with `ollama show <m> --modelfile`.

FROM ./EuroLLM-9B-Instruct-Q4_K_M.gguf

TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ if .Prompt }}<|im_start|>user
{{ .Prompt }}<|im_end|>
{{ end }}<|im_start|>assistant
{{ .Response }}<|im_end|>
"""

PARAMETER stop "<|im_end|>"
PARAMETER stop "<|im_start|>"
PARAMETER num_ctx 4096