[GH-ISSUE #7870] FROM command error #5035

Closed
opened 2026-04-12 16:07:28 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @szzhh on GitHub (Nov 28, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7870

What is the issue?

When I use Windows CMD to create a Modelfile from the huggingface model, I run the command 'FROM path-to-safetensors-directory', but it reports an error that the FROM keyword is not supported. Using git bash doesn't work either.

OS

Windows

GPU

Nvidia

CPU

Intel

Ollama version

0.4.6

Originally created by @szzhh on GitHub (Nov 28, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7870 ### What is the issue? When I use Windows CMD to create a Modelfile from the huggingface model, I run the command 'FROM path-to-safetensors-directory', but it reports an error that the FROM keyword is not supported. Using git bash doesn't work either. ### OS Windows ### GPU Nvidia ### CPU Intel ### Ollama version 0.4.6
GiteaMirror added the bug label 2026-04-12 16:07:28 -05:00
Author
Owner

@rick-github commented on GitHub (Nov 28, 2024):

What's the content of your Modelfile? What's the actual error message?

<!-- gh-comment-id:2505809467 --> @rick-github commented on GitHub (Nov 28, 2024): What's the content of your Modelfile? What's the actual error message?
Author
Owner

@szzhh commented on GitHub (Nov 28, 2024):

What's the content of your Modelfile? What's the actual error message?

The model file is llama3-8B that I downloaded from huggingface. The error message is as follows
PixPin_2024-11-28_18-47-21

<!-- gh-comment-id:2505815274 --> @szzhh commented on GitHub (Nov 28, 2024): > What's the content of your Modelfile? What's the actual error message? The model file is llama3-8B that I downloaded from huggingface. The error message is as follows ![PixPin_2024-11-28_18-47-21](https://github.com/user-attachments/assets/c34b0806-db0e-4826-af9a-2ea745f40edb)
Author
Owner

@rick-github commented on GitHub (Nov 28, 2024):

That's not how you create a Modelfile. The Modelfile contains the FROM command.

C:\Users\szh> copy con Modelfile
FROM C:/Users/szh/Downloads/Llama-3-8B
^Z
C:\Users\szh> ollama create llama-3-8b -f Modelfile

or

C:\Users\szh> echo FROM C:/Users/szh/Downloads/Llama-3-8B > Modelfile
C:\Users\szh> ollama create llama-3-8b -f Modelfile

or

C:\Users\szh> cd Downloads/Llama-3-8B
C:\Users\szh\Downloads/Llama-3-8B> echo FROM . > Modelfile
C:\Users\szh\Downloads/Llama-3-8B> ollama create llama-3-8b -f Modelfile
<!-- gh-comment-id:2505897117 --> @rick-github commented on GitHub (Nov 28, 2024): That's not how you create a Modelfile. The Modelfile contains the `FROM` command. ``` C:\Users\szh> copy con Modelfile FROM C:/Users/szh/Downloads/Llama-3-8B ^Z C:\Users\szh> ollama create llama-3-8b -f Modelfile ``` or ``` C:\Users\szh> echo FROM C:/Users/szh/Downloads/Llama-3-8B > Modelfile C:\Users\szh> ollama create llama-3-8b -f Modelfile ``` or ``` C:\Users\szh> cd Downloads/Llama-3-8B C:\Users\szh\Downloads/Llama-3-8B> echo FROM . > Modelfile C:\Users\szh\Downloads/Llama-3-8B> ollama create llama-3-8b -f Modelfile ```
Author
Owner

@szzhh commented on GitHub (Nov 28, 2024):

That's not how you create a Modelfile. The Modelfile contains the FROM command.

C:\Users\szh> copy con Modelfile
FROM C:/Users/szh/Downloads/Llama-3-8B
^Z
C:\Users\szh> ollama create llama-3-8b -f Modelfile

or

C:\Users\szh> echo FROM C:/Users/szh/Downloads/Llama-3-8B > Modelfile
C:\Users\szh> ollama create llama-3-8b -f Modelfile

or

C:\Users\szh> cd Downloads/Llama-3-8B
C:\Users\szh\Downloads/Llama-3-8B> echo FROM . > Modelfile
C:\Users\szh\Downloads/Llama-3-8B> ollama create llama-3-8b -f Modelfile

OK. Thanks.

<!-- gh-comment-id:2505927576 --> @szzhh commented on GitHub (Nov 28, 2024): > That's not how you create a Modelfile. The Modelfile contains the `FROM` command. > > ``` > C:\Users\szh> copy con Modelfile > FROM C:/Users/szh/Downloads/Llama-3-8B > ^Z > C:\Users\szh> ollama create llama-3-8b -f Modelfile > ``` > > or > > ``` > C:\Users\szh> echo FROM C:/Users/szh/Downloads/Llama-3-8B > Modelfile > C:\Users\szh> ollama create llama-3-8b -f Modelfile > ``` > > or > > ``` > C:\Users\szh> cd Downloads/Llama-3-8B > C:\Users\szh\Downloads/Llama-3-8B> echo FROM . > Modelfile > C:\Users\szh\Downloads/Llama-3-8B> ollama create llama-3-8b -f Modelfile > ``` OK. Thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#5035