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 multi-gpu inference option #125

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Add multi-gpu inference option #125

wants to merge 2 commits into from

Conversation

natolambert
Copy link
Collaborator

Currently run_rm.py only uses one RM because RMs are not well supported generally for inference.
Current implementation is a separate run_rm_mpgu.py script. We can delete this and improve the base script if more use cases emerge.

Closes #95

@natolambert natolambert marked this pull request as draft May 11, 2024 04:23
@natolambert
Copy link
Collaborator Author

Inference works distributed, but I couldn't get the results gather working correctly with things like

    state.wait_for_everyone()
    
    # flatten results list of lists if is list of lists
    if state.is_main_process:
        logger.info("Gathering results")
        results = gather_object(results) # gather() is for tensors

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.

multi gpu inference with run_rm.py
1 participant