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

Add support to Fairscale Parallel Layers #20237

Open
loretoparisi opened this issue Aug 29, 2024 · 0 comments
Open

Add support to Fairscale Parallel Layers #20237

loretoparisi opened this issue Aug 29, 2024 · 0 comments
Labels
feature Is an improvement or enhancement needs triage Waiting to be triaged by maintainers

Comments

@loretoparisi
Copy link

loretoparisi commented Aug 29, 2024

Description & Motivation

Add support to Fairscale parallel layers:

from fairscale.nn.model_parallel.layers import (
    ColumnParallelLinear,
    RowParallelLinear,
    VocabParallelEmbedding,
)

that requires _MODEL_PARALLEL_GROUP to be initialized

    self.tok_embeddings = VocabParallelEmbedding(
  File "/home/coder/.local/lib/python3.8/site-packages/fairscale/nn/model_parallel/layers.py", line 118, in __init__
    self.num_embeddings, get_model_parallel_rank(), get_model_parallel_world_size()
  File "/home/coder/.local/lib/python3.8/site-packages/fairscale/nn/model_parallel/initialize.py", line 157, in get_model_parallel_rank
    return torch.distributed.get_rank(group=get_model_parallel_group())
  File "/home/coder/.local/lib/python3.8/site-packages/fairscale/nn/model_parallel/initialize.py", line 128, in get_model_parallel_group
    assert _MODEL_PARALLEL_GROUP is not None, "model parallel group is not initialized"
AssertionError: model parallel group is not initialized

See #20234 for details.

Pitch

To support Llama3.1 initialization that requires Fariscale in the original release with parallel layers.

Alternatives

Get rid of parallel layers or wrap into Lightning (if it is not available already)

Additional context

No response

cc @Borda

@loretoparisi loretoparisi added feature Is an improvement or enhancement needs triage Waiting to be triaged by maintainers labels Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement needs triage Waiting to be triaged by maintainers
Projects
None yet
Development

No branches or pull requests

1 participant