lmflow.utils.flash_attention.llama_flash_attention#
Functions#
|
|
|
|
Module Contents#
- lmflow.utils.flash_attention.llama_flash_attention.forward(self, hidden_states: torch.Tensor, attention_mask: torch.Tensor | None = None, position_ids: torch.LongTensor | None = None, past_key_value: Tuple[torch.Tensor] | None = None, output_attentions: bool = False, use_cache: bool = False) Tuple[torch.Tensor, torch.Tensor | None, Tuple[torch.Tensor] | None] [source]#