(self, layer_index)
| 19 | class _Experts(nn.Module): |
| 20 | |
| 21 | def __init__(self, layer_index): |
| 22 | super().__init__() |
| 23 | self.w1 = nn.Parameter(torch.full((2, 2), float(layer_index + 1))) |
| 24 | self.w2 = nn.Parameter(torch.full((2, 2), float(layer_index + 2)), requires_grad=False) |
| 25 | for param in self.parameters(): |
| 26 | param.ds_zero_placement_family = "autoep_expert" |
| 27 | param.ds_zero_partition_group_name = f"expert_group_{layer_index}" |
| 28 | |
| 29 | |
| 30 | class _Replacement(nn.Module): |
no test coverage detected