Add ONNX support for Longformer (#17176)

* Implement ONNX support for Longformer

Fix repo consistency check complaints

Fix value mismatches

Add pooler output for default model

Increase validation atol to accommodate multiple-choice error

Fix copies

Fix chunking for longer sequence lengths

Add future comment

* Fix issue in mask_invalid_locations

* Remove torch imports in configuration_longformer

* Change config access to fix LED

* Push opset version to support tril

* Work in review comments (mostly style)

* Add Longformer to ONNX tests
This commit is contained in:
Patrick Deutschmann
2022-08-25 08:34:42 +02:00
committed by GitHub
parent c55d6e4e10
commit 3223d49354
6 changed files with 212 additions and 52 deletions

View File

@@ -212,6 +212,7 @@ PYTORCH_EXPORT_MODELS = {
("data2vec-vision", "facebook/data2vec-vision-base"),
("perceiver", "deepmind/language-perceiver", ("masked-lm", "sequence-classification")),
("perceiver", "deepmind/vision-perceiver-conv", ("image-classification",)),
("longformer", "allenai/longformer-base-4096"),
("yolos", "hustvl/yolos-tiny"),
}