[GH-ISSUE #12755] Error: command must be one of "from", "license", "template", "system", "adapter", "parameter", or "message" #8459

Closed
opened 2026-04-12 21:08:51 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @fahadshery on GitHub (Oct 23, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12755

What is the issue?

Here is my basic Modelfile:

parameter temperature 0.3
PARAMETER top_p 0.8
PARAMETER repeat_penalty 1.15
FROM llama3.1:latest

When I try and create a new model using:

ollama create my_model -f Modelfile

I get the following error:

Error: command must be one of "from", "license", "template", "system", "adapter", "parameter", or "message"

I have changed the Modelfile to have FROM llama3.1:latest at the top and using lower case from but still unable to see that it is present! what am I doing wrong?

Relevant log output


OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @fahadshery on GitHub (Oct 23, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12755 ### What is the issue? Here is my basic Modelfile: ``` parameter temperature 0.3 PARAMETER top_p 0.8 PARAMETER repeat_penalty 1.15 FROM llama3.1:latest ``` When I try and create a new model using: ``` ollama create my_model -f Modelfile ``` I get the following error: ``` Error: command must be one of "from", "license", "template", "system", "adapter", "parameter", or "message" ``` I have changed the Modelfile to have FROM llama3.1:latest at the top and using lower case from but still unable to see that it is present! what am I doing wrong? ### Relevant log output ```shell ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the bug label 2026-04-12 21:08:51 -05:00
Author
Owner

@rick-github commented on GitHub (Oct 23, 2025):

Works for me:

$ cat > Modelfile
parameter temperature 0.3
PARAMETER top_p 0.8
PARAMETER repeat_penalty 1.15
FROM llama3.1:latest
$ ollama create my_model -f Modelfile
gathering model components 
using existing layer sha256:667b0c1932bc6ffc593ed1d03f895bf2dc8dc6df21db3042284a6f4416b06a29 
using existing layer sha256:948af2743fc78a328dcb3b0f5a31b3d75f415840fdb699e8b1235978392ecf85 
using existing layer sha256:0ba8f0e314b4264dfd19df045cde9d4c394a52474bf92ed6a3de22a4ca31a177 
creating new layer sha256:7213acd2a02636ca235f1e068dee7f7f3156af72cb79532b927f95351f6b26a8 
writing manifest 
success 
$ ollama run my_model hello
Hello! How are you today? Is there something I can help you with or would you like to chat?

What version of ollama (ollama -v)? What editor did you use to create the Modelfile?

<!-- gh-comment-id:3436659973 --> @rick-github commented on GitHub (Oct 23, 2025): Works for me: ```console $ cat > Modelfile parameter temperature 0.3 PARAMETER top_p 0.8 PARAMETER repeat_penalty 1.15 FROM llama3.1:latest $ ollama create my_model -f Modelfile gathering model components using existing layer sha256:667b0c1932bc6ffc593ed1d03f895bf2dc8dc6df21db3042284a6f4416b06a29 using existing layer sha256:948af2743fc78a328dcb3b0f5a31b3d75f415840fdb699e8b1235978392ecf85 using existing layer sha256:0ba8f0e314b4264dfd19df045cde9d4c394a52474bf92ed6a3de22a4ca31a177 creating new layer sha256:7213acd2a02636ca235f1e068dee7f7f3156af72cb79532b927f95351f6b26a8 writing manifest success $ ollama run my_model hello Hello! How are you today? Is there something I can help you with or would you like to chat? ``` What version of ollama (`ollama -v`)? What editor did you use to create the Modelfile?
Author
Owner

@fahadshery commented on GitHub (Oct 23, 2025):

What version of ollama (ollama -v)? What editor did you use to create the Modelfile?

ollama version is 0.6.8
Warning: client version is 0.3.6

I am using vim

<!-- gh-comment-id:3436664886 --> @fahadshery commented on GitHub (Oct 23, 2025): > What version of ollama (`ollama -v`)? What editor did you use to create the Modelfile? ``` ollama version is 0.6.8 Warning: client version is 0.3.6 ``` I am using `vim`
Author
Owner

@rick-github commented on GitHub (Oct 23, 2025):

The create API changed at 0.5.5 and the client is using the old version while the server is using the new version. Either use the same client as the server, or upgrade to a recent version.

<!-- gh-comment-id:3436686142 --> @rick-github commented on GitHub (Oct 23, 2025): The `create` API changed at [0.5.5](https://github.com/ollama/ollama/releases/tag/v0.5.5) and the client is using the old version while the server is using the new version. Either use the same client as the server, or [upgrade](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-upgrade-ollama) to a recent version.
Author
Owner

@fahadshery commented on GitHub (Oct 23, 2025):

The create API changed at 0.5.5 and the client is using the old version while the server is using the new version. Either use the same client as the server, or upgrade to a recent version.

This resolved the issue for me.

Thank you!

<!-- gh-comment-id:3437540027 --> @fahadshery commented on GitHub (Oct 23, 2025): > The `create` API changed at [0.5.5](https://github.com/ollama/ollama/releases/tag/v0.5.5) and the client is using the old version while the server is using the new version. Either use the same client as the server, or [upgrade](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-upgrade-ollama) to a recent version. This resolved the issue for me. Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#8459