Skip to content

Unrecognized configuration class <class 'transformers.models.qwen2_5_vl.configuration_qwen2_5_vl.Qwen2_5_VLConfig'> #3

@niktheod

Description

@niktheod

When I try to run the code that you provide under Using Pre-trained Models I get the following error:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[4], [line 8](vscode-notebook-cell:?execution_count=4&line=8)
      6 model_name = "ac4462/Qwen2.5-VL-3B-DriveLM"  # Use the "reason" model
      7 processor = AutoProcessor.from_pretrained(model_name)
----> [8](vscode-notebook-cell:?execution_count=4&line=8) model = AutoModelForCausalLM.from_pretrained(
      9     model_name, 
     10     torch_dtype=torch.float16, 
     11     device_map="auto"
     12 )
     14 # Load camera views
     15 camera_views = []

File ~/miniconda3/envs/internvl2.5-mpo-copy/lib/python3.12/site-packages/transformers/models/auto/auto_factory.py:607, in _BaseAutoModelClass.from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
    603         config = config.get_text_config()
    604     return model_class.from_pretrained(
    605         pretrained_model_name_or_path, *model_args, config=config, **hub_kwargs, **kwargs
    606     )
--> [607](https://file+.vscode-resource.vscode-cdn.net/home/nikostheodoridis/PhD/probing_research/~/miniconda3/envs/internvl2.5-mpo-copy/lib/python3.12/site-packages/transformers/models/auto/auto_factory.py:607) raise ValueError(
    608     f"Unrecognized configuration class {config.__class__} for this kind of AutoModel: {cls.__name__}.\n"
    609     f"Model type should be one of {', '.join(c.__name__ for c in cls._model_mapping)}."
    610 )

ValueError: Unrecognized configuration class <class 'transformers.models.qwen2_5_vl.configuration_qwen2_5_vl.Qwen2_5_VLConfig'> for this kind of AutoModel: AutoModelForCausalLM.
Model type should be one of ApertusConfig, ArceeConfig, AriaTextConfig, BambaConfig, BartConfig, BertConfig,...

Any idea why this is?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions