Skip to content

Commit

Permalink
Merge pull request #1127 from AI-Hypercomputer:mattdavidow-fix-pylint
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 709508463
  • Loading branch information
maxtext authors committed Dec 25, 2024
2 parents 9afb70f + 2510f8a commit 9f854ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MaxText/layers/attentions.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,11 @@ def cudnn_flash_attention(
sliding_window_size = self.sliding_window_size
if self.attention_type == AttentionType.LOCAL_SLIDING:
sliding_window_size = [self.sliding_window_size, 0]
mask_type = "causal" # SWA only works with causal masking
mask_type = "causal" # SWA only works with causal masking
attn_mask = None
else:
# generate attn_mask
mask_type = "padding_causal" # only padding_causal mask type can take a created mask
mask_type = "padding_causal" # only padding_causal mask type can take a created mask
attn_mask = self.generate_attention_mask(query, key, decoder_segment_ids, model_mode)

dpa_layer = DotProductAttention(
Expand Down

0 comments on commit 9f854ad

Please sign in to comment.