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

[BUG] The logic for calculating the last stage when average loss across microbatches. #1379

Open
LitLeo opened this issue Feb 6, 2025 · 0 comments

Comments

@LitLeo
Copy link

LitLeo commented Feb 6, 2025

Describe the bug

After a step is completed, operation ”Average loss across microbatches“ will be performed in the last stage.
For the common case, although setting ignore_virtual=True or False does not affect the logic for calculating the last stage, ignore_virtual=False should be considered more accurate.

if mpu.is_pipeline_last_stage(ignore_virtual=True):

if mpu.is_pipeline_last_stage(ignore_virtual=True):
        # Average loss across microbatches.

Expected behavior

if mpu.is_pipeline_last_stage(ignore_virtual=False):
        # Average loss across microbatches.
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

No branches or pull requests

1 participant