[GH-ISSUE #3003] Bug in main branch: Modelfile FROM instruction is broken #48356

Closed
opened 2026-04-28 07:54:36 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @hyjwei on GitHub (Mar 8, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3003

Originally assigned to: @BruceMacD on GitHub.

It seems that commit 2c017ca441 has broken FROM instruction in Modelfile. Now ollama always treats the string after FROM as file name, even though it could be a model name. When a model name is used, ollama will give an open file error.

How to duplicate the issue

Make a modelfile, like local.modelfie with FROM line followed by a model name:

FROM phi

Create a new model by this modelfile:

ollama create local -f local.modelfile

And ollama will report error:

Error: open <path to model directory>/phi: no such file or directory
Originally created by @hyjwei on GitHub (Mar 8, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3003 Originally assigned to: @BruceMacD on GitHub. It seems that commit 2c017ca44170fb56141bd15d6929390b7be3830a has broken `FROM` instruction in Modelfile. Now `ollama` always treats the string after `FROM` as file name, even though it could be a model name. When a model name is used, ollama will give an open file error. ## How to duplicate the issue Make a modelfile, like `local.modelfie` with FROM line followed by a model name: ``` FROM phi ``` Create a new model by this modelfile: ``` ollama create local -f local.modelfile ``` And ollama will report error: ``` Error: open <path to model directory>/phi: no such file or directory ```
Author
Owner

@BruceMacD commented on GitHub (Mar 8, 2024):

Thanks for reporting this, should be fixed now

<!-- gh-comment-id:1986115690 --> @BruceMacD commented on GitHub (Mar 8, 2024): Thanks for reporting this, should be fixed now
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#48356