Skip to content
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

Export for Phi4-mini #36780

Merged
merged 4 commits into from
Mar 25, 2025
Merged

Export for Phi4-mini #36780

merged 4 commits into from
Mar 25, 2025

Conversation

guangy10
Copy link
Contributor

@guangy10 guangy10 commented Mar 18, 2025

What does this PR do?

As titled. Add support for Phi3-mini and Phi4-mini as they are sharing the same modeling code. It's requiring additional configure (rope_type = "default") to make it exportable, otherwise we will have to rewrite the modeling code, specifically, specialize or get rid of the control flow in _longrope_frequency_update.

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@ArthurZucker @amyeroberts @qubvel

@github-actions github-actions bot marked this pull request as draft March 18, 2025 00:30
Copy link

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. When it is ready for review, please click the Ready for review button (at the bottom of the PR page).

@guangy10 guangy10 marked this pull request as ready for review March 18, 2025 01:17
@github-actions github-actions bot requested a review from ydshieh March 18, 2025 01:18
Copy link
Member

@qubvel qubvel left a comment

Choose a reason for hiding this comment

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

Thanks @guangy10, looks good to me!

@qubvel qubvel added torch export Issues and PRs related to torch.export compatibility Text labels Mar 18, 2025
@qubvel
Copy link
Member

qubvel commented Mar 18, 2025

run-slow: phi3

Copy link

This comment contains run-slow, running the specified jobs: This comment contains run-slow, running the specified jobs:

models: ['models/phi3']
quantizations: [] ...

@guangy10
Copy link
Contributor Author

run-slow: phi3

@guangy10
Copy link
Contributor Author

cc: @tugsbayasgalan

@ydshieh
Copy link
Collaborator

ydshieh commented Mar 18, 2025

run-slow: phi3

FYI: this trigger by comment is only reserved for some transformers internal members.

@ydshieh
Copy link
Collaborator

ydshieh commented Mar 18, 2025

run-slow: phi3

Copy link

This comment contains run-slow, running the specified jobs: This comment contains run-slow, running the specified jobs:

models: ['models/phi3']
quantizations: [] ...

Copy link
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

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

Hi @guangy10 Thank you for this PR.

To pass the CI (on our runner), we will have to update the expected value 🙏 .

@ydshieh ydshieh merged commit 69bcb86 into huggingface:main Mar 25, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Text torch export Issues and PRs related to torch.export compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants