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

fix imbalance autotp issue #31

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

Yejing-Lai
Copy link

fix [mlp_module, lm_head, embed_out] tp_shard imbalance issue.

# When we have num_kv_heads defined, uneven division is possible, otherwise enforce near even division
if rank == None:
rank = dist.get_rank()
if num_kv_heads != None and total_size % num_kv_heads == 0:
if num_kv_heads != None and total_size % num_kv_heads == 0 and "mlp" not in str(name) and str(
Copy link
Owner

Choose a reason for hiding this comment

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

what is the evaluation of this line if name == None?

Copy link
Owner

@delock delock left a comment

Choose a reason for hiding this comment

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

LGTM

@delock delock merged commit 09a348c into delock:gma/run-opt-branch Nov 16, 2023
7 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants