Create a Custom Model in Ollama
From the Ollama cheat sheet ยท Modelfile ยท verified Jul 2026
Create a Custom Model
Define a Modelfile with a base model, system prompt, and parameters, then build it.
bash
# Modelfile
FROM llama3.2
SYSTEM "You are a helpful coding assistant."
PARAMETER temperature 0.7
PARAMETER num_ctx 4096
# Build the model
ollama create my-coder -f ./Modelfile๐ก FROM is the only required instruction โ everything else is optional
โก Use PARAMETER to tune behavior: temperature, num_ctx, top_p, repeat_penalty
๐ MESSAGE pre-seeds the conversation to set the model's behavior through examples
๐ข View any model's Modelfile with "ollama show --modelfile <model>"
modelfilecustomcreate