transformers
fee0f2b9 - Avoid device -> host syncs in load_balancing_loss_func (#50463)

Commit
23 days ago
Avoid device -> host syncs in load_balancing_loss_func (#50463) * Use torch.histc instead of torch.bincount in load_balancing_loss_func to avoid unnecessary device -> host sync * use float for cpu / mps and int for gpu for compatibility / determinstism
Author
Parents
Loading