(self, hidden_states)
| 64 | ) |
| 65 | |
| 66 | def forward(self, hidden_states): |
| 67 | |
| 68 | # [s, b, 4 * h/p] |
| 69 | intermediate_parallel, bias_parallel = self.linear_fc1(hidden_states) |
| 70 | |
| 71 | if self.config.bias_gelu_fusion: |
| 72 | assert self.config.add_bias_linear is True |
| 73 | assert self.activation_func == F.gelu |
| 74 | intermediate_parallel = bias_gelu_impl(intermediate_parallel, bias_parallel) |
| 75 | else: |
| 76 | if bias_parallel is not None: |
| 77 | intermediate_parallel = intermediate_parallel + bias_parallel |
| 78 | intermediate_parallel = self.activation_func(intermediate_parallel) |
| 79 | |
| 80 | # [s, b, h] |
| 81 | output, output_bias = self.linear_fc2(intermediate_parallel) |
| 82 | return output, output_bias |
nothing calls this directly
no outgoing calls
no test coverage detected