Skip to content

[Bug Fix] Add partial rotary factor support for Phi-4 and upgrade to transformers v4.50.0#3984

Merged
zhyncs merged 54 commits intosgl-project:mainfrom
adarshxs:phi_4_bug_fix
Mar 22, 2025
Merged

[Bug Fix] Add partial rotary factor support for Phi-4 and upgrade to transformers v4.50.0#3984
zhyncs merged 54 commits intosgl-project:mainfrom
adarshxs:phi_4_bug_fix

Conversation

@adarshxs
Copy link
Copy Markdown
Collaborator

@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
Copy Markdown
Collaborator Author

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

Cc @yizhang2077 @mickqian

@zhaochenyang20
Copy link
Copy Markdown
Collaborator

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

@adarshxs
Copy link
Copy Markdown
Collaborator Author

adarshxs commented Mar 20, 2025

@zhaochenyang20 @yizhang2077 any update on this?

Copy link
Copy Markdown
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~

Comment thread test/srt/test_mla.py
Comment thread test/srt/test_srt_endpoint.py
Comment thread test/srt/test_verl_engine.py Outdated
Comment thread test/srt/test_eval_fp8_accuracy.py
Comment thread python/sglang/srt/hf_transformers_utils.py
Comment thread scripts/ci_install_dependency.sh Outdated
Comment thread python/sglang/srt/models/llama.py
@yizhang2077
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

@zhyncs
Copy link
Copy Markdown
Collaborator

zhyncs commented Mar 22, 2025

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

Comment thread test/srt/test_verl_engine.py Outdated
@zhyncs zhyncs merged commit f8f9244 into sgl-project:main Mar 22, 2025
@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
Comment thread python/sglang/srt/hf_transformers_utils.py
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