[GH-ISSUE #6048] I can't run llama3.1 #3786

Closed
opened 2026-04-12 14:37:04 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @Saber120 on GitHub (Jul 29, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6048

What is the issue?

I trained my own model from llama version 3.1 8b and created the modlefile for it successfully, but when I start running it it does not work and I get this error
ollama run mymodle:latest Error: llama runner process has terminated: error loading model: done_getting_tensors: wrong number of tensors; expected 292, got 291

Knowing that the llama 3 8b model was working and is still working well

OS

Linux

GPU

Nvidia

CPU

Other

Ollama version

0.3.0

Originally created by @Saber120 on GitHub (Jul 29, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6048 ### What is the issue? I trained my own model from llama version 3.1 8b and created the modlefile for it successfully, but when I start running it it does not work and I get this error ` ollama run mymodle:latest Error: llama runner process has terminated: error loading model: done_getting_tensors: wrong number of tensors; expected 292, got 291 ` Knowing that the llama 3 8b model was working and is still working well ### OS Linux ### GPU Nvidia ### CPU Other ### Ollama version 0.3.0
GiteaMirror added the bug label 2026-04-12 14:37:04 -05:00
Author
Owner

@maciekpoplawski commented on GitHub (Jul 29, 2024):

Git the exact same problem :(
Error: llama runner process has terminated: error loading model: done_getting_tensors: wrong number of tensors; expected 292, got 291

<!-- gh-comment-id:2256071465 --> @maciekpoplawski commented on GitHub (Jul 29, 2024): Git the exact same problem :( `Error: llama runner process has terminated: error loading model: done_getting_tensors: wrong number of tensors; expected 292, got 291`
Author
Owner

@Lexazan commented on GitHub (Jul 29, 2024):

Got same error after trying to run just converted hf to gguf model (https://huggingface.co/Undi95/Meta-Llama-3.1-8B-Claude).
Seems to be related to https://github.com/ggerganov/llama.cpp/issues/8650

<!-- gh-comment-id:2256099060 --> @Lexazan commented on GitHub (Jul 29, 2024): Got same error after trying to run just converted hf to gguf model (https://huggingface.co/Undi95/Meta-Llama-3.1-8B-Claude). Seems to be related to https://github.com/ggerganov/llama.cpp/issues/8650
Author
Owner

@rick-github commented on GitHub (Jul 29, 2024):

ollama lags the leading edge of llama.cpp, and it looks like the recent versions of llama.cpp create GGUF files that the older versions can't process. If you use an older version of llama.cpp to convert hf to GGUF it might work.

<!-- gh-comment-id:2256359963 --> @rick-github commented on GitHub (Jul 29, 2024): ollama lags the leading edge of llama.cpp, and it looks like the recent versions of llama.cpp create GGUF files that the older versions can't process. If you use an older version of llama.cpp to convert hf to GGUF it might work.
Author
Owner

@Saber120 commented on GitHub (Jul 29, 2024):

ollama lags the leading edge of llama.cpp, and it looks like the recent versions of llama.cpp create GGUF files that the older versions can't process. If you use an older version of llama.cpp to convert hf to GGUF it might work.

Does this mean that the main problem comes from llamacpp? Indeed, I tried a model that I had trained on a long time ago and it really worked. Currently, the model that I am trying to operate is one that I use with unsloth and convert it to gguf using unsloth and unsloth downloads the latest version of llamacpp.

<!-- gh-comment-id:2256423904 --> @Saber120 commented on GitHub (Jul 29, 2024): > ollama lags the leading edge of llama.cpp, and it looks like the recent versions of llama.cpp create GGUF files that the older versions can't process. If you use an older version of llama.cpp to convert hf to GGUF it might work. Does this mean that the main problem comes from llamacpp? Indeed, I tried a model that I had trained on a long time ago and it really worked. Currently, the model that I am trying to operate is one that I use with unsloth and convert it to gguf using unsloth and unsloth downloads the latest version of llamacpp.
Author
Owner

@rick-github commented on GitHub (Jul 29, 2024):

Does this mean that the main problem comes from llamacpp?

This is my understanding. Apparently, a change has been made that is not forwards and backwards compatible. This sort of breaking change is not ideal, if it remains in place then when ollama syncs past that point in the llama.cpp tree, all models based on llama3 will stop working. I can't imagine that is acceptable to anybody, so I expect a fix will be developed. Until then, if you want to use a llama3 based model with ollama <= 0.3.0, model conversion will need to be done with an older version of llama.cpp.

<!-- gh-comment-id:2256436041 --> @rick-github commented on GitHub (Jul 29, 2024): > Does this mean that the main problem comes from llamacpp? This is my understanding. Apparently, a change has been made that is not forwards and backwards compatible. This sort of breaking change is not ideal, if it remains in place then when ollama syncs past that point in the llama.cpp tree, all models based on llama3 will stop working. I can't imagine that is acceptable to anybody, so I expect a fix will be developed. Until then, if you want to use a llama3 based model with ollama <= 0.3.0, model conversion will need to be done with an older version of llama.cpp.
Author
Owner

@jmorganca commented on GitHub (Jul 30, 2024):

Hi all, this will be fixed in version 0.3.1 which is in prerelease but will be released soon

<!-- gh-comment-id:2258749861 --> @jmorganca commented on GitHub (Jul 30, 2024): Hi all, this will be fixed in [version 0.3.1](https://github.com/ollama/ollama/releases/tag/v0.3.1) which is in prerelease but will be released soon
Author
Owner

@Lexazan commented on GitHub (Jul 31, 2024):

Can confirm that issue is gone on 0.3.1

<!-- gh-comment-id:2259947890 --> @Lexazan commented on GitHub (Jul 31, 2024): Can confirm that issue is gone on [0.3.1](https://github.com/ollama/ollama/releases/tag/v0.3.1)
Author
Owner

@maciekpoplawski commented on GitHub (Jul 31, 2024):

image
or just 0.3.1 :D

<!-- gh-comment-id:2259951177 --> @maciekpoplawski commented on GitHub (Jul 31, 2024): ![image](https://github.com/user-attachments/assets/f6e66087-1e1b-4947-8143-edf4981de9b1) or just 0.3.1 :D
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3786