Skip to content

Conversation

adarshxs
Copy link
Contributor

@adarshxs adarshxs commented Mar 1, 2025

Motivation

Fixes: #3935

Modifications

Add partial rotary embedding support and upgrade to transformers==4.50.0
Also fix Qwen2.5VL which breaks when upgraded to transformers==4.50.0 from transformers==4.48.3
Also minor fixes to reference_hf.py script

Checklist

@adarshxs adarshxs changed the title [Bug Fix] Add partial rotary factor support for Phi-4 and support qwen2.5vl with transformers==4.49.0 [Bug Fix] Add partial rotary factor support for Phi-4 and support qwen2.5vl with transformers v4.49.0 Mar 1, 2025
@adarshxs adarshxs changed the title [Bug Fix] Add partial rotary factor support for Phi-4 and support qwen2.5vl with transformers v4.49.0 [Bug Fix] Add partial rotary factor support for Phi-4 and upgrade to transformers v4.49.0 Mar 2, 2025
@adarshxs adarshxs requested a review from HaiShaw as a code owner March 2, 2025 06:15
@adarshxs adarshxs marked this pull request as draft March 4, 2025 10:35
@adarshxs
Copy link
Contributor Author

@zhaochenyang20 ready to be reviewed. Some inconsistencies in the CI with accuracy but should be good

Cc @yizhang2077 @mickqian

@zhaochenyang20
Copy link
Collaborator

@adarshxs thanks. yi and me can help to rerun the CI. @yizhang2077 could you help to review this?

@adarshxs
Copy link
Contributor Author

adarshxs commented Mar 20, 2025

@zhaochenyang20 @yizhang2077 any update on this?

Copy link
Collaborator

@yizhang2077 yizhang2077 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adarshxs Sorry I am late. Thanks for your work, I leave some comments here~

@yizhang2077
Copy link
Collaborator

yizhang2077 commented Mar 21, 2025

@adarshxs LGTM,it is better if you can run mmmu benchmark and paste result here #4456. One of CI failed tests may be related to gemma.

@zhaochenyang20 zhaochenyang20 changed the title [Bug Fix] Add partial rotary factor support for Phi-4 and upgrade to transformers v4.49.0 [Bug Fix] Add partial rotary factor support for Phi-4 and upgrade to transformers v4.50.0 Mar 21, 2025
@zhaochenyang20
Copy link
Collaborator

@adarshxs great work!!! do not rebase with main, let me rerun for you

@zhyncs
Copy link
Member

zhyncs commented Mar 22, 2025

@adarshxs @zhaochenyang20 @yizhang2077 @mickqian You are great!!

@zhyncs zhyncs merged commit f8f9244 into sgl-project:main Mar 22, 2025
1 of 18 checks passed
@adarshxs adarshxs deleted the phi_4_bug_fix branch March 23, 2025 05:46
@yizhang2077 yizhang2077 mentioned this pull request Mar 25, 2025
67 tasks
# fix: for Qwen2-VL model, inject default 'size' if not provided.
if config.model_type in {"qwen2_vl"}:
if "size" not in kwargs:
kwargs["size"] = {"shortest_edge": 3136, "longest_edge": 1003520}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to ask about the intention of injecting the default ‘size’ here for the Qwen2-VL model. I noticed that after Transformers version 4.54.0, this injection no longer works. I’m not sure whether I need to adjust it in order to make it work again.

Copy link
Contributor Author

@adarshxs adarshxs Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as far as i remember, prior to transformers v4.50.0, Qwen2-VL model's preprocessor_config.json only contained min_pixels/max_pixels and no explicit shortest_edge or longest_edge. as a result, loading those models under 4.50.0 would immediately throw ValueError: size must contain 'shortest_edge' and 'longest_edge' keys.

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] loading phi4-mini-instruct with sglang
6 participants