-
Notifications
You must be signed in to change notification settings - Fork 631
[Model] Qwen2.5VL support --use-cudagraph and unit testing #4087
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
Conversation
Thanks for your contribution! |
input_embeddings = self.model.get_input_embeddings(ids_remove_padding=ids_remove_padding) | ||
|
||
if image_features is not None: | ||
# 将 image_embeds 替换 input_embeds 里的 image video 占位符 |
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.
非必要的注释删掉,并且统一使用英文注释
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.
done
video_mask = ids_remove_padding == self.model.video_token_id | ||
video_token_num = video_mask.sum() | ||
|
||
# 由于框架只有 image_features,所以目前不支持图片和视频混合 |
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.
后面提交PR时,注释都转成英文
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.
get
1.迁移
image_mask
和video_mask
等操作到非@support_graph_optimization
装饰的Qwen2_5_VLForConditionalGeneration
,以支持--use-cudagraph 参数2.增加qwen25vl单元测试
3.docs:
self.tokenizer.apply_chat_template
needadd_generation_prompt