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

Disable torch.nn.init when counting parmeters in initializing PipelineModule #5258

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tanconghui
Copy link

Disable any function call into torch.nn.init when counting the number of parameters in initializing PipelineModule.

This change can greatly save the launching time of pipeline parallelism, by speeding up the process of parameter partitioning. I have tested it with Llama2 70B, reducing the partitioning time from 8 minutes to less than 1 second.

@tanconghui tanconghui requested a review from duli2012 as a code owner March 12, 2024 06:07
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