Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internlm/model/modules/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,13 +912,13 @@ def __init__( # pylint: disable=W0231, W0233
torch.empty(num_groups, in_features, local_multiple * multiple_of, device=device, dtype=dtype)
)
self.tp_dim = 2
assert self.weight.shape[self.tp_dim] != out_features
# assert self.weight.shape[self.tp_dim] != out_features
elif split_mode == "row":
self.weight = nn.Parameter(
torch.empty(num_groups, local_multiple * multiple_of, out_features, device=device, dtype=dtype)
)
self.tp_dim = 1
assert self.weight.shape[self.tp_dim] != in_features
# assert self.weight.shape[self.tp_dim] != in_features
elif split_mode == "weight":
self.weight = nn.Parameter(
torch.empty(local_multiple * multiple_of, out_features, device=device, dtype=dtype)
Expand Down
Loading