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

Convert gradient accumulation with Accelerate #179

Open
cridin1 opened this issue Jan 2, 2024 · 0 comments
Open

Convert gradient accumulation with Accelerate #179

cridin1 opened this issue Jan 2, 2024 · 0 comments

Comments

@cridin1
Copy link

cridin1 commented Jan 2, 2024

In the train function, inside run.py:

            if args.gradient_accumulation_steps > 1:
                loss = loss / args.gradient_accumulation_steps

For details see the link:
https://huggingface.co/docs/accelerate/v0.11.0/en/gradient_accumulation

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