[GH-ISSUE #3010] "Error: invalid file magic" when creating Code Llama model #1849

Closed
opened 2026-04-12 11:54:51 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @AI-Guru on GitHub (Mar 8, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3010

Originally assigned to: @BruceMacD on GitHub.

Hello!

First and foremost, THANKS A LOT for Ollama! Your software is most useful!

I am trying to import a finetune of Code Llama 7B into Ollama. I get this error:

$ollama create musicllm -f Modelfile
transferring model data
creating model layer
Error: invalid file magic

Here is the model: https://huggingface.co/TristanBehrens/musicllm/tree/main

Here is the Modelfile:

FROM model.q5_k_m.gguf
TEMPLATE "[INST] {{ .Prompt }} [/INST]"

Any ideas, where I could looks?

All the best,
Tristan

Originally created by @AI-Guru on GitHub (Mar 8, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3010 Originally assigned to: @BruceMacD on GitHub. Hello! First and foremost, THANKS A LOT for Ollama! Your software is most useful! I am trying to import a finetune of Code Llama 7B into Ollama. I get this error: ``` $ollama create musicllm -f Modelfile transferring model data creating model layer Error: invalid file magic ``` Here is the model: https://huggingface.co/TristanBehrens/musicllm/tree/main Here is the Modelfile: ``` FROM model.q5_k_m.gguf TEMPLATE "[INST] {{ .Prompt }} [/INST]" ``` Any ideas, where I could looks? All the best, Tristan
Author
Owner

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

Hi @AI-Guru, is model.q5_k_m.gguf in the same directory as your Modelfile, and are you on the latest version of Ollama? I just tested this out and it ran for me. Also, make sure it is the actual file, not a git lfs file reference.

<!-- gh-comment-id:1986418416 --> @BruceMacD commented on GitHub (Mar 8, 2024): Hi @AI-Guru, is `model.q5_k_m.gguf` in the same directory as your Modelfile, and are you on the latest version of Ollama? I just tested this out and it ran for me. Also, make sure it is the actual file, not a git lfs file reference.
Author
Owner

@AI-Guru commented on GitHub (Mar 9, 2024):

@BruceMacD, thanks a lot! Of course it was a git lfs file reference :D

<!-- gh-comment-id:1986858920 --> @AI-Guru commented on GitHub (Mar 9, 2024): @BruceMacD, thanks a lot! Of course it was a git lfs file reference :D
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1849