(self, hidden_states_a)
| 183 | |
| 184 | |
| 185 | def forward(self, hidden_states_a): |
| 186 | batch_size = hidden_states_a.shape[0] |
| 187 | q, k, v = self.process_qkv(hidden_states_a, self.a_to_qkv, self.norm_q_a, self.norm_k_a) |
| 188 | |
| 189 | hidden_states = torch.nn.functional.scaled_dot_product_attention(q, k, v) |
| 190 | hidden_states = hidden_states.transpose(1, 2).reshape(batch_size, -1, self.num_heads * self.head_dim) |
| 191 | hidden_states = hidden_states.to(q.dtype) |
| 192 | hidden_states = self.a_to_out(hidden_states) |
| 193 | return hidden_states |
| 194 | |
| 195 | |
| 196 |
nothing calls this directly
no test coverage detected