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

weight parallel #773

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

Conversation

chang-wenbin
Copy link
Contributor

No description provided.

Copy link

paddle-bot bot commented Oct 21, 2024

Thanks for your contribution!



if model_parallel_size > 1:
self.qkv_mp = nn.LayerList([fleet.meta_parallel.ColumnParallelLinear(self.dim, 3 * self.dim, gather_output=False, has_bias=True) for i in range(num_layers)])
Copy link
Contributor

@zhoutianzi666 zhoutianzi666 Oct 27, 2024

Choose a reason for hiding this comment

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

from fleet.meta_parallel import RowParallelLinear
from fleet.meta_parallel import ColumnParallelLinear

被频繁使用了,应该预先import as吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

收到,已修改~

Copy link
Contributor

Choose a reason for hiding this comment

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

from fleet.meta_parallel import RowParallelLinear
from fleet.meta_parallel import ColumnParallelLinear

from fleet.meta_parallel import RowParallelLinear
from fleet.meta_parallel import ColumnParallelLinear
改成这样


hcg = fleet.get_hybrid_communicate_group()
dp_degree = hcg.get_data_parallel_world_size()
if dp_degree > 1 and self.do_classifier_free_guidance:
Copy link
Contributor

Choose a reason for hiding this comment

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

dp_degree > 1 and self.do_classifier_free_guidance:这个判断出现了两次了!
这样不好!建议声明一个临时变量!

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