Unverified Commit 4e196df8 authored by Sanchit Gandhi's avatar Sanchit Gandhi Committed by GitHub
Browse files

[Whisper] Fix gradient checkpointing (again!) (#19548)

* [Whisper] Fix gradient checkpointing (again!)

* [Whisper] Fix checkpointing (again!)
parent 585f9c6d
......@@ -919,9 +919,10 @@ class WhisperDecoder(WhisperPreTrainedModel):
hidden_states,
attention_mask,
encoder_hidden_states,
None, # encoder attention mask
head_mask[idx] if head_mask is not None else None,
cross_attn_head_mask[idx] if cross_attn_head_mask is not None else None,
None,
None, # past_key_value
)
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment