# CludeMem-E4B for Ollama: the CludeMem adapter merged into google/gemma-4-e4b-it (text weights only). # # ollama create cludemem-e4b-v3 -f Modelfile # # FROM expects the GGUF next to this file. For the 8-bit build (preferred for RECONCILE), change it to # ./cludemem-e4b-v3.Q8_0.gguf. # # The template renders the prompt the adapter was trained with, i.e. the Hugging Face tokenizer's # apply_chat_template([system, user], add_generation_prompt=True, enable_thinking=True): # # <|turn>system\n<|think|>\n{system}\n<|turn>user\n{user}\n<|turn>model\n # # is not written here: the GGUF sets tokenizer.ggml.add_bos_token=true, so the runtime prepends it. # The <|think|> line is part of the training prompt; the model does not emit a thinking block, it replies # with one JSON object. No SYSTEM is baked in: each operation sends its own instruction as the system message. # The template covers the one-system, one-user shape every operation uses; send content without leading or # trailing whitespace. # # Ollama 0.34: `ollama create` attaches its built-in gemma4 renderer and parser, and /api/chat renders with # them. Leave "think" unset: the prompt is then token-identical to the training prompt, while "think": false # drops the <|think|> line. FROM ./cludemem-e4b-v3.Q4_K_M.gguf TEMPLATE """<|turn>system <|think|> {{ .System }} {{- range .Messages }}{{- if ne .Role "system" }} <|turn>{{ if eq .Role "assistant" }}model{{ else }}{{ .Role }}{{ end }} {{ .Content }} {{- end }}{{- end }} <|turn>model """ PARAMETER temperature 0 PARAMETER stop "" PARAMETER stop "" PARAMETER num_ctx 8192