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

[DO NOT MERGE] Ranran hide a2a #1029

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

[DO NOT MERGE] Ranran hide a2a #1029

wants to merge 18 commits into from

Conversation

RissyRan
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@wang2yn84 wang2yn84 left a comment

Choose a reason for hiding this comment

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

What does X, E and M stands for here?

@RissyRan
Copy link
Collaborator Author

What does X, E and M stands for here?

Could you point me to the specific line? X/E should be expert, and M should be model dimension.

@wang2yn84
Copy link
Collaborator

What does X, E and M stands for here?

Could you point me to the specific line? X/E should be expert, and M should be model dimension.

Sure, I'm looking at jnp.einsum("BXM,XEM -> BXE") from hide_ff2_a2a.py

@RissyRan
Copy link
Collaborator Author

What does X, E and M stands for here?

Could you point me to the specific line? X/E should be expert, and M should be model dimension.

Sure, I'm looking at jnp.einsum("BXM,XEM -> BXE") from hide_ff2_a2a.py

I think this is one example for @gobbleturk's test? X seems sequence here, M is model dimension, E is MLP dimension

@gobbleturk
Copy link
Collaborator

gobbleturk commented Nov 13, 2024

What does X, E and M stands for here?

Could you point me to the specific line? X/E should be expert, and M should be model dimension.

Sure, I'm looking at jnp.einsum("BXM,XEM -> BXE") from hide_ff2_a2a.py

I think this is one example for @gobbleturk's test? X seems sequence here, M is model dimension, E is MLP dimension

This script is testing the second a2a at the end of the feed forward layer where we move from activations sharded on the expert dimension to activations sharded on the batch dimension
This is a toy script so I combine sequence and batch into one dimension "B" representing token batch

  • X is for experts
  • E is for embed (the smaller dimension, often called "hidden dim" or "model dim")
  • M is for MLP (the larger dimension, often called "intermediate dim" , or "FF dim")

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.

3 participants