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

feat(isp): support layer fused isp communication #395

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

mwiacx
Copy link
Contributor

@mwiacx mwiacx commented Dec 31, 2024

Motivation

support fused isp-wp communication layer by layer, we have drawn on the successful experience of FSDP in aggregating AG/RS, see ag/rs part in pytorch/pytorch#114299.

Usage

add layer_fuse_isp_comm=True into your config when you already enable isp communication overlap, for example:

parallel = dict(
    zero1=dict(size=-1),
    tensor=dict(size=1, mode="isp"),
    pipeline=dict(size=1, interleaved_overlap=True, mode="1f1b"),
    weight=dict(size=4, overlap=True, layer_fuse_isp_comm=True),
)

Result

a 7B internlm2 case.

cuda memory

1099dde0-f702-4a26-9cb5-956646b96795

communication overlap

ce42b93c-9040-4ac9-a8ff-faf0b806639d

loss

layer_fuse_isp_comm=False v.s. layer_fuse_isp_comm=True

10381994-4148-4ceb-a08b-2faff8c162b3

BC

no bc when layer_fuse_isp_comm=False

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.

2 participants