zRzRzRzRzRzRzR
commited on
Commit
·
179a99d
1
Parent(s):
323240f
remove fa
Browse files- modeling_audio.py +0 -2
modeling_audio.py
CHANGED
|
@@ -91,7 +91,6 @@ class WhisperRoPEFlashAttn(WhisperFlashAttention2):
|
|
| 91 |
) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
|
| 92 |
# WhisperFlashAttention2 attention does not support output_attentions
|
| 93 |
if output_attentions:
|
| 94 |
-
# raise ValueError("WhisperFlashAttention2 attention does not support output_attentions")
|
| 95 |
logger.warning_once("WhisperFlashAttention2 attention does not support output_attentions, "
|
| 96 |
"manually calculating attention weights.")
|
| 97 |
|
|
@@ -105,7 +104,6 @@ class WhisperRoPEFlashAttn(WhisperFlashAttention2):
|
|
| 105 |
key_states = self._reshape(self.k_proj(hidden_states), -1, bsz)
|
| 106 |
query_states = self._reshape(self.q_proj(hidden_states), -1, bsz)
|
| 107 |
if rotary_pos_emb is not None:
|
| 108 |
-
logger.warning_once("Using Rotary Position Embedding in WhisperRoPEFlashAttn. ")
|
| 109 |
query_states, key_states = [apply_rotary_pos_emb(
|
| 110 |
i.transpose(1, 2),
|
| 111 |
rotary_pos_emb,
|
|
|
|
| 91 |
) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
|
| 92 |
# WhisperFlashAttention2 attention does not support output_attentions
|
| 93 |
if output_attentions:
|
|
|
|
| 94 |
logger.warning_once("WhisperFlashAttention2 attention does not support output_attentions, "
|
| 95 |
"manually calculating attention weights.")
|
| 96 |
|
|
|
|
| 104 |
key_states = self._reshape(self.k_proj(hidden_states), -1, bsz)
|
| 105 |
query_states = self._reshape(self.q_proj(hidden_states), -1, bsz)
|
| 106 |
if rotary_pos_emb is not None:
|
|
|
|
| 107 |
query_states, key_states = [apply_rotary_pos_emb(
|
| 108 |
i.transpose(1, 2),
|
| 109 |
rotary_pos_emb,
|