Create an Ollama Modelfile for a Local Model

An Ollama Modelfile stores the model and settings behind a named variant. This example gives a model a consistent role for writing synthetic release notes. Use an installed base model to keep the experiment local.

Worked example

A Modelfile for short release notes

FROM llama3.2:latest
PARAMETER temperature 0.2
SYSTEM Write short release notes. State the user-visible change and keep uncertain details out.

Steps

  1. Run ollama list and pick an installed text model. Save the example as Modelfile and replace llama3.2:latest if your base model has a different tag.
  2. From that directory, run ollama create release-note-demo -f Modelfile. Start it with ollama run release-note-demo and ask for a release note about a new CSV export.
  3. Inspect the variant with ollama show --modelfile release-note-demo. Compare the system message you see with the saved Modelfile.

What to check

  • If Ollama cannot find the base model, verify its exact tag with ollama list. Creating with a different tag changes the base model your test covers.
  • A system message guides output. Keep an application-side check if the final release note must meet an exact length or format.

Create a starter Ollama Modelfile

References