Skip to content

Conversation

@Cyrilvallez
Copy link
Member

What does this PR do?

As per the title. People started reporting the issue as they sometimes uses Transformers without Accelerate

@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2025

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the Ready for review button (at the bottom of the PR page). This will assign reviewers and trigger CI.

@github-actions github-actions bot marked this pull request as draft April 7, 2025 08:40
@Cyrilvallez Cyrilvallez marked this pull request as ready for review April 7, 2025 08:59
@Cyrilvallez Cyrilvallez added the for patch Tag issues / labels that should be included in the next patch label Apr 7, 2025
@github-actions github-actions bot requested review from MekkCyber and SunMarc April 7, 2025 08:59
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Can you just include at the top of the file that this was copied from accelerate and link to the accelerate file Thanks

Copy link
Contributor

@MekkCyber MekkCyber left a comment

Choose a reason for hiding this comment

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

Sounds good ! Thanks

Comment on lines 151 to 156
def values(self):
warnings.warn(
"The 'values' method of FindTiedParametersResult is deprecated and will be removed in Accelerate v1.3.0. ",
FutureWarning,
)
return sum([x[1:] for x in self], [])
Copy link
Contributor

Choose a reason for hiding this comment

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

Small nit not sure if we should replace this warning

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean, remove it entirely? We can as we do not expect people to use this function, it's simply internal

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes I think so

Copy link
Collaborator

Choose a reason for hiding this comment

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

this or warning once

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

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

LGTM !

@Cyrilvallez Cyrilvallez merged commit 08f3677 into main Apr 7, 2025
19 of 21 checks passed
@Cyrilvallez Cyrilvallez deleted the add-init-empty-weights branch April 7, 2025 09:37
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

vasqu pushed a commit to vasqu/transformers that referenced this pull request Apr 7, 2025
* add the integration

* Update accelerate.py

* Update accelerate.py

* add find_tied_params as well

* Update accelerate.py

* add where copied from

* simplify

* add error
ArthurZucker pushed a commit that referenced this pull request Apr 7, 2025
* add the integration

* Update accelerate.py

* Update accelerate.py

* add find_tied_params as well

* Update accelerate.py

* add where copied from

* simplify

* add error
cyr0930 pushed a commit to cyr0930/transformers that referenced this pull request Apr 18, 2025
* add the integration

* Update accelerate.py

* Update accelerate.py

* add find_tied_params as well

* Update accelerate.py

* add where copied from

* simplify

* add error
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request May 14, 2025
* add the integration

* Update accelerate.py

* Update accelerate.py

* add find_tied_params as well

* Update accelerate.py

* add where copied from

* simplify

* add error
ceteri added a commit to DerwenAI/strwythura that referenced this pull request Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

for patch Tag issues / labels that should be included in the next patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants