Skip to content

Commit 6ba31a8

Browse files
Enable users to use their own loss functions + deal with prefetching 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 <danielhanchen@gmail.com> --------- Co-authored-by: Daniel Han <danielhanchen@gmail.com>
1 parent 7a06d07 commit 6ba31a8

File tree

2 files changed

+325
-124
lines changed

2 files changed

+325
-124
lines changed

0 commit comments

Comments
 (0)