System Info
transformers version: 4.57.1
- Platform: Linux-6.14.0-29-generic-x86_64-with-glibc2.39
- Python version: 3.11.10
- Huggingface_hub version: 0.34.4
- Safetensors version: 0.6.2
- Accelerate version: 1.10.1
- Accelerate config: not found
- DeepSpeed version: not installed
- PyTorch version (accelerator?): 2.8.0+cu128 (CUDA)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using distributed or parallel set-up in script?:
- Using GPU in script?:
- GPU type: NVIDIA GeForce RTX 4090
Who can help?
No response
Information
Tasks
Reproduction
import tempfile
from transformers import AutoConfig
cfg = AutoConfig.from_pretrained("Qwen/Qwen2-VL-2B-Instruct")
assert cfg.model_type == "qwen2_vl"
with tempfile.TemporaryDirectory() as tmp_dir:
cfg.save_pretrained(tmp_dir)
new_cfg = AutoConfig.from_pretrained(tmp_dir)
assert new_cfg.model_type == "qwen2_vl" # Expected "qwen2_vl", but got "qwen2_vl_text".
Expected behavior
when Qwen2VLConfig is saved and then loaded again.
Expected model_type is "qwen2_vl", but got "qwen2_vl_text".
Qwen2_5_VLConfig also has the same bug.
This bug is caused by PR#41158
System Info
transformersversion: 4.57.1Who can help?
No response
Information
Tasks
examplesfolder (such as GLUE/SQuAD, ...)Reproduction
Expected behavior
when Qwen2VLConfig is saved and then loaded again.
Expected model_type is "qwen2_vl", but got "qwen2_vl_text".
Qwen2_5_VLConfig also has the same bug.
This bug is caused by PR#41158