Skip to content

Commit

Permalink
fix: RewardModelLinear bcast process_group (#249)
Browse files Browse the repository at this point in the history
Co-authored-by: shidongxing <shidongxing@>
  • Loading branch information
KimmiShi authored Jun 12, 2024
1 parent eaef99e commit 2ac3dcf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internlm/model/modules/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,10 @@ def __init__(

# broadcast parameters for reward model head layer.
parallel_mode = get_head_parallel_mode()
dist.broadcast(self.weight, gpc.get_ranks_in_group(parallel_mode)[0])
process_group = gpc.get_group(parallel_mode)
dist.broadcast(self.weight, gpc.get_ranks_in_group(parallel_mode)[0], process_group)
if bias:
dist.broadcast(self.bias, gpc.get_ranks_in_group(parallel_mode)[0])
dist.broadcast(self.bias, gpc.get_ranks_in_group(parallel_mode)[0], process_group)


def new_linear(
Expand Down

0 comments on commit 2ac3dcf

Please sign in to comment.