Skip to content

Fix loss_batch=0 indentation to run for all local ranks#5

Open
vominh1919 wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
vominh1919:main
Open

Fix loss_batch=0 indentation to run for all local ranks#5
vominh1919 wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
vominh1919:main

Conversation

@vominh1919

Copy link
Copy Markdown

Fixes #4

loss_batch = 0 was inside the if local_rank == 0: block (indent level 16), so only rank 0 was resetting it after the accumulated inner step. This moves it outside the if block (indent level 12) so all local ranks reset loss_batch after each accumulated inner step.

Fixes #4

Move loss_batch=0 outside the if local_rank==0 block so that all local
ranks reset it after the accumulated inner step, not just rank 0.

Fixes PrimeIntellect-ai#4
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.

Resetting Batch Loss

1 participant