gguf_tensor_to_f16 failed when loading Qwen3.5-9B GGUF model
Describe the bug
I am trying to serve the unsloth/Qwen3.5-9B-GGUF model on a baremetal Windows host using OVMS v2026.0. The server fails to start and throws a gguf_tensor_to_f16 failed error during the LLM node initialization. I suspect the GGUF parser does not yet support the tensor structure of Qwen3.5.
Since there were similar issues with other new architectures like Qwen3-VL, I would like to ask if there is a plan or timeline to support the Qwen3.5 GGUF model structure.
To Reproduce Steps to reproduce the behavior:
- Download
Qwen3.5-9B-Q4_K_M.gguffrom Hugging Face (unsloth/Qwen3.5-9B-GGUF). - Place the file in the local directory:
C:\ovms\models\unsloth\Qwen3.5-9B-GGUF\ - Run the following OVMS launch command on a Windows baremetal host:
.\ovms.exe --source_model "unsloth/Qwen3.5-9B-GGUF" --model_repository_path \models --model_name unsloth/Qwen3.5-9B-GGUF --task text_generation --gguf_filename Qwen3.5-9B-Q4_K_M.gguf --target_device GPU --port 8000 --rest_port 9000
- See error during startup.
Expected behavior The model should load successfully, and the OVMS server should start listening on the specified gRPC and REST ports without crashing.
Logs
[2026-03-08 14:18:36.179][22220][serving][error][servable_initializer.cpp:214] Error during llm node initialization for models_path: C:\ovms\\models\unsloth\Qwen3.5-9B-GGUF\./Qwen3.5-9B-Q4_K_M.gguf exception: Check 'data != nullptr' failed at src\cpp\src\gguf_utils\gguf.cpp:96:
[load_gguf] gguf_tensor_to_f16 failed
[2026-03-08 14:18:36.179][22220][modelmanager][error][servable_initializer.cpp:425] Error during LLM node resources initialization: The LLM Node resource initialization failed
[2026-03-08 14:18:36.179][22220][serving][error][mediapipegraphdefinition.cpp:474] Failed to process LLM node graph unsloth/Qwen3.5-9B-GGUF
[2026-03-08 14:18:36.180][22220][modelmanager][error][modelmanager.cpp:184] Couldn't start model manager
Configuration
- OVMS version:
v2026.0(OpenVINO Model Server 2026.0.0.4d3933c5, OpenVINO backend 2026.0.0) - OVMS config.json file: N/A (Using command-line parameters)
- CPU, accelerator's versions: Target device is GPU, Arc B390 with Core X7 Ultra 358H. Baremetal Windows host.
- Model repository directory structure:
C:\ovms\models\unsloth\Qwen3.5-9B-GGUF\
└── Qwen3.5-9B-Q4_K_M.gguf
- Model:
unsloth/Qwen3.5-9B-GGUFfrom Hugging Face.
Additional context I am running this directly on Windows (baremetal), not in a Docker container. I noticed in other issues that support for newer model structures is sometimes added in later patches. Let me know if there are any workarounds for GGUF loading in the meantime.
Hello,
Qwen3.5 is planned to be supported in 2026.2 release but not in GGUF format. @Wovchena is there plan to include GGUF format support as well?
No
thanks for the info. It's OK without GGUF support.
I spent some time looking into this. The more supported, the better openvino is.
Root cause: This isn't an architecture gap — qwen3 is accepted by the GGUF reader. The failure is a missing quantization type. The GGUF parse/dequant happens in OpenVINO GenAI (src/cpp/src/gguf_utils/), not in model_server. The reader natively dequantizes only Q4_0 / Q4_1 / Q8_0 / Q4_K / Q6_K; any other type falls back to gguflib's gguf_tensor_to_f16(), which returns null and aborts with:
[load_gguf] gguf_tensor_to_f16 failed
Any *_K_M / *_K_S model on a 256-aligned architecture mixes in Q5_K tensors, which hit exactly this path. I confirmed the exact file from this issue — unsloth/Qwen3.5-9B-GGUF → Qwen3.5-9B-Q4_K_M.gguf — contains 48 Q5_K tensors. (Tip: the quant mix varies by quanter/model size — small models even fall back to legacy Q5_0/Q5_1 for dims not divisible by 256.)
Fix: I've implemented native Q5_K dequantization in GenAI:
- extract_q5_k_data() — Q5_K reuses Q4_K's 6-bit packed scale/min layout; weights are 5-bit (low nibble from qs + high bit from qh).
- Routed Q5_K to gguf_load_quantized() and through the existing u8 dequant subgraph (the same path Q8_0/Q6_K already use), so no new graph machinery.
Validation: Built GenAI from source (OpenVINO 2026.3) and tested on CPU and Intel Arc GPU, across two architectures:
| Model | Arch | Quant mix | CPU | GPU |
|---|---|---|---|---|
| Llama-3.2-1B Q5_K_M | llama | 96 Q5_K + 17 Q6_K | ✅ | ✅ |
| Qwen2.5-1.5B Q5_K_M | qwen2 | 168 Q5_K + 29 Q6_K | ✅ | ✅ |
| Llama-3.2-1B Q4_K_M (regression) | llama | 96 Q4_K + 17 Q6_K | ✅ | ✅ |
| Llama-3.2-1B Q5_K_M vs HuggingFace | — | numeric parity | ✅ token-identical | — |
(GPU needed one extra fix: Q5_K is emitted at group size 16 to match Q6_K, otherwise the GPU plugin's FullyConnectedHorizontalFusion can't fuse q/k/v when they mix Q5_K and Q6_K. Details in the PR.)
PR: openvinotoolkit/openvino.genai#4049 (currently a draft) — scoped to just adding the Q5_K dequantizer.
Note specific to Qwen3.5-9B: this Q5_K fix is necessary but not sufficient for that exact model. Qwen3.5-9B-Q4_K_M reports architecture qwen35, which gguf_modeling.cpp doesn't yet map (it accepts llama/qwen2/qwen3). Tensor loading runs before the architecture check, so Q5_K fails first; once the Q5_K fix lands, that model would next need qwen35 architecture support — a separate change.
@Wovchena @atobiszei @huhanwj — framing this narrowly as "add one missing K-quant type" rather than broad GGUF format work; let me know if that scope is acceptable.