transformers
Only cast logits to float when computing loss
#34147
Merged

Only cast logits to float when computing loss #34147

ringohoffman
Only cast logits to float when computing loss
2eaa05e3
gante
gante approved these changes on 2024-10-17
gante gante requested a review from ArthurZucker ArthurZucker 2 years ago
Move logits.float() into existing if labels is not None branch
b9209618
ArthurZucker
ArthurZucker approved these changes on 2024-10-18
ArthurZucker ArthurZucker merged 816f4424 into main 2 years ago
ringohoffman ringohoffman deleted the only-cast-logits-float-compute-loss branch 1 year ago

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
No one assigned
Labels
Milestone