Skip to content

fix CAPACITY_FACTOR for moe #125

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

NeosZhang
Copy link

the CAPACITY_FACTOR is set improperly.
image

@mvpatel2000
Copy link
Contributor

@tgale96 can you review? less familiar with the dropping MoEs

@eitanturok
Copy link
Contributor

Can you please send a minimal example of the code you wrote to reproduce this error?

@NeosZhang
Copy link
Author

NeosZhang commented Jul 25, 2024

Can you please send a minimal example of the code you wrote to reproduce this error?

I just run megablocks/exp/moe/moe_46m_8gpu.sh.
if CAPACITY_FACTOR is 16384, in megablocks/megablocks/backend/kernels.py
in func binned_gather, torch.zeros will allocate 1024G, you can print information to check it.
image

Comment on lines +19 to 20
CAPACITY_FACTOR=2
if [ -n "${4}" ]; then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a specific reason of why this is set to 2 rather than 1?

@comane
Copy link

comane commented Apr 2, 2025

Once rebased, can this be merged?
Would also close the PR below
#79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants