Skip to content

Commit

Permalink
Enable users to use their own loss functions + deal with prefetching …
Browse files Browse the repository at this point in the history
…for grad accum (#34198)

* bookmark

* Bookmark

* Bookmark

* Actually implement

* Pass in kwarg explicitly

* Adjust for if we do or don't have labels

* Bookmark fix for od

* bookmark

* Fin

* closer

* Negate accelerate grad accum div

* Fixup not training long enough

* Add in compute_loss to take full model output

* Document

* compute_loss -> compute_loss_fn

* Add a test

* Refactor

* Refactor

* Uncomment tests

* Update tests/trainer/test_trainer.py

Co-authored-by: Daniel Han <[email protected]>

---------

Co-authored-by: Daniel Han <[email protected]>
  • Loading branch information
muellerzr and danielhanchen authored Oct 17, 2024
1 parent 7a06d07 commit 6ba31a8
Show file tree
Hide file tree
Showing 2 changed files with 325 additions and 124 deletions.
Loading

0 comments on commit 6ba31a8

Please sign in to comment.