-
Notifications
You must be signed in to change notification settings - Fork 151
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
base: develop
Are you sure you want to change the base?
weight parallel #773
Conversation
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)]) |
There was a problem hiding this comment.
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吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
收到,已修改~
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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:
这个判断出现了两次了!
这样不好!建议声明一个临时变量!
No description provided.