Skip to content

Commit

Permalink
Update black formatting (#1415)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdangerw committed Jan 29, 2024
1 parent b76c149 commit 5038e58
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
8 changes: 5 additions & 3 deletions keras_nlp/layers/modeling/transformer_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,11 @@ def _compute_self_attention_mask(
batch_size,
input_length,
output_length,
0
if self_attention_cache_update_index is None
else self_attention_cache_update_index,
(
0
if self_attention_cache_update_index is None
else self_attention_cache_update_index
),
)
return (
ops.minimum(decoder_mask, causal_mask)
Expand Down
8 changes: 5 additions & 3 deletions keras_nlp/models/bloom/bloom_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,11 @@ def _compute_attention_mask(
batch_size,
input_length,
output_length,
0
if attention_cache_update_index is None
else attention_cache_update_index,
(
0
if attention_cache_update_index is None
else attention_cache_update_index
),
)
return (
ops.minimum(decoder_mask, causal_mask)
Expand Down
8 changes: 5 additions & 3 deletions keras_nlp/models/gpt_neo_x/gpt_neo_x_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,11 @@ def _compute_self_attention_mask(
batch_size,
input_length,
output_length,
0
if self_attention_cache_update_index is None
else self_attention_cache_update_index,
(
0
if self_attention_cache_update_index is None
else self_attention_cache_update_index
),
)
return (
ops.minimum(decoder_mask, causal_mask)
Expand Down
8 changes: 5 additions & 3 deletions keras_nlp/models/llama/llama_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,11 @@ def _compute_self_attention_mask(
batch_size,
input_length,
output_length,
0
if self_attention_cache_update_index is None
else self_attention_cache_update_index,
(
0
if self_attention_cache_update_index is None
else self_attention_cache_update_index
),
)
return (
ops.minimum(decoder_mask, causal_mask)
Expand Down

0 comments on commit 5038e58

Please sign in to comment.