EuroLLM-9B-Instruct / Modelfile
Tiara Rodney
Add Ollama base Modelfile (ChatML template + <|im_end|> stops)
9c49e3a unverified
Raw
History Blame Contribute Delete
919 Bytes
# 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