llama.cpp error: tensor 'rope_freqs.weight' not found

#1
by eineComadreja - opened

Hey! Thanks for contributing with this model. I'm trying to do inference with it using the latest llama.cpp and I get this error:

tensor 'rope_freqs.weight' not found

It seems like an incompatibility between llama.cpp gguf-reader code and the vectrayx-vision-Q4_K_M.gguf model.

Here's the complete error and also the llama.cpp version, for reference:

$ llama-cli --version
version: 10271 (2f56fc343)
built with AppleClang 17.0.0.17000603 for Darwin arm64

$ llama-cli -m ~/Downloads/vectrayx-vision-Q4_K_M.gguf -p "what's your name?" -n 32

Loading model... \0.00.311.558 E llama_model_load: error loading model: check_tensor_dims: tensor 'rope_freqs.weight' not found
0.00.311.693 E llama_model_load_from_file_impl: failed to load model
0.00.311.731 E common_fit_params: encountered an error while trying to fit params to free device memory: failed to load model
-0.00.587.849 E llama_model_load: error loading model: check_tensor_dims: tensor 'rope_freqs.weight' not found
0.00.587.853 E llama_model_load_from_file_impl: failed to load model
0.00.587.855 E cmn  common_init_: failed to load model '~/Downloads/vectrayx-vision-Q4_K_M.gguf'
0.00.587.856 E srv    load_model: failed to load model, '~/Downloads/vectrayx-vision-Q4_K_M.gguf'
0.00.587.988 E srv  llama_server: exiting due to model loading error
llama_server exited with code 1
Error: the server exited before becoming ready

Does the model work for you? It gives the same error with ollama too.

Thanks for the report! The issue has been fixed.

Root cause: llama.cpp ≥b3800 requires a rope_freqs.weight tensor when rope_freq_base is non-default. This model uses rope_freq_base = 1,000,000 so the tensor is required. The original export did not include it.

Fix: The tensor was added to the GGUF using a binary patch: inv_freq[i] = 1 / rope_theta^(2i / rope_dim) for rope_theta=1e6, rope_dim=512, shape (256,). The vectrayx-vision-Q4_K_M.gguf has been updated in this repo.

Tested with llama.cpp b10289 (master) — loads and generates correctly. Please re-download the file.

Note: you may also need --jinja flag when using llama-cli / llama-completion since this model uses a complex Gemma-4 chat template that requires the Jinja renderer.

Thank you. The llama.cpp version is now working fine! The ollama version didn't for me, though. I got the same error in that case.

$ ollama rm jsantillana/vectrayx-vision:latest
deleted 'jsantillana/vectrayx-vision:latest'

$ ollama run jsantillana/vectrayx-vision:latest
pulling manifest 
pulling 81e5feaf77a5: 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████▏ 5.3 GB                         
pulling fbafc18dcf36: 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████████████▏ 990 MB                         
verifying sha256 digest 
writing manifest 
success 
Error: 500 Internal Server Error: llama-server process has terminated: exit status 1: error loading model: missing tensor 'rope_freqs.weight'
error loading model: missing tensor 'rope_freqs.weight'

Sign up or log in to comment