Skip to content

Fix ValueError for unsupported LLM architectures in InternVLChatConfig#1255

Open
Mr-Neutr0n wants to merge 1 commit intoOpenGVLab:mainfrom
Mr-Neutr0n:fix-unsupported-architecture
Open

Fix ValueError for unsupported LLM architectures in InternVLChatConfig#1255
Mr-Neutr0n wants to merge 1 commit intoOpenGVLab:mainfrom
Mr-Neutr0n:fix-unsupported-architecture

Conversation

@Mr-Neutr0n
Copy link

Summary

  • Use AutoConfig.for_model as a fallback when the LLM architecture is not explicitly listed in InternVLChatConfig, instead of raising a ValueError
  • This allows InternVL to work with newer LLM backends like Qwen3ForCausalLM without requiring code changes for each new architecture
  • Fix the default llm_config when None is passed: previously set {'architectures': ['']} which produced a misleading ValueError: Unsupported architecture: with an empty string

Fixes #1203

Test plan

  • Verify loading InternVL models with Qwen3ForCausalLM backend works without error
  • Verify existing supported architectures (Llama, InternLM2, Phi3, Qwen2) still use their specific config classes
  • Verify llm_config=None falls back to LlamaConfig without raising

Use AutoConfig.for_model as a fallback for architectures not explicitly
listed (e.g. Qwen3ForCausalLM), instead of raising a ValueError. Also
fix the empty-string architecture default when llm_config is None,
which caused a misleading error on transformers >= 4.44.
@Mr-Neutr0n
Copy link
Author

Friendly bump! Let me know if there's anything I should update or improve to help move this forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] ValueError: Unsupported architecture: in configuration_internvl_chat.py (internvl 3.5 sft)

1 participant