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

Flax sharded #17760

Merged
merged 18 commits into from
Jun 22, 2022
Merged

Flax sharded #17760

merged 18 commits into from
Jun 22, 2022

Conversation

ArthurZucker
Copy link
Collaborator

What does this PR do?

Adds support for FLAX sharding checkpoints

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 17, 2022

The documentation is not available anymore as the PR was closed or merged.

@ArthurZucker
Copy link
Collaborator Author

The sharding tests are run for every model which should be avoided

@ArthurZucker ArthurZucker marked this pull request as ready for review June 20, 2022 09:56
@ArthurZucker
Copy link
Collaborator Author

Will merge flax before tf as the TF one still needs a few modification (mostly cleaning the documentation)

@ArthurZucker ArthurZucker requested a review from gante June 20, 2022 09:58
@ArthurZucker ArthurZucker self-assigned this Jun 20, 2022
@ArthurZucker ArthurZucker added the Core: Modeling Internals of the library; Models. label Jun 20, 2022
@ArthurZucker ArthurZucker requested review from patrickvonplaten and removed request for gante June 20, 2022 10:04
Copy link
Contributor

@sanchit-gandhi sanchit-gandhi left a comment

Choose a reason for hiding this comment

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

Very nice, thanks for adding this feature! Just a few small suggestions from me, but on the whole looks great!

src/transformers/modeling_flax_utils.py Outdated Show resolved Hide resolved
src/transformers/modeling_flax_utils.py Outdated Show resolved Hide resolved
src/transformers/modeling_flax_utils.py Outdated Show resolved Hide resolved
src/transformers/modeling_flax_utils.py Outdated Show resolved Hide resolved
Copy link
Contributor

@patil-suraj patil-suraj left a comment

Choose a reason for hiding this comment

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

Great job @ArthurZucker , looks good to me! Just left some nits.

src/transformers/modeling_flax_utils.py Outdated Show resolved Hide resolved
src/transformers/modeling_flax_utils.py Outdated Show resolved Hide resolved
src/transformers/modeling_flax_utils.py Outdated Show resolved Hide resolved
src/transformers/modeling_flax_utils.py Outdated Show resolved Hide resolved
src/transformers/modeling_flax_utils.py Outdated Show resolved Hide resolved
tests/test_modeling_flax_common.py Show resolved Hide resolved
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Thanks a lot for working on this!

src/transformers/modeling_flax_utils.py Outdated Show resolved Hide resolved
src/transformers/modeling_flax_utils.py Outdated Show resolved Hide resolved
src/transformers/modeling_flax_utils.py Outdated Show resolved Hide resolved
src/transformers/modeling_flax_utils.py Outdated Show resolved Hide resolved
ArthurZucker and others added 6 commits June 21, 2022 15:54
Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
Co-authored-by: Suraj Patil <surajp815@gmail.com>
@ArthurZucker ArthurZucker merged commit 16c6eb7 into huggingface:main Jun 22, 2022
younesbelkada pushed a commit to younesbelkada/transformers that referenced this pull request Jun 25, 2022
younesbelkada pushed a commit to younesbelkada/transformers that referenced this pull request Jun 29, 2022
@sanchit-gandhi sanchit-gandhi mentioned this pull request Jun 30, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core: Modeling Internals of the library; Models.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants