---
source: https://iinventedlight.com/library/notes/ollama-modelfile.md
title: "A Modelfile is the blueprint Ollama uses to build a customized model"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (Ollama docs); MIT (llama.cpp README); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: ollama/ollama (GitHub), Ollama Modelfile, MIT (https://raw.githubusercontent.com/ollama/ollama/main/LICENSE); ggml-org/llama.cpp (GitHub), llama.cpp README, MIT (https://raw.githubusercontent.com/ggml-org/llama.cpp/master/LICENSE)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-ai-eng: Ollama Modelfile"
tags: [ollama, modelfile, gguf, FROM, PARAMETER]
client: Librarian
sources:
  - id: S1
    title: "Ollama Modelfile"
    publisher: ollama/ollama (GitHub)
    url: https://github.com/ollama/ollama/blob/main/docs/modelfile.mdx
    accessed: 2026-11-18
    license: "MIT"
  - id: S2
    title: "llama.cpp README"
    publisher: ggml-org/llama.cpp (GitHub)
    url: https://github.com/ggml-org/llama.cpp/blob/master/README.md
    accessed: 2026-11-18
    license: "MIT"
---
# A Modelfile is the blueprint Ollama uses to build a customized model
**Answer:** A Modelfile is the blueprint for creating and sharing a customized model in Ollama. The required `FROM` instruction names the base model. Optional instructions such as `PARAMETER` and `TEMPLATE` set runtime behavior and the prompt template. You can build from an existing Ollama model, from Safetensors, or from a GGUF file.

## Instructions

The `FROM` instruction defines the base model used when creating a model. `PARAMETER` sets how Ollama will run the model. `TEMPLATE` is the full prompt template sent to the model.

## Claims

- id: C1
  claim: A Modelfile is the blueprint for a customized Ollama model.
  source: S1
  evidence: "A Modelfile is the blueprint to create and share customized models"

- id: C2
  claim: FROM defines the base model used when creating a model.
  source: S1
  evidence: "The `FROM` instruction defines the base model to use"

- id: C3
  claim: PARAMETER sets how Ollama will run the model.
  source: S1
  evidence: "Sets the parameters for how Ollama will run the model"

- id: C4
  claim: llama.cpp can run a GGUF model from a Hugging Face repo.
  source: S2
  evidence: "llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF"

## Sources

- [S1] Ollama Modelfile. ollama/ollama (GitHub). https://github.com/ollama/ollama/blob/main/docs/modelfile.mdx . License: MIT. Accessed 2026-11-18.

- [S2] llama.cpp README. ggml-org/llama.cpp (GitHub). https://github.com/ggml-org/llama.cpp/blob/master/README.md . License: MIT. Accessed 2026-11-18.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: ollama/ollama (GitHub), Ollama Modelfile, MIT (https://raw.githubusercontent.com/ollama/ollama/main/LICENSE); ggml-org/llama.cpp (GitHub), llama.cpp README, MIT (https://raw.githubusercontent.com/ggml-org/llama.cpp/master/LICENSE). Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
