"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "b0d539ccad090c8949c1740a9758b4152fad5f72"
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): ...@@ -919,9 +919,10 @@ class WhisperDecoder(WhisperPreTrainedModel):
hidden_states, hidden_states,
attention_mask, attention_mask,
encoder_hidden_states, encoder_hidden_states,
None, # encoder attention mask
head_mask[idx] if head_mask is not None else None, 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, cross_attn_head_mask[idx] if cross_attn_head_mask is not None else None,
None, None, # past_key_value
) )
else: 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