Skip to content

Commit fdc82d5

Browse files
hsiehjacksonmonica-sekoyan
authored andcommitted
Remove mask if use fusion mask (#9723)
* Remove mask if use fusion mask Signed-off-by: Cheng-Ping Hsieh <chsieh@nvidia.com> * Apply isort and black reformatting Signed-off-by: hsiehjackson <hsiehjackson@users.noreply.github.com> --------- Signed-off-by: Cheng-Ping Hsieh <chsieh@nvidia.com> Signed-off-by: hsiehjackson <hsiehjackson@users.noreply.github.com> Co-authored-by: hsiehjackson <hsiehjackson@users.noreply.github.com>
1 parent 7242aa5 commit fdc82d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

nemo/collections/nlp/modules/common/text_generation_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,9 @@ def generate(
794794
if random_seed is not None:
795795
seed_everything(random_seed)
796796

797+
if hasattr(model, 'get_attention_mask_from_fusion') and model.get_attention_mask_from_fusion:
798+
compute_attention_mask = False
799+
797800
output = synced_generate(
798801
model,
799802
inference_strategy,

0 commit comments

Comments
 (0)