Skip to content

Commit

Permalink
-1 for not masking first token loss
Browse files Browse the repository at this point in the history
Signed-off-by: Paarth Neekhara <[email protected]>
  • Loading branch information
paarthneekhara committed Nov 23, 2023
1 parent 7e24168 commit c45e497
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ def collate_fn(self, batch):
decoder_input_list.append(decoder_input)
decoder_labels_list.append(decoder_labels)

decoder_mask[i, :context_tokens_len+question_tokens_len] = 0 # Mask out context and question
decoder_mask[i, :context_tokens_len+question_tokens_len-1] = 0 # Mask out context and question
speech_input_mask[i, context_tokens_len:context_tokens_len+question_tokens_len] = 0

# Using causal attention mask for whole input
Expand Down

0 comments on commit c45e497

Please sign in to comment.