~/tools / Model files and chat templates / Ollama Modelfile Checker

Ollama Modelfile Checker — Check a Modelfile the way ollama create reads it

Paste an Ollama Modelfile and see whether ollama create will accept it, before you run it. The tool reads the file the way Ollama does and shows Ollama's own error message with the line, what each instruction ends up as, the parameters with the types Ollama stores, the example messages, and things to watch out for, such as a value that ends early or a TEMPLATE that Ollama may not use. Nothing leaves your browser.

Paste the whole file. ollama show --modelfile <model> prints the Modelfile of a model you have.

ollama create can read this Modelfile

No errors in the steps this tool can check. Whether FROM and any files exist is checked only by ollama create on your computer.

Notes

  • FROM qwen2.5:7b is a model name: the model must be available to Ollama.

What the instructions become

FROM
qwen2.5:7b
SYSTEM
You are a concise assistant. Answer in one or two sentences.
TEMPLATE
Not set: taken from the FROM model

PARAMETER

NameType in OllamaStored value
num_ctxint8192
stopstring[]["\u003c|im_end|\u003e"]
temperaturefloat320.7

The parameters layer of the new model (JSON):

{"num_ctx":8192,"stop":["\u003c|im_end|\u003e"],"temperature":0.7}

Parameters of the FROM model that you do not set here are kept as well.

MESSAGE (example conversation)

  1. userIs Toronto in Canada?
  2. assistantyes

The Modelfile as Ollama writes it back

One line per instruction, without comments, in the format of Command.String in Ollama's source.

FROM qwen2.5:7b
PARAMETER num_ctx 8192
PARAMETER temperature 0.7
PARAMETER stop <|im_end|>
SYSTEM "
You are a concise assistant.
Answer in one or two sentences.
"
MESSAGE user Is Toronto in Canada?
MESSAGE assistant yes

Build a Modelfile from a form in Ollama Modelfile Generator →

Checked on 2026-11-09 against Ollama's source (v0.40.15), its documentation and ollama create in Ollama 0.40.11: Ollama: Modelfile Reference · parser.go

Everything runs in your browser. Nothing is sent anywhere.

A Modelfile looks simple, but small mistakes make ollama create fail with short messages such as "unexpected EOF" or "command must be one of ...". This tool follows Ollama's source code step by step. First it reads the file with the same state machine as Ollama's parser: instructions in any case, values that end at the end of a line unless they start with " or """, PARAMETER names, MESSAGE roles and comments. Then it does what ollama create does before it contacts the server: it stops at ADAPTER and typical_p, checks CAPABILITY and REQUIRES, and converts each PARAMETER to its type the way Ollama's API does (whole numbers, 32-bit floats, true or false, and stop as a list). Last, it checks the TEMPLATE with Go's template rules, as the server does. It shows the parameters as the JSON the new model stores, the example conversation, and the Modelfile as Ollama writes it back. We checked the tool with 43 Modelfiles on Ollama 0.40.11: for every one, it gave the same error as ollama create, or the same stored parameters, system message, template, messages and licenses as the model ollama create made.

Use Cases

  • Find out why ollama create fails and which line causes it
  • Check that parameters such as num_ctx, temperature and stop are read the way you meant, with the types Ollama stores
  • Review a Modelfile from someone else before you build a model from it

Usage

  1. Paste your Modelfile into the box, or edit the example.
  2. Read the result: either ollama create's error with an explanation, or what each instruction becomes.
  3. Check the notes, such as settings given twice or a TEMPLATE without tools, and copy the Modelfile as Ollama writes it back if you need it.

FAQ

What does "unexpected EOF" mean?

Ollama reached the end of the file in the middle of something. Usually a value starts with " or """ but does not end with the same quotes at the end of a line, so Ollama keeps reading to the end. It also happens when a PARAMETER name has characters other than letters, digits and _, or when MESSAGE has a role but no text.

Why does a long SYSTEM message cause "command must be one of ..."?

A value ends at the end of its line. If the message has more lines and is not wrapped in """ (or "), Ollama reads the next line as a new instruction. Wrap multi-line values in """.

Are parameter names case-sensitive?

Yes. Instructions such as FROM or parameter can be in any case, but parameter names must be written exactly, such as temperature. In our test, PARAMETER Temperature 0.5 failed with unknown parameter 'Temperature'.

Does the tool check that the model in FROM exists?

No. It cannot see the models or files on your computer. It tells you whether FROM looks like a model name or a path, but whether it exists is checked only by ollama create.

Why does ADAPTER fail?

In Ollama 0.40, ollama create stops at an ADAPTER line with "LoRA adapters are no longer supported". ADAPTER is not in the current Modelfile documentation.

Is my Modelfile sent anywhere?

No. Everything runs in your browser.

Related