Add head_mask and decoder_head_mask to PyTorch LED (#9856)

* Add {decoder_,}head_mask to LED

* Fix create_custom_forward signatue in encoder

* Add head_mask to longformer

* Add head_mask to longformer to fix dependencies
of LED on Longformer.

* Not working yet

* Add mising one input in longofrmer_modeling.py

* make fix-copies
This commit is contained in:
Daniel Stancl
2021-02-02 20:06:52 +01:00
committed by GitHub
parent d6217fb30c
commit 71bdc076dd
5 changed files with 238 additions and 7 deletions

View File

@@ -273,7 +273,6 @@ class LongformerModelTester:
@require_torch
class LongformerModelTest(ModelTesterMixin, unittest.TestCase):
test_pruning = False # pruning is not supported
test_headmasking = False # head masking is not supported
test_torchscript = False
all_model_classes = (