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

how to acquire the real whole batch sequenece training loss(reduction_mode=mean) ? #24

Open
littttttlebird opened this issue Apr 26, 2024 · 2 comments

Comments

@littttttlebird
Copy link

littttttlebird commented Apr 26, 2024

in the train.py, the loss return from main process is the loss of one sequence block, not the whole sequence loss.

@jzhang38
Copy link
Owner

jzhang38 commented May 9, 2024

gathered_loss = accelerator.reduce(loss.clone().detach(), "mean")

It is the whole sequence loss?

@littttttlebird
Copy link
Author

3Q very much

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

2 participants