Ollama
Modelfile Commands
Create custom models with Modelfiles. Define base models, system prompts, parameters, and templates to build specialized AI assistants.
7 commands
Pro Tips
Use PARAMETER temperature 0.7 to control creativity (0=deterministic, 1=creative).
SYSTEM instruction sets the persistent persona - use for role-specific assistants.
Inherit from quantized base models (e.g., FROM llama2:7b-q4_0) to save memory.
Common Mistakes
Custom models inherit the license of the base model - check usage restrictions.
Large num_ctx values (context length) dramatically increase memory requirements.