[GH-ISSUE #475] Bug: Importing a local model fails on MacOS #25980

Closed
opened 2026-04-22 01:51:25 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @tianxiemaochiyu on GitHub (Sep 6, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/475

Importing a local model fails on MacOS:

Parsing modelfile
Looking for model
⠋ Creating model layer Error: Invalid file magic

Here is the content of my Modelfile:

FROM ./ggml-Llama2-Chinese-13b-Chat-q4_k_m.ggmlv3.Q4_K_M.bin

TEMPLATE """
{{- if .First }}
<<SYS>>
{{ .System }}
<</SYS>>
{{- end }}
"""

The model file is located in the same directory as the Modelfile.

Any suggestions are welcome.

Originally created by @tianxiemaochiyu on GitHub (Sep 6, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/475 Importing a local model fails on MacOS: ``` Parsing modelfile Looking for model ⠋ Creating model layer Error: Invalid file magic ``` Here is the content of my Modelfile: ``` FROM ./ggml-Llama2-Chinese-13b-Chat-q4_k_m.ggmlv3.Q4_K_M.bin TEMPLATE """ {{- if .First }} <<SYS>> {{ .System }} <</SYS>> {{- end }} """ ``` The model file is located in the same directory as the Modelfile. Any suggestions are welcome.
GiteaMirror added the bug label 2026-04-22 01:51:25 -05:00
Author
Owner

@mxyng commented on GitHub (Sep 6, 2023):

@tianxiemaochiyu where did the model bin come from? The error suggests it's not a known file type.

<!-- gh-comment-id:1709118126 --> @mxyng commented on GitHub (Sep 6, 2023): @tianxiemaochiyu where did the model bin come from? The error suggests it's not a known file type.
Author
Owner

@mchiang0610 commented on GitHub (Sep 6, 2023):

@tianxiemaochiyu Wanted to suggest that we have the chinese llama 2 model as well.

For the 4 bit quantized model that you're using, you can simply run:
ollama pull llama2-chinese:13b-chat-q4_K_M
or run it with:
ollama run llama2-chinese:13b-chat-q4_K_M

<!-- gh-comment-id:1709139424 --> @mchiang0610 commented on GitHub (Sep 6, 2023): @tianxiemaochiyu Wanted to suggest that we have the chinese llama 2 model as well. For the 4 bit quantized model that you're using, you can simply run: `ollama pull llama2-chinese:13b-chat-q4_K_M` or run it with: `ollama run llama2-chinese:13b-chat-q4_K_M`
Author
Owner

@EasonZhaoZ commented on GitHub (Sep 10, 2023):

ollama pull llama2-chinese:13b-chat-q4_K_M

404 Client Error: Not Found for url: https://ollama.ai/api/models

<!-- gh-comment-id:1712767973 --> @EasonZhaoZ commented on GitHub (Sep 10, 2023): > ollama pull llama2-chinese:13b-chat-q4_K_M 404 Client Error: Not Found for url: https://ollama.ai/api/models
Author
Owner

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

That error indicates that at least at the time of this issue, you were using the older python-based ollama. You will need to uninstall that and then grab the current ollama from ollama.ai and install that. I think that should solve the issue and will go ahead and close it now. If you think there is anything we left out, reopen and we can address. Thanks for being part of this great community.

<!-- gh-comment-id:1839321689 --> @technovangelist commented on GitHub (Dec 4, 2023): That error indicates that at least at the time of this issue, you were using the older python-based ollama. You will need to uninstall that and then grab the current ollama from ollama.ai and install that. I think that should solve the issue and will go ahead and close it now. If you think there is anything we left out, reopen and we can address. Thanks for being part of this great community.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#25980