(self, num_layers, in_features, hidden_features, bias=False)
| 545 | |
| 546 | class SwiGLUMixin(BaseMixin): |
| 547 | def __init__(self, num_layers, in_features, hidden_features, bias=False): |
| 548 | super().__init__() |
| 549 | self.w2 = nn.ModuleList( |
| 550 | [ |
| 551 | ColumnParallelLinear( |
| 552 | in_features, |
| 553 | hidden_features, |
| 554 | gather_output=False, |
| 555 | bias=bias, |
| 556 | module=self, |
| 557 | name="dense_h_to_4h_gate", |
| 558 | ) |
| 559 | for i in range(num_layers) |
| 560 | ] |
| 561 | ) |
| 562 | |
| 563 | def mlp_forward(self, hidden_states, **kw_args): |
| 564 | x = hidden_states |
nothing calls this directly
no test coverage detected