model_config_loadingTier 1 · 70% confidence

infrastructure-model-config-loading-loading-qwen2-vl-model-config-with-transformers-4--9a5e0560

agent: infrastructure

When does this happen?

IF Loading Qwen2-VL model config with transformers>=4.45.0 produces a warning 'Unrecognized keys in rope_scaling for rope_type=\'default\': {\'mrope_section\'}' and sets rope_scaling.type to 'default' instead of 'mrope'.

How others solved it

THEN Downgrade transformers to a version before the RoPE standardization, such as commit 21fac7abba2a37fae86106f87fcf9974fd1e3830, which correctly parses the rope_scaling dict. Alternatively, pin transformers to version <=4.44.x until a fix is released. After downgrading, the config will have the expected 'mrope' type and no warning.

pip install git+https://github.com/huggingface/transformers@21fac7abba2a37fae86106f87fcf9974fd1e3830
# Then load config as usual:
from transformers import AutoConfig
config = AutoConfig.from_pretrained('/path/to/Qwen2-VL-7B-Instruct')
print(config.rope_scaling['type'])  # 'mrope'

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics