Skip to content

[bugfix] fix gdn conv1d#97

Merged
Jintao-Huang merged 1 commit into
modelscope:mainfrom
Jintao-Huang:fix_gdn_conv1d
May 26, 2026
Merged

[bugfix] fix gdn conv1d#97
Jintao-Huang merged 1 commit into
modelscope:mainfrom
Jintao-Huang:fix_gdn_conv1d

Conversation

@Jintao-Huang

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the 1D convolution in the gated delta network module to include the groups parameter, calculated using the tensor parallel and context parallel sizes. The reviewer suggests using conv1d_weight.shape[0] instead of manually computing this value, as it is cleaner and more robust.

stride=self.conv1d.stride,
padding=self.conv1d.padding,
dilation=self.conv1d.dilation,
groups=self.conv_dim // self.tp_size // cp_size,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Using conv1d_weight.shape[0] is more robust and cleaner than manually computing self.conv_dim // self.tp_size // cp_size. Since conv1d_weight is already sliced according to the TP and CP configurations, its first dimension dynamically represents the correct local channel size.

Suggested change
groups=self.conv_dim // self.tp_size // cp_size,
groups=conv1d_weight.shape[0],

@Jintao-Huang
Jintao-Huang merged commit 1ead945 into modelscope:main May 26, 2026
1 check passed
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.

1 participant