Skip to content

fix router input jitter dtype #1726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chaitanyadwivedi96
Copy link

self.input_jitter creates a tensor of dtype torch.FloatTensor. pytorch auto-casts input to the same dtype as jitter tensor. This breaks the downstream router forward pass if router weights are in a different dtype e.g, torch.BFloat16Tensor.

@sbhavani sbhavani added the bug Something isn't working label Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants