-
Notifications
You must be signed in to change notification settings - Fork 998
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Give example on how to handle gradient accumulation with cross-entropy (
#3193) * Add cross-entropy example in the gradient accumulation docs * add example of logs * correct skeleton code * replace gather_for_metrics with gather * batch_size -> per_device_batch_size * remove main_process_only=True * add autoregressive example in examples/ * Update docs/source/usage_guides/gradient_accumulation.md Co-authored-by: Marc Sun <[email protected]> * ruff format * add grad accum test * update docs * Update examples/by_feature/gradient_accumulation_for_autoregressive_models.py Co-authored-by: Zach Mueller <[email protected]> * update tests --------- Co-authored-by: Marc Sun <[email protected]> Co-authored-by: Zach Mueller <[email protected]>
- Loading branch information
1 parent
200c9eb
commit acfbf72
Showing
4 changed files
with
643 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.