Ollama Modelfile Generator
Build, validate, and parse Ollama Modelfiles with templates, parameters, and examples.
How to use
Choose a base model tag such as gemma4:e4b or a local ./file.gguf, then add a system prompt, a built-in ChatML, Llama 3, Mistral, Gemma 2/3, Gemma 4, or Qwen template (only needed for raw GGUF imports; library models ship their own), and runtime parameters. Stop sequences may be repeated, while Adapter, License, and few-shot Message blocks are optional. The output updates live and includes the matching ollama create command. Switch to Parse existing to inspect a Modelfile and load recognized values back into the builder. Unknown directives are reported as warnings rather than silently discarded.
FAQ
Can FROM point to a local GGUF file?
Yes. Use a relative or absolute local path supported by Ollama, such as ./model.gguf.
Does the parser preserve unknown parameters?
Unknown directives and parameters are listed as warnings. They are not added to the generated form, so review warnings before round-tripping.
Which parameter ranges are checked?
The generator checks temperature, top_p, top_k, num_ctx, repeat_penalty, seed, and num_predict, including integer-only fields.