Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
Documenting how to view `Modelfile`s (#723)
James Brazaf24741ff39d0
diff --git a/docs/modelfile.md b/docs/modelfile.mdindex 47386b67f..6f1d8e88f 100644--- a/docs/modelfile.md+++ b/docs/modelfile.md@@ -41,6 +41,8 @@ INSTRUCTION arguments## Examples+### Basic `Modelfile`+An example of a `Modelfile` creating a mario blueprint:```modelfile@@ -63,6 +65,35 @@ To use this:More examples are available in the [examples directory](../examples).+### `Modelfile`s in [ollama.ai/library][1]++There are two ways to view `Modelfile`s underlying the models in [ollama.ai/library][1]:++- Option 1: view a details page from a model's tags page:+ 1. Go to a particular model's tags (e.g. https://ollama.ai/library/llama2/tags)+ 2. Click on a tag (e.g. https://ollama.ai/library/llama2:13b)+ 3. Scroll down to "Layers"+ - Note: if the [`FROM` instruction](#from-required) is not present,+ it means the model was created from a local file+- Option 2: use `ollama show` to print the `Modelfile` like so:++ ```bash+ > ollama show --modelfile llama2:13b+ # Modelfile generated by "ollama show"+ # To build a new Modelfile based on this one, replace the FROM line with:+ # FROM llama2:13b++ FROM /root/.ollama/models/blobs/sha256:123abc+ TEMPLATE """[INST] {{ if and .First .System }}<<SYS>>{{ .System }}<</SYS>>++ {{ end }}{{ .Prompt }} [/INST] """+ SYSTEM """"""+ PARAMETER stop [INST]+ PARAMETER stop [/INST]+ PARAMETER stop <<SYS>>+ PARAMETER stop <</SYS>>+ ```+## Instructions### FROM (Required)@@ -177,3 +208,5 @@ LICENSE """- the **`Modelfile` is not case sensitive**. In the examples, we use uppercase for instructions to make it easier to distinguish it from arguments.- Instructions can be in any order. In the examples, we start with FROM instruction to keep it easily readable.++[1]: https://ollama.ai/library