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

segment parallel parameter sync and grad sync #57061

Merged
merged 15 commits into from
Sep 14, 2023

Conversation

liuzhenhai93
Copy link
Contributor

@liuzhenhai93 liuzhenhai93 commented Sep 7, 2023

PR types

New features

PR changes

Others

Description

  • card-75190 sep 参数同步与梯度同步
  • segment parallel parameter sync and grad sync

paddle nlp llama 7b sep VS mp
f0e1b6b25418ab1c3f1a5e19a2a88b0d

@paddle-bot
Copy link

paddle-bot bot commented Sep 7, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

and self._sharding_degree > 1
):
# sharding may coexist with dp
Copy link
Collaborator

Choose a reason for hiding this comment

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

如果sharding_degree > 1 and dp_degree > 1时,这个逻辑跟之前不太一样?

Copy link
Contributor Author

@liuzhenhai93 liuzhenhai93 Sep 11, 2023

Choose a reason for hiding this comment

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

嗯, 这个之前写的不优雅;
sharding > 1 and dp > 1 改成在 shardding_parallel里处理

fleet_env.sharding_degree
== fleet_env._hcg.get_sharding_parallel_world_size()
)
broadcast_sharding_parameters(model, fleet_env._hcg)
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个地方删除代码是为了什么?

Copy link
Contributor Author

@liuzhenhai93 liuzhenhai93 Sep 11, 2023

Choose a reason for hiding this comment

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

sharding > 1 and dp > 1 改成在 shardding_parallel里处理

@sneaxiy sneaxiy merged commit cc045c0 into PaddlePaddle:develop Sep 14, 2023
@liuzhenhai93 liuzhenhai93 deleted the sep_grad_reduce branch October 7, 2023 03:09
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
* sep grad all sync

* polish

* polish

* polish

* polish

* add test

* add test, and align with dp

* follow comment

* polish
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