Skip to content

Commit

Permalink
Adapt to new npu flash_attention api (#9735)
Browse files Browse the repository at this point in the history
  • Loading branch information
will-jl944 authored Jan 6, 2025
1 parent a83e8fa commit 1f07325
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions paddlenlp/transformers/llama/fusion_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,14 @@ def fusion_flash_attention(
value_states,
None,
attention_mask,
[],
[],
0.0,
attention_mask is None,
True,
False,
npu_is_casual,
False,
)[0]
elif get_env_device() == "gcu":
if config.context_parallel_degree > 1:
Expand Down

0 comments on commit 1f07325

Please sign in to comment.