-
Notifications
You must be signed in to change notification settings - Fork 617
Support Qwen3-VL #4093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Support Qwen3-VL #4093
Conversation
This reverts commit c979730.
|
Improved the config check part, tested with internvl / intern-s1 / qwen3vl / qwen3 / qwen2.5vl / glm4.1v, seems good. |
|
May share the evalution test results |
| language_hf_config = config.hf_config | ||
|
|
||
| # for multi-modal models, get the language model config to determine dtype | ||
| if hasattr(config.hf_config, 'text_config'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have llm_config field in config.
| visual_embeds: torch.Tensor): | ||
| visual_pos_masks = visual_pos_masks.to(hidden_states.device) | ||
| visual_embeds = visual_embeds.to(hidden_states.device, hidden_states.dtype) | ||
| local_this = hidden_states[visual_pos_masks, :].clone() + visual_embeds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hidden_states[visual_pos_masks, :] would synchronize cuda device. Try:
local = torch.zeros_like(hidden_states)
local.masked_scatter_(visual_pos_masks, visual_embeds)
hidden_states += local|
LLM evaluation test failed by following #4094 |
Related
TODO