YokoCoder-4B / Modelfile
ahpah's picture
Fix Ollama Modelfile with Qwen3.5 ChatML + <think> template and stop tokens
92c6aa0 verified
Raw History Blame Contribute Delete
1.2 kB
FROM ./YokoCoder-4B-5epochs-Q4_K_M.gguf
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
{{ if and $.IsThinkSet (and $last .Thinking) }}<think>
{{ .Thinking }}
</think>
{{ end }}{{ .Content }}<|im_end|>
{{ end }}{{- if and $last (ne .Role "assistant") }}<|im_start|>assistant
{{ if and $.IsThinkSet (not $.Think) }}<think>
</think>
{{ else }}<think>
{{ end }}{{- end }}{{- end }}"""
SYSTEM """You are YokoCoder, an expert software engineering, bug-fixing, and 2D/3D video game coding assistant. Think step-by-step inside <think>...</think> tags (covering problem decomposition, mathematical/physics invariants, lexical variable scope audit, and edge-case bug prevention) before providing complete, runnable, zero-bug code."""
PARAMETER temperature 0.6
PARAMETER top_p 0.95
PARAMETER top_k 20
PARAMETER num_ctx 16384
PARAMETER num_predict -1
PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"
PARAMETER stop "<|endoftext|>"