(self, x_or_x_list, rope_or_rope_list=None, drop_ratio: Optional[float] = None)
| 298 | return x_ffn |
| 299 | |
| 300 | def forward(self, x_or_x_list, rope_or_rope_list=None, drop_ratio: Optional[float] = None) -> List[Tensor]: |
| 301 | if isinstance(x_or_x_list, Tensor): |
| 302 | return self._forward_list([x_or_x_list], rope_list=[rope_or_rope_list], drop_ratio=drop_ratio)[0] |
| 303 | elif isinstance(x_or_x_list, list): |
| 304 | if rope_or_rope_list is None: |
| 305 | rope_or_rope_list = [None for x in x_or_x_list] |
| 306 | return self._forward_list(x_or_x_list, rope_list=rope_or_rope_list, drop_ratio=drop_ratio) |
| 307 | else: |
| 308 | raise AssertionError |
| 309 | |
| 310 | |
| 311 | class CausalSelfAttentionBlock(nn.Module): |
nothing calls this directly
no test coverage detected