failed to load model

#6
by giorgi1805 - opened

error while loading model (IQ4_XS quant)
0.00.099.718 I srv llama_server: initializing ...
0.00.099.727 I cmn common_param: common_params_print_info: verbosity = 3 (adjust with the -lv N CLI arg)
0.00.100.025 W srv server_setup: security: no API key is set and CORS allows all origins (see https://github.com/ggml-org/llama.cpp/pull/25655)
0.00.102.104 I srv load_model: loading model 'x.gguf'
0.00.401.106 E llama_model_load: error loading model: check_tensor_dims: tensor 'blk.24.attn_q.weight' not found
0.00.401.111 E llama_model_load_from_file_impl: failed to load model
0.00.401.137 E common_fit_params: encountered an error while trying to fit params to free device memory: failed to load model
0.00.580.916 W load: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrect
0.00.642.014 E llama_model_load: error loading model: check_tensor_dims: tensor 'blk.24.attn_q.weight' not found
0.00.642.025 E llama_model_load_from_file_impl: failed to load model
0.00.642.032 E cmn common_init_: failed to load model 'x.gguf'
0.00.642.035 E srv load_model: failed to load model, 'x.gguf'
0.00.642.039 I srv operator(): operator(): cleaning up before exit...
0.00.643.719 E srv server_run_i: exiting due to model loading error

ive never had this happen to me before.

β€’
This comment has been hidden (marked as Off-Topic)

Same issue on my end:

  • version: 1.0.0-dev (build 12590, commit 34ff2e047)
  • Model: Inkling-2-Mini-UD-Q4_K_XL.gguf

ERROR 1

llama-cli --jinja -ngl 99 --flash-attn on --parallel 1 \
  --ctx-size 38799 --reasoning-budget 9900 --reasoning-preserve \
  --temp 0.1 --top-p 0.95 --top-k 64 --cache-type-k q8_0 --cache-type-v q8_0 \
  -m ./models/inkling-2-mini.gguf
Loading model... -0.04.492.204 E llama_model_load: error loading model: check_tensor_dims: tensor 'blk.24.attn_q.weight' not found
0.04.492.343 E llama_model_load_from_file_impl: failed to load model
0.04.492.437 E common_fit_params: encountered an error while trying to fit params to free device memory: failed to load model
\0.04.617.269 E llama_model_load: error loading model: check_tensor_dims: tensor 'blk.24.attn_q.weight' not found
0.04.617.272 E llama_model_load_from_file_impl: failed to load model
0.04.617.273 E cmn  common_init_: failed to load model `./models/inkling-2-mini.gguf'
0.04.617.275 E srv    load_model: failed to load model, './models/inkling-2-mini.gguf'
0.04.617.451 E srv  server_run_i: exiting due to model loading error
llama_server exited with code 1
Error: the server exited before becoming ready

ERROR 2

lama-cli --jinja -ngl 99 --flash-attn on --parallel 1 \
  --ctx-size 3799 --reasoning-budget 9900 --reasoning-preserve \
  --temp 0.1 --top-p 0.95 --top-k 64 --cache-type-k q8_0 --cache-type-v q8_0 \
  -m ./models/inkling-2-mini.gguf
Loading model... -0.00.175.812 E llama_model_load: error loading model: check_tensor_dims: tensor 'blk.24.attn_q.weight' not found
0.00.175.946 E llama_model_load_from_file_impl: failed to load model
0.00.176.005 E common_fit_params: encountered an error while trying to fit params to free device memory: failed to load model
\0.00.315.119 E llama_model_load: error loading model: check_tensor_dims: tensor 'blk.24.attn_q.weight' not found
0.00.315.122 E llama_model_load_from_file_impl: failed to load model
0.00.315.124 E cmn  common_init_: failed to load model './models/inkling-2-mini.gguf'
0.00.315.126 E srv    load_model: failed to load model, './models/inkling-2-mini.gguf'
0.00.315.306 E srv  server_run_i: exiting due to model loading error
llama_server exited with code 1
Error: the server exited before becoming ready

Same failure on Inkling-2-Mini-UD-Q8_K_XL.gguf (sha256 dfb04bf3…527e9a41, 22,867,451,616 bytes), verified against the HF ETag.
Reproduced with three builds: your prebuilt b12540-mix-c4017f9 (linux-arm64-cuda13), branch base/inkling2-attn-chunk-378, and ggml-org PR #32694.
./llama-server -m Inkling-2-Mini-UD-Q8_K_XL.gguf β†’ error loading model: check_tensor_dims: tensor 'blk.24.attn_q.weight' not found.
Parsing the file: general.architecture = inkling2, inkling2.block_count = 48, 734 tensors, but only blk.0–blk.23 exist. Metadata says 48 logical layers; the file packs 24 physical blocks.
ggml-org's Inkling-2-Mini-Q8_0.gguf (inkling2_loop, block_count = 24) loads fine in the same binary β€” so the fix is on the conversion side (write block_count = 24 + num_loops), or teach the inkling2 loader to expand the loop.
Separately: PR #32695's loader builds 714 tensors where the file has 734.

llama.cpp b12568-mix-8eebad4 can load the model.

The PR isn't merged in llama.cpp: https://github.com/ggml-org/llama.cpp/pull/32695

You will need to use the specific PR or Unsloth Desktop

Or you can use our precompiled binary: https://github.com/unslothai/llama.cpp/releases/tag/b12568-mix-8eebad4

We did an update:

To run in llama.cpp main, please use our separate uploads: https://huggingface.co/unsloth/Inkling-2-Mini-GGUF/tree/main/Mainline_Support

Or use our prebuilts at https://github.com/unslothai/llama.cpp - read https://unsloth.ai/docs/models/inkling-2-mini#run-inkling-2-mini-in-llama-cpp for how to run them

How is your Q8_K_XL (22.9 GB) so much smaller than the Q8_0 (27.8 GB) of other groups?

Will you release your own Q8_0?

not work on MacBook

Mainline llama.cpp will get gibberish until PR 32704 gets merged - for now use Unsloth Desktop or https://github.com/unslothai/llama.cpp/releases/tag/b12588-mix-c0c3de8

To get correct prebuilts on running unsloth quants, follow https://unsloth.ai/docs/models/inkling-2-mini#run-inkling-2-mini-in-llama-cpp or use Unsloth Desktop directly.

Apple:

curl -L -o llama.tar.gz https://github.com/unslothai/llama.cpp/releases/download/b12588-mix-c0c3de8/llama-b12588-mix-c0c3de8-bin-macos-arm64.tar.gz
mkdir -p llama.cpp
tar -xzf llama.tar.gz -C llama.cpp --strip-components=1
./llama.cpp/llama-server --version

NVIDIA GPUs:

curl -L -o llama.tar.gz https://github.com/unslothai/llama.cpp/releases/download/b12588-mix-c0c3de8/app-b12588-mix-c0c3de8-linux-x64-cuda12-portable.tar.gz
mkdir -p llama.cpp
tar -xzf llama.tar.gz -C llama.cpp
./llama.cpp/llama-server --version

AMD, Windows, DGX Spark and other instructions are on our guide https://unsloth.ai/docs/models/inkling-2-mini

@BoBurk Hey so our conversion is 100% lossless https://huggingface.co/thinkingmachines/Inkling-2-Mini itself is 20.2 GB only, so our quants align directly with that - other people's Q8_0 are wrong as tensors might be dequantized to Q8_0 from NVFP4 for example (that's incorrect)

Mainline llama.cpp will get gibberish until PR 32704 gets merged - for now use Unsloth Desktop or https://github.com/unslothai/llama.cpp/releases/tag/b12588-mix-c0c3de8

To get correct prebuilts on running unsloth quants, follow https://unsloth.ai/docs/models/inkling-2-mini#run-inkling-2-mini-in-llama-cpp or use Unsloth Desktop directly.

Apple:

curl -L -o llama.tar.gz https://github.com/unslothai/llama.cpp/releases/download/b12588-mix-c0c3de8/llama-b12588-mix-c0c3de8-bin-macos-arm64.tar.gz
mkdir -p llama.cpp
tar -xzf llama.tar.gz -C llama.cpp --strip-components=1
./llama.cpp/llama-server --version

NVIDIA GPUs:

curl -L -o llama.tar.gz https://github.com/unslothai/llama.cpp/releases/download/b12588-mix-c0c3de8/app-b12588-mix-c0c3de8-linux-x64-cuda12-portable.tar.gz
mkdir -p llama.cpp
tar -xzf llama.tar.gz -C llama.cpp
./llama.cpp/llama-server --version

AMD, Windows, DGX Spark and other instructions are on our guide https://unsloth.ai/docs/models/inkling-2-mini

it's working, thanks!

@BoBurk Hey so our conversion is 100% lossless https://huggingface.co/thinkingmachines/Inkling-2-Mini itself is 20.2 GB only, so our quants align directly with that - other people's Q8_0 are wrong as tensors might be dequantized to Q8_0 from NVFP4 for example (that's incorrect)

Thank you.

First thanks for all the great work to the team @danielhanchen . For those compiling from source where in unslothai github is the right tag/branch because the tag "b12588-mix-c0c3de8" doesn't have the code in it, nor did master seem to have it, e.g. there's no inkling2 model declaration in models.h.

Update: Ended up simply trying the binary as is for now, it seems for whatever reasons that the binary labelled b12588-mix-c0c3de8 does not correspond to the source code in the tag b12588-mix-c0c3de8. The conclusion was to stay with Qwen 3.8 27B. There seems to be unoptimized path in llama.cpp, since the performance doesn't appear on paper to be where it should be, and it doesn't have the features of Qwen 3.8 like linear attention, so it consumes more VRAM per token as the count goes up, which in our use case negate the marginal benchmark advantage on paper even if they fully translated to the real world.

this does not work on llama cpp, new or older version. did you make this proprietary to your software?

oh it was proprietary. you should flat out say that.

In the interest of trying to helpful and move things along, I broke the NVFP4 conversion code out of #32695 and gave it its own PR #32786.

How is your Q8_K_XL (22.9 GB) so much smaller than the Q8_0 (27.8 GB) of other groups?

I'm pretty sure unsloth's UD-Q8_K_XL is actually BF16 for Inkling-2-Mini, instead of Q8. When I converted to Q8 with NVFP4 preserved, I got 17GB instead of 26GB with BF16. You can see those here: https://huggingface.co/createthis/Inkling-2-Mini-GGUF/tree/main

Unsloth org

oh it was proprietary. you should flat out say that.

It does work for llama.cpp and others, the instructions are pinned and in the readme. You have to use: https://huggingface.co/unsloth/Inkling-2-Mini-GGUF/tree/main/Mainline_Support
and the latest version of llama.cpp

β€’
This comment has been hidden (marked as Resolved)

Have latest version of llama.cpp (2.80.1) via LM Studio and it can't load UD-Q2_K_XL.

error loading model: check_tensor_dims: tensor 'blk.24.attn_q.weight' not found

Have latest version of llama.cpp (2.80.1) via LM Studio and it can't load UD-Q2_K_XL.

error loading model: check_tensor_dims: tensor 'blk.24.attn_q.weight' not found

you need to use this fork of llama cpp https://github.com/unslothai/llama.cpp/releases or unsloth studio to work.
if you want to run in lm studio or llama cpp main you need to download this model https://huggingface.co/unsloth/Inkling-2-Mini-GGUF/tree/main/Mainline_Support

The installation is quite tricky https://huggingface.co/unsloth/Inkling-2-Mini-GGUF/blob/main/Mainline_Support/README.md

For me, the hf command didn't dowload the gguf_file, I had to issue 2 commands :

hf download unsloth/Inkling-2-Mini-GGUF \
    --include "mmproj-F16.gguf" \
    --local-dir Inkling-2-Mini-GGUF
hf download unsloth/Inkling-2-Mini-GGUF \
    --include "Mainline_Support/Inkling-2-Mini-UD-Q4_K_XL.gguf_file" \
    --local-dir Inkling-2-Mini-GGUF

Then llama.cpp (version b12631 for me) could load the file.

Sign up or log in to comment