💻Ollama Modelfile
Also known as Modelfile, Ollama Model File
A small text file. It builds your own model in Ollama from a base model.
Think of it like
It is like a recipe card. It names the base dish, then adds your own spices.
Example
Emma wants a model that always answers as a kind maths tutor. She puts that rule in a SYSTEM line. She builds it as tutor and then runs it.
Why it matters
You set it up once, and every chat starts with the same rules. Nobody has to paste them in.
Definition
Example code
dockerfile
FROM llama3.2
PARAMETER temperature 0.3
SYSTEM You are a kind maths tutor. Explain one step at a time.
# then build it:
# ollama create tutor -f ./ModelfileCommon mistake
Key takeaways
- 1FROM comes first. It names the base model.
- 2Settings and rules. PARAMETER and SYSTEM lines.
- 3Build, then run. Create it once, then use its name.