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

update global batch size in eval model compatible to ring-attn-size #590

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

ShomyLiu
Copy link
Contributor

No description provided.

@hijkzzz
Copy link
Collaborator

hijkzzz commented Dec 16, 2024

I have a question: Does train_batch_size affect DeepSpeed in eval mode?

@ShomyLiu
Copy link
Contributor Author

For example, the code in train_dpo.py:
https://github.com/OpenRLHF/OpenRLHF/blob/main/openrlhf/cli/train_dpo.py#L39-L46
the ds_config in ref_model initialization is obtained from the modified get_eval_ds_config function. This may affect model initialization in deepspeed, especially when using Zero-3 optimization
https://github.com/OpenRLHF/OpenRLHF/blob/main/openrlhf/models/actor.py#L57)

If not configured properly, it will raise this assertion error:

AssertionError: Gradient accumulation steps:0 has to be greater than 0

@hijkzzz hijkzzz merged commit 8317ca9 into OpenRLHF:main Dec 16, 2024
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.

2 participants