(self, hidden_states)
| 810 | self.parallel = attention_type=='parallel' |
| 811 | |
| 812 | def patchfy(self, hidden_states): |
| 813 | hidden_states = rearrange(hidden_states, 'b f c h w -> (b f) c h w') |
| 814 | hidden_states = self.pos_embed(hidden_states) |
| 815 | return hidden_states |
| 816 | |
| 817 | def prepare_attn_mask(self, encoder_attention_mask, encoder_hidden_states, q_seqlen): |
| 818 | kv_seqlens = encoder_attention_mask.sum(dim=1).int() |