Skip to content
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

[BUG] SwitchGate in Switch MoE runtime error when computing the aux loss #27

Open
Mark-Sky opened this issue Nov 27, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@Mark-Sky
Copy link

Mark-Sky commented Nov 27, 2024

Describe the bug
I run the switch_moe.py in the example fold. When I set the use_aux_loss=True, runtime error occurs:
RuntimeError: The size of tensor a (128) must match the size of tensor b (32) at non-singleton dimension 0
image
It is because the code in the SwitchGate class:
image
The load shape is different from the importance shape.
Here are some details about my environment:
Python: 3.8.20
Pytorch: 2.2.0
swarms-torch: 0.2.2
CUDA: 12.2
Could you please assist in resolving this issue or provide guidance on how to fix it?

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@Mark-Sky Mark-Sky added the bug Something isn't working label Nov 27, 2024
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

No branches or pull requests

2 participants