don't worry about dupes

This commit is contained in:
Wing Lian
2023-05-31 00:06:47 -04:00
parent 2675fb756e
commit c56818b119
2 changed files with 3 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ def forward(
attention_mask: [bsz, q_len]
"""
# pylint: disable=duplicate-code
bsz, q_len, _ = hidden_states.size()
query_states = (

View File

@@ -35,6 +35,7 @@ def xformers_forward(
output_attentions: bool = False,
use_cache: bool = False,
) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
# pylint: disable=duplicate-code
bsz, q_len, _ = hidden_states.size()
query_states = (
@@ -143,6 +144,7 @@ def sdp_attention_forward(
output_attentions: bool = False,
use_cache: bool = False,
) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
# pylint: disable=duplicate-code
bsz, q_len, _ = hidden_states.size()
query_states = (