[GH-ISSUE #685] Question: where are all the Modelfiles? #311

Closed
opened 2026-04-12 09:51:37 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @jamesbraza on GitHub (Oct 3, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/685

https://ollama.ai/library has a lot of models. I would like to add a new model, and want to make sure it uses the GPU. So I am looking to refer to Modelfiles for models featured on https://ollama.ai/library.

Where is the source Modelfiles for the current "built in" models?

Originally created by @jamesbraza on GitHub (Oct 3, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/685 https://ollama.ai/library has a lot of models. I would like to add a new model, and want to make sure it uses the GPU. So I am looking to refer to `Modelfile`s for models featured on https://ollama.ai/library. Where is the source `Modelfile`s for the current "built in" models?
Author
Owner

@technovangelist commented on GitHub (Oct 3, 2023):

There is nothing to add to ensure it uses the gpu.

<!-- gh-comment-id:1745028846 --> @technovangelist commented on GitHub (Oct 3, 2023): There is nothing to add to ensure it uses the gpu.
Author
Owner

@technovangelist commented on GitHub (Oct 3, 2023):

All the settings in the modelfile are shown for each tag in each model.

<!-- gh-comment-id:1745030562 --> @technovangelist commented on GitHub (Oct 3, 2023): All the settings in the modelfile are shown for each tag in each model.
Author
Owner

@jamesbraza commented on GitHub (Oct 3, 2023):

Oh that's pretty convenient, I didn't realize that about Tags, thank you! Though I don't think it's the full Modelfile, for example with https://ollama.ai/library/llama2:13b

screenshot of llama2:13b Tags

I don't see a FROM field, though the docs state it's required. In the llama2:13b's Modelfile, does it have a FROM field?

<!-- gh-comment-id:1745313061 --> @jamesbraza commented on GitHub (Oct 3, 2023): Oh that's pretty convenient, I didn't realize that about Tags, thank you! Though I don't think it's the full `Modelfile`, for example with https://ollama.ai/library/llama2:13b ![screenshot of `llama2:13b` Tags](https://github.com/jmorganca/ollama/assets/8990777/b1b825cd-cfca-4ce8-8f84-af52370226db) I don't see a `FROM` field, though [the docs](https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#from-required) state it's required. In the `llama2:13b`'s `Modelfile`, does it have a `FROM` field?
Author
Owner

@technovangelist commented on GitHub (Oct 3, 2023):

It's from a model weights file on the system that built the model

<!-- gh-comment-id:1745506209 --> @technovangelist commented on GitHub (Oct 3, 2023): It's from a model weights file on the system that built the model
Author
Owner

@jamesbraza commented on GitHub (Oct 3, 2023):

When you say model weights file on the system, you mean something like a local .bin or .gguf? So something like FROM ./downloaded-model.bin.

And if yes, feel free to close this out 👍 I will open a docs PR to add this to docs/

<!-- gh-comment-id:1745538789 --> @jamesbraza commented on GitHub (Oct 3, 2023): When you say model weights file on the system, you mean something like a local `.bin` or `.gguf`? So something like `FROM ./downloaded-model.bin`. And if yes, feel free to close this out 👍 I will open a docs PR to add this to `docs/`
Author
Owner

@technovangelist commented on GitHub (Oct 4, 2023):

Exactly right

<!-- gh-comment-id:1746041671 --> @technovangelist commented on GitHub (Oct 4, 2023): Exactly right
Author
Owner

@pdevine commented on GitHub (Oct 4, 2023):

@jamesbraza You can also use the show command to print out the Modelfile:

% ollama show 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 /Users/pdevine/.ollama/models/blobs/sha256:f79142715bc9539a2edbb4b253548db8b34fac22736593eeaa28555874476e30
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>>
<!-- gh-comment-id:1747187172 --> @pdevine commented on GitHub (Oct 4, 2023): @jamesbraza You can also use the `show` command to print out the Modelfile: ``` % ollama show 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 /Users/pdevine/.ollama/models/blobs/sha256:f79142715bc9539a2edbb4b253548db8b34fac22736593eeaa28555874476e30 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>> ```
Author
Owner

@jamesbraza commented on GitHub (Oct 6, 2023):

Thank you @pdevine ! I appreciated that follow up, I will open a PR shortly to promote that to the docs

<!-- gh-comment-id:1750872446 --> @jamesbraza commented on GitHub (Oct 6, 2023): Thank you @pdevine ! I appreciated that follow up, I will open a PR shortly to promote that to the docs
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#311