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

add use_all_gather for option #3164

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SangbumChoi
Copy link

What does this PR do?

Fixes #3147
@muellerzr

I think testing might need but not sure where to add this corresponding test

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

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.

@SangbumChoi
Copy link
Author

Also have additional question for LLM inference evaluation process. Does LLM evaluation process requires to have all_gather function to make all the prediction in all processes?

@muellerzr
Copy link
Collaborator

Thanks! Tests should be in src/accelerate/test_utils/scripts/test_ops.py

The all_gather is so that we can get the results across all processes. It's there as an example and for simplicity for the user. (But it is not generally required, no)

@SangbumChoi
Copy link
Author

@muellerzr Hi I haved added test. However, to be more strict test I think we can add additional checking when the process is not in the state.is_main_process and check the return is empty list. Let me know how do you think about this.

@SangbumChoi
Copy link
Author

@muellerzr Gentle Ping!

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.

Duplicated process and memory leakage for evaluation process in all_gather
2 participants