[GH-ISSUE #2310] Just a bit of clarity suggestion on the documentation #27094

Closed
opened 2026-04-22 04:03:26 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @ercanezin on GitHub (Feb 1, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2310

Many thanks for this amazing project.

I had difficulty understanding what to do when importing a local model from the 1st bullet point of the documentation in the importing section.

The first bullet point says

Step 1: Write a Modelfile
Start by creating a Modelfile. This file is the blueprint for your model, specifying weights, parameters, prompt templates and more.

FROM ./mistral-7b-v0.1.Q4_0.gguf

I did understand that I should create a file named Modelfile but the documentation doesn't say to populate it with the location of the file in the following code snippet.

Thanks in advance.

Originally created by @ercanezin on GitHub (Feb 1, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2310 Many thanks for this amazing project. I had difficulty understanding what to do when importing a local model from the 1st bullet point of the documentation in the importing section. The first bullet point says **Step 1: Write a Modelfile** Start by creating a Modelfile. This file is the blueprint for your model, specifying weights, parameters, prompt templates and more. `FROM ./mistral-7b-v0.1.Q4_0.gguf ` I did understand that I should create a file named Modelfile but the documentation doesn't say to populate it with the location of the file in the following code snippet. Thanks in advance.
Author
Owner

@virt-10 commented on GitHub (Feb 1, 2024):

You're probably looking at the README, here is the full documentation.

Also some models are already available just take a look. This video has a brief explanation of Modelfiles.

example for chatml

FROM /path/to/model.gguf

TEMPLATE """
<|im_start|>system
{{ .System }}<|im_end|>
<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""

PARAMETER num_ctx 8192
PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"
<!-- gh-comment-id:1921615192 --> @virt-10 commented on GitHub (Feb 1, 2024): You're probably looking at the README, here is the full [documentation](https://github.com/ollama/ollama/blob/main/docs/modelfile.md). Also some models are already available just take a [look](https://ollama.ai/library). This [video](https://youtu.be/xa8pTD16SnM) has a brief explanation of Modelfiles. example for chatml ``` FROM /path/to/model.gguf TEMPLATE """ <|im_start|>system {{ .System }}<|im_end|> <|im_start|>user {{ .Prompt }}<|im_end|> <|im_start|>assistant """ PARAMETER num_ctx 8192 PARAMETER stop "<|im_start|>" PARAMETER stop "<|im_end|>" ```
Author
Owner

@bmizerany commented on GitHub (Mar 11, 2024):

It seems like this issue is stale? Closing for now, but please reopen if the issue persists using the latest version of Ollama.

<!-- gh-comment-id:1989624240 --> @bmizerany commented on GitHub (Mar 11, 2024): It seems like this issue is stale? Closing for now, but please reopen if the issue persists using the latest version of Ollama.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#27094