vllm - ✅(Solved) Fix [Bug]: RuntimeError: failed to map GGUF parameters (18288) [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#38716Fetched 2026-04-08 02:23:17
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
cross-referenced ×1labeled ×1referenced ×1

Error Message

RuntimeError: failed to map GGUF parameters (18288)

PR fix notes

PR #38882: [Bugfix] Fix GGUF parameter mapping for Transformers v5 fused MoE experts

Description (problem / solution / changelog)

Summary

Transformers v5 changed MoE model parameter naming from per-expert format (model.layers.{i}.mlp.experts.{j}.(gate|up|down)_proj.weight) to fused format (model.layers.{i}.mlp.experts.(gate_up_proj|down_proj)). This causes RuntimeError: failed to map GGUF parameters (18288) when loading Qwen3-30B-A3B or similar MoE GGUF models.

The fix adds sideload regex patterns for the v5 fused expert format alongside the existing v4 per-expert patterns in gguf_loader.py, for both deepseek_v2/v3 and qwen2_moe/qwen3_moe model types. The original v4 patterns and manual GGUF→HF name mappings are unchanged for backward compatibility.

  • Not a duplicate: No open PR addresses this issue. Verified with gh pr list --search "38716".
  • AI assistance was used (Claude) for code analysis and test generation. All changes reviewed by human submitter.

Fixes #38716

<details> <summary>Before (error on main + Transformers v5)</summary>
vllm serve /mnt/models/Qwen3-30B-A3B-Instruct-2507-Q4_K_M.gguf --tokenizer /mnt/models/Qwen3-30B-A3B-Instruct-2507-Q4_K_M.gguf

RuntimeError: failed to map GGUF parameters (18288)

Root cause: Transformers v5 state_dict() returns fused expert parameter names like model.layers.0.mlp.experts.gate_up_proj which don't match the existing sideload regex model\.layers\.0\.mlp\.experts\.[0-9]+\.(gate|up|down)_proj\.weight, so they end up in unmapped_params and trigger the RuntimeError.

</details> <details> <summary>After (unit tests verifying both v4 and v5 formats)</summary>
$ python -m pytest tests/model_executor/model_loader/test_gguf_moe_mapping.py -v
tests/model_executor/model_loader/test_gguf_moe_mapping.py::TestQwenMoESideloadPatterns::test_v4_per_expert_format[gate_proj-0-0] PASSED
tests/model_executor/model_loader/test_gguf_moe_mapping.py::TestQwenMoESideloadPatterns::test_v4_per_expert_format[gate_proj-0-1] PASSED
...
tests/model_executor/model_loader/test_gguf_moe_mapping.py::TestQwenMoESideloadPatterns::test_v5_fused_format[gate_up_proj-0] PASSED
tests/model_executor/model_loader/test_gguf_moe_mapping.py::TestQwenMoESideloadPatterns::test_v5_fused_format[down_proj-0] PASSED
...
tests/model_executor/model_loader/test_gguf_moe_mapping.py::TestDeepseekMoESideloadPatterns::test_v5_fused_format[gate_up_proj-0] PASSED
tests/model_executor/model_loader/test_gguf_moe_mapping.py::TestDeepseekMoESideloadPatterns::test_v5_fused_format[down_proj-0] PASSED
...
tests/model_executor/model_loader/test_gguf_moe_mapping.py::TestManualMappingIntegrity::test_v5_fused_params_filtered_by_sideload PASSED

======================= 83 passed in 19.70s ========================
</details>

Test plan

  • 83 unit tests covering v4 per-expert and v5 fused regex matching for both Qwen MoE and DeepSeek MoE
  • Edge cases: out-of-range layer index, unrelated params, no partial match
  • End-to-end: v5 fused param names fully filtered by sideload regex
  • ruff check and ruff format pass
  • All pre-commit hooks pass
  • End-to-end GGUF loading test (requires GGUF model file — verified by issue reporter)

Changed files

  • tests/model_executor/model_loader/test_gguf_moe_mapping.py (added, +229/-0)
  • vllm/model_executor/model_loader/gguf_loader.py (modified, +20/-0)

Code Example

RuntimeError: failed to map GGUF parameters (18288)

---

vllm serve /mnt/models/Qwen3-30B-A3B-Instruct-2507-Q4_K_M.gguf --tokenizer /mnt/models
RAW_BUFFERClick to expand / collapse

Your current environment

Can't share.

🐛 Describe the bug

I am trying to serve this model: https://huggingface.co/unsloth/Qwen3-30B-A3B-Instruct-2507-GGUF/tree/main and specifically: Qwen3-30B-A3B-Instruct-2507-Q4_K_M.gguf.

When I run it with vllm serve /mnt/models/Qwen3-30B-A3B-Instruct-2507-Q4_K_M.gguf --tokenizer /mnt/models/Qwen3-30B-A3B-Instruct-2507-Q4_K_M.gguf I get this error:

RuntimeError: failed to map GGUF parameters (18288)

I also tried running it with the tokenizer.json and everything from https://huggingface.co/unsloth/Qwen3-30B-A3B-Instruct-2507 mounted in /mnt/models and then running

vllm serve /mnt/models/Qwen3-30B-A3B-Instruct-2507-Q4_K_M.gguf --tokenizer /mnt/models

But also gives the same RuntimeError surfacing from vllm

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

TL;DR

The most likely fix is to ensure that the vllm serve command is correctly configured to handle the GGUF model and its associated tokenizer.

Guidance

  • Verify that the GGUF model file Qwen3-30B-A3B-Instruct-2507-Q4_K_M.gguf is correctly formatted and compatible with the vllm serve command.
  • Check the documentation for vllm serve to ensure that the --tokenizer option is being used correctly, as the error message suggests an issue with mapping GGUF parameters.
  • Try running the command with the --help option to see if there are any additional configuration options or flags that need to be set for GGUF models.
  • Confirm that the model and tokenizer files are correctly mounted and accessible at the specified paths (/mnt/models).

Example

No code snippet is provided as the issue is related to command-line configuration and model compatibility.

Notes

The error message suggests a specific issue with mapping GGUF parameters, which may indicate a compatibility problem between the vllm serve command and the GGUF model. Further investigation into the model and command configuration is needed to resolve the issue.

Recommendation

Apply workaround: Try re-configuring the vllm serve command with additional options or flags to see if it resolves the issue, as the root cause is likely related to command-line configuration or model compatibility.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING