Skip to content

Commit

Permalink
fix llama fa bug (PaddlePaddle#8237)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianhaodongbd authored Apr 9, 2024
1 parent c1aad02 commit 79cb8b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddlenlp/transformers/llama/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@ def forward(
attention_mask, (batch_size, seq_length), cache_length, inputs_embeds.dtype
) # [bs, 1, seq_len, seq_len]
if self.config.use_flash_attention:
if get_env_device != "npu":
if get_env_device() != "npu":
is_casual = is_casual_mask(attention_mask)
if is_casual and alibi is None:
attention_mask = None
Expand Down

0 comments on commit 79cb8b6

Please sign in to comment.