ThinkFacility

Error messages

llama_model_load: error loading model

The message

llama_model_load: error loading model
llama.cpp 0.5.0 read September 25, 2026llama.cpplocal modelsGGUF

What it means

llama.cpp couldn't turn that GGUF file into a model. This line is a wrapper: the real reason is the text after the second colon, and it's usually about the file, not your hardware.

What to do

Read the reason on the same line. Missing or miscounted tensors and unknown architectures mean your build is older than the model or the file was made wrong, so update llama.cpp or get the GGUF from another uploader.

Every model-loading failure in llama.cpp funnels through one catch block, so this line turns up whatever went wrong. Here's a real one from #22048:

llama_model_load: error loading model: missing tensor 'blk.24.attn_k.weight'
llama_model_load_from_file_impl: failed to load model
common_init_from_params: failed to load model '/path/to/model.gguf'
srv    load_model: failed to load model, '/path/to/model.gguf'

We read the loader in release v0.5.0 (September 23, 2026). The lines below the first one only repeat that loading failed, one layer further out each time. The first line carries the reason, after error loading model:, and that's the only part worth searching for. As of September 25, 2026, 306 issues in the llama.cpp repo quote this line.

Missing tensor, or the wrong number of them

A tensor is one named block of weights, and blk.24.attn_k.weight is layer 24's attention key matrix. llama.cpp knows which tensors each architecture should have. missing tensor '...' means the file lacks one it expects, and done_getting_tensors: wrong number of tensors; expected N, got M means the count doesn't match.

Both usually mean the GGUF and your build disagree about the model. In #25657 early Hy3 GGUFs named one tensor differently from llama.cpp's own converter, and it was fixed on the uploader's side when they replaced the files. In #22048, the ggml-org and lmstudio-community GGUFs of the same model loaded fine and only a modified copy failed. And in #23033 a contributor answered a missing tensor with "Normal", because support for that part of the model was still an open pull request.

Unknown architecture or pre-tokenizer

unknown model architecture: '...' means the GGUF declares a model family your build has never heard of. error loading model vocabulary: unknown pre-tokenizer type: '...' is the same problem for the tokenizer (the step that splits text into tokens). A build from before the model came out can't load it. Update, or check whether support has been merged yet.

Failed to open, or not a GGUF at all

If the reason is llama_model_loader: failed to load model from and a path, look one line up. The GGUF reader logs why first: failed to open GGUF file with the operating system's reason in brackets (a wrong path gives "No such file or directory"), failed to read magic for a file too short to have a header, or invalid magic characters ending expected 'GGUF' when the file isn't a GGUF. Either of the last two can mean the download stopped early or saved something other than the model.

What to do

If a current build still fails on a well-known upload, that's worth an issue. Paste the whole first line, since it's the part the maintainers will ask for.

Other lines the same feature prints

Match yours against these if the one at the top of the page is not quite it. They come from the same code and mean related things.

  • llama_model_load_from_file_impl: failed to load model
  • common_init_from_params: failed to load model
  • srv load_model: failed to load model
  • error loading model: missing tensor
  • error loading model: done_getting_tensors: wrong number of tensors
  • llama_model_loader: failed to load model from