vllm - ✅(Solved) Fix [Transformers v5] Ernie4_5_VLMoeForConditionalGenerati [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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#38735Fetched 2026-04-08 02:23:04
View on GitHub
Comments
2
Participants
3
Timeline
13
Reactions
0
Author
Timeline (top)
cross-referenced ×4commented ×2labeled ×2referenced ×2

Error Message

$ pytest tests/models/test_initialization.py::test_can_initialize_large_subset[Ernie4_5_VLMoeForConditionalGeneration] ... KeyError: "Missing required keys in rope_parameters for 'rope_type'='default': {'rope_theta'}"

Fix Action

Fixed

PR fix notes

PR #38747: [Transformers v5] Fix Ernie4_5_VLMoeForConditionalGeneration rope_theta config

Description (problem / solution / changelog)

Summary

Fixes #38735 (part of #38379)

Transformers v5 added strict validation that requires rope_theta to be present in rope_parameters when rope_type is "default". The Ernie4.5-VL MoE model config was missing this field, which caused a KeyError during initialization in the test suite.

The fix adds verify_and_update_model_config to Ernie4_5_VLMoeForConditionalGenerationConfig, which calls set_default_rope_theta with 500000 before transformers gets to validate the config. The theta value matches what the model already uses internally in its own __init__.

Follows same pattern used in other models like Qwen3, Qwen2, Exaone4 etc.

Test Plan

pytest tests/models/test_initialization.py::test_can_initialize_large_subset[Ernie4_5_VLMoeForConditionalGeneration] -v

Changed files

  • vllm/model_executor/models/config.py (modified, +6/-0)

Code Example

$ pytest tests/models/test_initialization.py::test_can_initialize_large_subset[Ernie4_5_VLMoeForConditionalGeneration]
...
KeyError: "Missing required keys in `rope_parameters` for 'rope_type'='default': {'rope_theta'}"

---

# Or your fork
git clone https://github.com/huggingface/transformers.git
git clone https://github.com/vllm-project/vllm.git

cd vllm
VLLM_USE_PRECOMPILED=1 uv pip install -e .
uv pip install -e ../transformers
RAW_BUFFERClick to expand / collapse

This is a sub-issue forming part of the work in https://github.com/vllm-project/vllm/issues/38379, please read the description of this issue before beginning to work on this one.

Which test is failing?

$ pytest tests/models/test_initialization.py::test_can_initialize_large_subset[Ernie4_5_VLMoeForConditionalGeneration]
...
KeyError: "Missing required keys in `rope_parameters` for 'rope_type'='default': {'rope_theta'}"

How to configure my environment?

It's very important that you install both vLLM and Transformers from source so that your test results reflect the current state of both libraries.

# Or your fork
git clone https://github.com/huggingface/transformers.git
git clone https://github.com/vllm-project/vllm.git

cd vllm
VLLM_USE_PRECOMPILED=1 uv pip install -e .
uv pip install -e ../transformers

extent analysis

TL;DR

  • The KeyError exception suggests that the rope_parameters dictionary is missing the required key 'rope_theta' for the 'default' rope type, which needs to be added or configured properly.

Guidance

  • Verify that the rope_parameters dictionary is correctly defined and includes all required keys, such as 'rope_theta', for the specified 'rope_type'.
  • Check the documentation or implementation of Ernie4_5_VLMoeForConditionalGeneration to ensure that the rope_parameters are properly configured and passed to the model.
  • Review the test case test_can_initialize_large_subset to confirm that it correctly sets up the rope_parameters for the model being tested.
  • Ensure that the environment is correctly configured by installing vLLM and Transformers from source, as described in the issue.

Notes

  • The fix may involve updating the model configuration or the test case to include the missing required key.
  • Without more information about the model implementation or the test case, it's difficult to provide a more specific solution.

Recommendation

  • Apply workaround: Add the missing required key 'rope_theta' to the rope_parameters dictionary, or update the model configuration to include this key.

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