transformers
Avoid device -> host syncs in load_balancing_loss_func
#50463
Merged

Avoid device -> host syncs in load_balancing_loss_func #50463

Rocketknight1 merged 2 commits into huggingface:main from main
ntenenz
ntenenz Use torch.histc instead of torch.bincount in load_balancing_loss_func…
008fb219
Rocketknight1
Rocketknight1 commented on 2026-11-09
ntenenz use float for cpu / mps and int for gpu for compatibility / determins…
7ea9ddce
github-actions
Rocketknight1
Rocketknight1 approved these changes on 2026-11-10
Rocketknight1 Rocketknight1 enabled auto-merge 25 days ago
HuggingFaceDocBuilderDev
Rocketknight1 Rocketknight1 merged fee0f2b9 into main 25 days ago

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
No one assigned
Labels
Milestone