[GH-ISSUE #1037] run a multi-file model #505

Closed
opened 2026-04-12 10:12:08 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @eramax on GitHub (Nov 8, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1037

How to import a model which is multiple files like the image bellow
image

I tried but It gave me error

looking for model    
⠋ creating model layer  Error: invalid file magic```
Originally created by @eramax on GitHub (Nov 8, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1037 How to import a model which is multiple files like the image bellow ![image](https://github.com/jmorganca/ollama/assets/542413/56ed2ebc-a215-42f4-8699-b59d8d6866f4) I tried but It gave me error ```parsing modelfile looking for model ⠋ creating model layer Error: invalid file magic```
Author
Owner

@Nan-Do commented on GitHub (Nov 8, 2023):

You need a quantized version of the model not the full precision weights. Check if there is a quantized (GGUF) version of the model you are interested in.

Edit: You don't need the quantized version but it needs to be converted to the GGUF format so it can be loaded with llama.cpp, the quantized versions are just more popular.

<!-- gh-comment-id:1801277215 --> @Nan-Do commented on GitHub (Nov 8, 2023): You need a quantized version of the model not the full precision weights. Check if there is a quantized (GGUF) version of the model you are interested in. Edit: You don't need the quantized version but it needs to be converted to the GGUF format so it can be loaded with llama.cpp, the quantized versions are just more popular.
Author
Owner

@easp commented on GitHub (Nov 10, 2023):

Check docs before opening an issue? In this case,
https://github.com/jmorganca/ollama/blob/main/docs/import.md

<!-- gh-comment-id:1806408440 --> @easp commented on GitHub (Nov 10, 2023): Check docs before opening an issue? In this case, https://github.com/jmorganca/ollama/blob/main/docs/import.md
Author
Owner

@jmorganca commented on GitHub (Nov 13, 2023):

Hi @eramax thanks for creating an issue. Currently the Modelfile and ollama create don't yet support importing from pytorch, but the plan is to eventually support this (see https://github.com/jmorganca/ollama/issues/1112)

For now you can import PyTorch models by following https://github.com/jmorganca/ollama/blob/main/docs/import.md to convert and quantize them first.

<!-- gh-comment-id:1808706104 --> @jmorganca commented on GitHub (Nov 13, 2023): Hi @eramax thanks for creating an issue. Currently the `Modelfile` and `ollama create` don't yet support importing from pytorch, but the plan is to eventually support this (see https://github.com/jmorganca/ollama/issues/1112) For now you can import PyTorch models by following https://github.com/jmorganca/ollama/blob/main/docs/import.md to convert and quantize them first.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#505