Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
3e8d17e6
Unverified
Commit
3e8d17e6
authored
Nov 16, 2021
by
Sylvain Gugger
Committed by
GitHub
Nov 16, 2021
Browse files
Add forward method to dummy models (#14419)
* Add forward method to dummy models * Fix quality
parent
040fd471
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2071 additions
and
4 deletions
+2071
-4
src/transformers/utils/dummy_flax_objects.py
src/transformers/utils/dummy_flax_objects.py
+291
-0
src/transformers/utils/dummy_pt_objects.py
src/transformers/utils/dummy_pt_objects.py
+1092
-0
src/transformers/utils/dummy_scatter_objects.py
src/transformers/utils/dummy_scatter_objects.py
+15
-0
src/transformers/utils/dummy_tf_objects.py
src/transformers/utils/dummy_tf_objects.py
+624
-0
src/transformers/utils/dummy_timm_and_vision_objects.py
src/transformers/utils/dummy_timm_and_vision_objects.py
+12
-0
utils/check_dummies.py
utils/check_dummies.py
+37
-4
No files found.
src/transformers/utils/dummy_flax_objects.py
View file @
3e8d17e6
...
...
@@ -75,6 +75,9 @@ class FlaxPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAlbertForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -84,6 +87,9 @@ class FlaxAlbertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAlbertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -93,6 +99,9 @@ class FlaxAlbertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAlbertForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -107,6 +116,9 @@ class FlaxAlbertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAlbertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -116,6 +128,9 @@ class FlaxAlbertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAlbertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -125,6 +140,9 @@ class FlaxAlbertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAlbertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -134,6 +152,9 @@ class FlaxAlbertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAlbertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -143,6 +164,9 @@ class FlaxAlbertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
FLAX_MODEL_FOR_CAUSAL_LM_MAPPING
=
None
...
...
@@ -188,6 +212,9 @@ class FlaxAutoModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAutoModelForCausalLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -197,6 +224,9 @@ class FlaxAutoModelForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAutoModelForImageClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -206,6 +236,9 @@ class FlaxAutoModelForImageClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAutoModelForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -215,6 +248,9 @@ class FlaxAutoModelForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAutoModelForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -224,6 +260,9 @@ class FlaxAutoModelForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAutoModelForNextSentencePrediction
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -233,6 +272,9 @@ class FlaxAutoModelForNextSentencePrediction:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAutoModelForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -242,6 +284,9 @@ class FlaxAutoModelForPreTraining:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAutoModelForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -251,6 +296,9 @@ class FlaxAutoModelForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAutoModelForSeq2SeqLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -260,6 +308,9 @@ class FlaxAutoModelForSeq2SeqLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAutoModelForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -269,6 +320,9 @@ class FlaxAutoModelForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAutoModelForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -278,6 +332,9 @@ class FlaxAutoModelForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxAutoModelForVision2Seq
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -287,6 +344,9 @@ class FlaxAutoModelForVision2Seq:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBartForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -296,6 +356,9 @@ class FlaxBartForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBartForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -305,6 +368,9 @@ class FlaxBartForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBartForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -314,6 +380,9 @@ class FlaxBartForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBartModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -323,6 +392,9 @@ class FlaxBartModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBartPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -332,6 +404,9 @@ class FlaxBartPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBeitForImageClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -346,6 +421,9 @@ class FlaxBeitForMaskedImageModeling:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBeitModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -355,6 +433,9 @@ class FlaxBeitModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBeitPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -364,6 +445,9 @@ class FlaxBeitPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBertForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -373,6 +457,9 @@ class FlaxBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -382,6 +469,9 @@ class FlaxBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBertForNextSentencePrediction
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -401,6 +491,9 @@ class FlaxBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -410,6 +503,9 @@ class FlaxBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -419,6 +515,9 @@ class FlaxBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -428,6 +527,9 @@ class FlaxBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -437,6 +539,9 @@ class FlaxBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBigBirdForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -446,6 +551,9 @@ class FlaxBigBirdForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBigBirdForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -455,6 +563,9 @@ class FlaxBigBirdForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBigBirdForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -469,6 +580,9 @@ class FlaxBigBirdForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBigBirdForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -478,6 +592,9 @@ class FlaxBigBirdForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBigBirdForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -487,6 +604,9 @@ class FlaxBigBirdForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBigBirdModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -496,6 +616,9 @@ class FlaxBigBirdModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxBigBirdPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -505,6 +628,9 @@ class FlaxBigBirdPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxCLIPModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -514,6 +640,9 @@ class FlaxCLIPModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxCLIPPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -523,6 +652,9 @@ class FlaxCLIPPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxCLIPTextModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -532,6 +664,9 @@ class FlaxCLIPTextModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxCLIPTextPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -541,6 +676,9 @@ class FlaxCLIPTextPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxCLIPVisionModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -550,6 +688,9 @@ class FlaxCLIPVisionModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxCLIPVisionPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -559,6 +700,9 @@ class FlaxCLIPVisionPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxDistilBertForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -568,6 +712,9 @@ class FlaxDistilBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxDistilBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -577,6 +724,9 @@ class FlaxDistilBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxDistilBertForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -586,6 +736,9 @@ class FlaxDistilBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxDistilBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -595,6 +748,9 @@ class FlaxDistilBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxDistilBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -604,6 +760,9 @@ class FlaxDistilBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxDistilBertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -613,6 +772,9 @@ class FlaxDistilBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxDistilBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -622,6 +784,9 @@ class FlaxDistilBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxElectraForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -631,6 +796,9 @@ class FlaxElectraForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxElectraForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -640,6 +808,9 @@ class FlaxElectraForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxElectraForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -654,6 +825,9 @@ class FlaxElectraForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxElectraForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -663,6 +837,9 @@ class FlaxElectraForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxElectraForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -672,6 +849,9 @@ class FlaxElectraForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxElectraModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -681,6 +861,9 @@ class FlaxElectraModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxElectraPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -690,6 +873,9 @@ class FlaxElectraPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxEncoderDecoderModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -699,6 +885,9 @@ class FlaxEncoderDecoderModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxGPT2LMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -708,6 +897,9 @@ class FlaxGPT2LMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxGPT2Model
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -717,6 +909,9 @@ class FlaxGPT2Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxGPT2PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -726,6 +921,9 @@ class FlaxGPT2PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxGPTNeoForCausalLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -735,6 +933,9 @@ class FlaxGPTNeoForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxGPTNeoModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -744,6 +945,9 @@ class FlaxGPTNeoModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxGPTNeoPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -753,6 +957,9 @@ class FlaxGPTNeoPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxMarianModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -762,6 +969,9 @@ class FlaxMarianModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxMarianMTModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -771,6 +981,9 @@ class FlaxMarianMTModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxMarianPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -780,6 +993,9 @@ class FlaxMarianPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxMBartForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -789,6 +1005,9 @@ class FlaxMBartForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxMBartForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -798,6 +1017,9 @@ class FlaxMBartForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxMBartForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -807,6 +1029,9 @@ class FlaxMBartForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxMBartModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -816,6 +1041,9 @@ class FlaxMBartModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxMBartPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -825,6 +1053,9 @@ class FlaxMBartPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxMT5ForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -834,6 +1065,9 @@ class FlaxMT5ForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxMT5Model
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -843,6 +1077,9 @@ class FlaxMT5Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxPegasusForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -852,6 +1089,9 @@ class FlaxPegasusForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxPegasusModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -861,6 +1101,9 @@ class FlaxPegasusModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxPegasusPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -870,6 +1113,9 @@ class FlaxPegasusPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxRobertaForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -879,6 +1125,9 @@ class FlaxRobertaForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxRobertaForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -888,6 +1137,9 @@ class FlaxRobertaForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxRobertaForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -897,6 +1149,9 @@ class FlaxRobertaForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxRobertaForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -906,6 +1161,9 @@ class FlaxRobertaForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxRobertaForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -915,6 +1173,9 @@ class FlaxRobertaForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxRobertaModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -924,6 +1185,9 @@ class FlaxRobertaModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxRobertaPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -933,6 +1197,9 @@ class FlaxRobertaPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxT5ForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -942,6 +1209,9 @@ class FlaxT5ForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxT5Model
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -951,6 +1221,9 @@ class FlaxT5Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxT5PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -960,6 +1233,9 @@ class FlaxT5PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxVisionEncoderDecoderModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -969,6 +1245,9 @@ class FlaxVisionEncoderDecoderModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxViTForImageClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -983,6 +1262,9 @@ class FlaxViTModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxViTPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -992,6 +1274,9 @@ class FlaxViTPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxWav2Vec2ForCTC
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1011,6 +1296,9 @@ class FlaxWav2Vec2Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
class
FlaxWav2Vec2PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1019,3 +1307,6 @@ class FlaxWav2Vec2PreTrainedModel:
@
classmethod
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"flax"
])
def
__call__
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"flax"
])
src/transformers/utils/dummy_pt_objects.py
View file @
3e8d17e6
...
...
@@ -223,6 +223,9 @@ class PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
apply_chunking_to_forward
(
*
args
,
**
kwargs
):
requires_backends
(
apply_chunking_to_forward
,
[
"torch"
])
...
...
@@ -243,6 +246,9 @@ class AlbertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AlbertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -252,6 +258,9 @@ class AlbertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AlbertForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -266,6 +275,9 @@ class AlbertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AlbertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -275,6 +287,9 @@ class AlbertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AlbertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -284,6 +299,9 @@ class AlbertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AlbertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -293,6 +311,9 @@ class AlbertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AlbertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -302,6 +323,9 @@ class AlbertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_albert
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_albert
,
[
"torch"
])
...
...
@@ -372,6 +396,9 @@ class AutoModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForAudioClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -381,6 +408,9 @@ class AutoModelForAudioClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForCausalLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -390,6 +420,9 @@ class AutoModelForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForCTC
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -399,6 +432,9 @@ class AutoModelForCTC:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForImageClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -408,6 +444,9 @@ class AutoModelForImageClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForImageSegmentation
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -417,6 +456,9 @@ class AutoModelForImageSegmentation:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -426,6 +468,9 @@ class AutoModelForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -435,6 +480,9 @@ class AutoModelForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForNextSentencePrediction
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -444,6 +492,9 @@ class AutoModelForNextSentencePrediction:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForObjectDetection
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -453,6 +504,9 @@ class AutoModelForObjectDetection:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -462,6 +516,9 @@ class AutoModelForPreTraining:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -471,6 +528,9 @@ class AutoModelForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForSeq2SeqLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -480,6 +540,9 @@ class AutoModelForSeq2SeqLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -489,6 +552,9 @@ class AutoModelForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForSpeechSeq2Seq
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -498,6 +564,9 @@ class AutoModelForSpeechSeq2Seq:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForTableQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -507,6 +576,9 @@ class AutoModelForTableQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -516,6 +588,9 @@ class AutoModelForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelForVision2Seq
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -525,6 +600,9 @@ class AutoModelForVision2Seq:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
AutoModelWithLMHead
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -534,6 +612,9 @@ class AutoModelWithLMHead:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
BART_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -546,6 +627,9 @@ class BartForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BartForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -555,6 +639,9 @@ class BartForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BartForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -564,6 +651,9 @@ class BartForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BartForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -573,6 +663,9 @@ class BartForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BartModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -582,6 +675,9 @@ class BartModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BartPretrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -591,6 +687,9 @@ class BartPretrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
PretrainedBartModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -600,6 +699,9 @@ class PretrainedBartModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
BEIT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -617,6 +719,9 @@ class BeitForMaskedImageModeling:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BeitForSemanticSegmentation
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -631,6 +736,9 @@ class BeitModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BeitPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -640,6 +748,9 @@ class BeitPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
BERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -652,6 +763,9 @@ class BertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -661,6 +775,9 @@ class BertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BertForNextSentencePrediction
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -680,6 +797,9 @@ class BertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -689,6 +809,9 @@ class BertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -698,6 +821,9 @@ class BertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BertLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -712,6 +838,9 @@ class BertLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -721,6 +850,9 @@ class BertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -730,6 +862,9 @@ class BertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_bert
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_bert
,
[
"torch"
])
...
...
@@ -753,6 +888,9 @@ class BertGenerationPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_bert_generation
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_bert_generation
,
[
"torch"
])
...
...
@@ -769,6 +907,9 @@ class BigBirdForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BigBirdForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -778,6 +919,9 @@ class BigBirdForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BigBirdForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -787,6 +931,9 @@ class BigBirdForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BigBirdForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -801,6 +948,9 @@ class BigBirdForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BigBirdForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -810,6 +960,9 @@ class BigBirdForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BigBirdForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -819,6 +972,9 @@ class BigBirdForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BigBirdLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -833,6 +989,9 @@ class BigBirdModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BigBirdPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -842,6 +1001,9 @@ class BigBirdPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_big_bird
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_big_bird
,
[
"torch"
])
...
...
@@ -858,6 +1020,9 @@ class BigBirdPegasusForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BigBirdPegasusForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -867,6 +1032,9 @@ class BigBirdPegasusForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BigBirdPegasusForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -876,6 +1044,9 @@ class BigBirdPegasusForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BigBirdPegasusForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -885,6 +1056,9 @@ class BigBirdPegasusForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BigBirdPegasusModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -894,6 +1068,9 @@ class BigBirdPegasusModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BigBirdPegasusPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -903,6 +1080,9 @@ class BigBirdPegasusPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
BLENDERBOT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -915,6 +1095,9 @@ class BlenderbotForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BlenderbotForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -924,6 +1107,9 @@ class BlenderbotForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BlenderbotModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -933,6 +1119,9 @@ class BlenderbotModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BlenderbotPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -942,6 +1131,9 @@ class BlenderbotPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
BLENDERBOT_SMALL_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -954,6 +1146,9 @@ class BlenderbotSmallForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BlenderbotSmallForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -963,6 +1158,9 @@ class BlenderbotSmallForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BlenderbotSmallModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -972,6 +1170,9 @@ class BlenderbotSmallModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
BlenderbotSmallPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -981,6 +1182,9 @@ class BlenderbotSmallPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
CAMEMBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -993,6 +1197,9 @@ class CamembertForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CamembertForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1002,6 +1209,9 @@ class CamembertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CamembertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1011,6 +1221,9 @@ class CamembertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CamembertForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1020,6 +1233,9 @@ class CamembertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CamembertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1029,6 +1245,9 @@ class CamembertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CamembertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1038,6 +1257,9 @@ class CamembertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CamembertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1047,6 +1269,9 @@ class CamembertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
CANINE_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1059,6 +1284,9 @@ class CanineForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CanineForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1068,6 +1296,9 @@ class CanineForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CanineForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1077,6 +1308,9 @@ class CanineForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CanineForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1086,6 +1320,9 @@ class CanineForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CanineLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1100,6 +1337,9 @@ class CanineModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CaninePreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1109,6 +1349,9 @@ class CaninePreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_canine
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_canine
,
[
"torch"
])
...
...
@@ -1125,6 +1368,9 @@ class CLIPModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CLIPPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1134,6 +1380,9 @@ class CLIPPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CLIPTextModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1143,6 +1392,9 @@ class CLIPTextModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CLIPVisionModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1152,6 +1404,9 @@ class CLIPVisionModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1164,6 +1419,9 @@ class ConvBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ConvBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1173,6 +1431,9 @@ class ConvBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ConvBertForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1182,6 +1443,9 @@ class ConvBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ConvBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1191,6 +1455,9 @@ class ConvBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ConvBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1200,6 +1467,9 @@ class ConvBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ConvBertLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1214,6 +1484,9 @@ class ConvBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ConvBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1223,6 +1496,9 @@ class ConvBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_convbert
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_convbert
,
[
"torch"
])
...
...
@@ -1239,6 +1515,9 @@ class CTRLForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CTRLLMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1248,6 +1527,9 @@ class CTRLLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CTRLModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1257,6 +1539,9 @@ class CTRLModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
CTRLPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1266,6 +1551,9 @@ class CTRLPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1278,6 +1566,9 @@ class DebertaForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DebertaForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1287,6 +1578,9 @@ class DebertaForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DebertaForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1296,6 +1590,9 @@ class DebertaForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DebertaForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1305,6 +1602,9 @@ class DebertaForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DebertaModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1314,6 +1614,9 @@ class DebertaModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DebertaPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1323,6 +1626,9 @@ class DebertaPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1335,6 +1641,9 @@ class DebertaV2ForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DebertaV2ForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1344,6 +1653,9 @@ class DebertaV2ForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DebertaV2ForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1353,6 +1665,9 @@ class DebertaV2ForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DebertaV2ForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1362,6 +1677,9 @@ class DebertaV2ForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DebertaV2Model
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1371,6 +1689,9 @@ class DebertaV2Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DebertaV2PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1380,6 +1701,9 @@ class DebertaV2PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
DEIT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1402,6 +1726,9 @@ class DeiTModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DeiTPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1411,6 +1738,9 @@ class DeiTPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1423,6 +1753,9 @@ class DistilBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DistilBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1432,6 +1765,9 @@ class DistilBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DistilBertForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1441,6 +1777,9 @@ class DistilBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DistilBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1450,6 +1789,9 @@ class DistilBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DistilBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1459,6 +1801,9 @@ class DistilBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DistilBertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1468,6 +1813,9 @@ class DistilBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DistilBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1477,6 +1825,9 @@ class DistilBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1505,6 +1856,9 @@ class DPRPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
DPRPretrainedQuestionEncoder
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1537,6 +1891,9 @@ class ElectraForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ElectraForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1546,6 +1903,9 @@ class ElectraForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ElectraForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1560,6 +1920,9 @@ class ElectraForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ElectraForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1569,6 +1932,9 @@ class ElectraForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ElectraForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1578,6 +1944,9 @@ class ElectraForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ElectraModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1587,6 +1956,9 @@ class ElectraModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ElectraPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1596,6 +1968,9 @@ class ElectraPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_electra
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_electra
,
[
"torch"
])
...
...
@@ -1609,6 +1984,9 @@ class EncoderDecoderModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1621,6 +1999,9 @@ class FlaubertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FlaubertForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1630,6 +2011,9 @@ class FlaubertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FlaubertForQuestionAnsweringSimple
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1639,6 +2023,9 @@ class FlaubertForQuestionAnsweringSimple:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FlaubertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1648,6 +2035,9 @@ class FlaubertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FlaubertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1657,6 +2047,9 @@ class FlaubertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FlaubertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1666,6 +2059,9 @@ class FlaubertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FlaubertWithLMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1675,6 +2071,9 @@ class FlaubertWithLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
FNET_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1687,6 +2086,9 @@ class FNetForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FNetForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1696,6 +2098,9 @@ class FNetForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FNetForNextSentencePrediction
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1715,6 +2120,9 @@ class FNetForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FNetForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1724,6 +2132,9 @@ class FNetForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FNetForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1733,6 +2144,9 @@ class FNetForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FNetLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1747,6 +2161,9 @@ class FNetModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FNetPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1756,6 +2173,9 @@ class FNetPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FSMTForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1765,6 +2185,9 @@ class FSMTForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FSMTModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1774,6 +2197,9 @@ class FSMTModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
PretrainedFSMTModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1783,6 +2209,9 @@ class PretrainedFSMTModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1795,6 +2224,9 @@ class FunnelBaseModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FunnelForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1804,6 +2236,9 @@ class FunnelForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FunnelForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1813,6 +2248,9 @@ class FunnelForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FunnelForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1827,6 +2265,9 @@ class FunnelForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FunnelForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1836,6 +2277,9 @@ class FunnelForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FunnelForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1845,6 +2289,9 @@ class FunnelForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FunnelModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1854,6 +2301,9 @@ class FunnelModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
FunnelPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1863,6 +2313,9 @@ class FunnelPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_funnel
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_funnel
,
[
"torch"
])
...
...
@@ -1879,6 +2332,9 @@ class GPT2DoubleHeadsModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
GPT2ForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1888,6 +2344,9 @@ class GPT2ForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
GPT2ForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1897,6 +2356,9 @@ class GPT2ForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
GPT2LMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1906,6 +2368,9 @@ class GPT2LMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
GPT2Model
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1915,6 +2380,9 @@ class GPT2Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
GPT2PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1924,6 +2392,9 @@ class GPT2PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_gpt2
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_gpt2
,
[
"torch"
])
...
...
@@ -1940,6 +2411,9 @@ class GPTNeoForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
GPTNeoForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1949,6 +2423,9 @@ class GPTNeoForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
GPTNeoModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1958,6 +2435,9 @@ class GPTNeoModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
GPTNeoPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1967,6 +2447,9 @@ class GPTNeoPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_gpt_neo
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_gpt_neo
,
[
"torch"
])
...
...
@@ -1983,6 +2466,9 @@ class GPTJForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
GPTJForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1992,6 +2478,9 @@ class GPTJForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
GPTJModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2001,6 +2490,9 @@ class GPTJModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
GPTJPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2010,6 +2502,9 @@ class GPTJPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -2027,6 +2522,9 @@ class HubertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
HubertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2036,6 +2534,9 @@ class HubertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
HubertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2045,6 +2546,9 @@ class HubertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
IBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -2057,6 +2561,9 @@ class IBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
IBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2066,6 +2573,9 @@ class IBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
IBertForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2075,6 +2585,9 @@ class IBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
IBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2084,6 +2597,9 @@ class IBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
IBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2093,6 +2609,9 @@ class IBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
IBertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2102,6 +2621,9 @@ class IBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
IBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2111,6 +2633,9 @@ class IBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -2123,6 +2648,9 @@ class LayoutLMForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LayoutLMForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2132,6 +2660,9 @@ class LayoutLMForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LayoutLMForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2141,6 +2672,9 @@ class LayoutLMForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LayoutLMModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2150,6 +2684,9 @@ class LayoutLMModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LayoutLMPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2159,6 +2696,9 @@ class LayoutLMPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
LAYOUTLMV2_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -2171,6 +2711,9 @@ class LayoutLMv2ForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LayoutLMv2ForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2180,6 +2723,9 @@ class LayoutLMv2ForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LayoutLMv2ForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2189,6 +2735,9 @@ class LayoutLMv2ForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LayoutLMv2Model
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2198,6 +2747,9 @@ class LayoutLMv2Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LayoutLMv2PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2207,6 +2759,9 @@ class LayoutLMv2PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
LED_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -2219,6 +2774,9 @@ class LEDForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LEDForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2228,6 +2786,9 @@ class LEDForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LEDForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2237,6 +2798,9 @@ class LEDForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LEDModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2246,6 +2810,9 @@ class LEDModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LEDPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2255,6 +2822,9 @@ class LEDPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
LONGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -2267,6 +2837,9 @@ class LongformerForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LongformerForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2276,6 +2849,9 @@ class LongformerForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LongformerForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2285,6 +2861,9 @@ class LongformerForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LongformerForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2294,6 +2873,9 @@ class LongformerForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LongformerForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2303,6 +2885,9 @@ class LongformerForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LongformerModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2312,6 +2897,9 @@ class LongformerModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LongformerPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2321,6 +2909,9 @@ class LongformerPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LongformerSelfAttention
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2353,6 +2944,9 @@ class LukeModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LukePreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2362,6 +2956,9 @@ class LukePreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LxmertEncoder
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2381,6 +2978,9 @@ class LxmertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LxmertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2390,6 +2990,9 @@ class LxmertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LxmertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2399,6 +3002,9 @@ class LxmertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
LxmertVisualFeatureEncoder
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2421,6 +3027,9 @@ class M2M100ForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
M2M100Model
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2430,6 +3039,9 @@ class M2M100Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
M2M100PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2439,6 +3051,9 @@ class M2M100PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MarianForCausalLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2448,6 +3063,9 @@ class MarianForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MarianModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2457,6 +3075,9 @@ class MarianModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MarianMTModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2466,6 +3087,9 @@ class MarianMTModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MBartForCausalLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2475,6 +3099,9 @@ class MBartForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MBartForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2484,6 +3111,9 @@ class MBartForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MBartForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2493,6 +3123,9 @@ class MBartForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MBartForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2502,6 +3135,9 @@ class MBartForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MBartModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2511,6 +3147,9 @@ class MBartModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MBartPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2520,6 +3159,9 @@ class MBartPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -2532,6 +3174,9 @@ class MegatronBertForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MegatronBertForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2541,6 +3186,9 @@ class MegatronBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MegatronBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2550,6 +3198,9 @@ class MegatronBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MegatronBertForNextSentencePrediction
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2569,6 +3220,9 @@ class MegatronBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MegatronBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2578,6 +3232,9 @@ class MegatronBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MegatronBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2587,6 +3244,9 @@ class MegatronBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MegatronBertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2596,6 +3256,9 @@ class MegatronBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MegatronBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2605,6 +3268,9 @@ class MegatronBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MMBTForClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2619,6 +3285,9 @@ class MMBTModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ModalEmbeddings
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2636,6 +3305,9 @@ class MobileBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MobileBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2645,6 +3317,9 @@ class MobileBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MobileBertForNextSentencePrediction
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2664,6 +3339,9 @@ class MobileBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MobileBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2673,6 +3351,9 @@ class MobileBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MobileBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2682,6 +3363,9 @@ class MobileBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MobileBertLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2696,6 +3380,9 @@ class MobileBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MobileBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2705,6 +3392,9 @@ class MobileBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_mobilebert
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_mobilebert
,
[
"torch"
])
...
...
@@ -2721,6 +3411,9 @@ class MPNetForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MPNetForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2730,6 +3423,9 @@ class MPNetForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MPNetForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2739,6 +3435,9 @@ class MPNetForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MPNetForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2748,6 +3447,9 @@ class MPNetForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MPNetForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2757,6 +3459,9 @@ class MPNetForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MPNetLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2771,6 +3476,9 @@ class MPNetModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MPNetPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2780,6 +3488,9 @@ class MPNetPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MT5EncoderModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2789,6 +3500,9 @@ class MT5EncoderModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MT5ForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2798,6 +3512,9 @@ class MT5ForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
MT5Model
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2807,6 +3524,9 @@ class MT5Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -2819,6 +3539,9 @@ class OpenAIGPTDoubleHeadsModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
OpenAIGPTForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2828,6 +3551,9 @@ class OpenAIGPTForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
OpenAIGPTLMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2837,6 +3563,9 @@ class OpenAIGPTLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
OpenAIGPTModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2846,6 +3575,9 @@ class OpenAIGPTModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
OpenAIGPTPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2855,6 +3587,9 @@ class OpenAIGPTPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_openai_gpt
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_openai_gpt
,
[
"torch"
])
...
...
@@ -2868,6 +3603,9 @@ class PegasusForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
PegasusForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2877,6 +3615,9 @@ class PegasusForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
PegasusModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2886,6 +3627,9 @@ class PegasusModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
PegasusPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2895,6 +3639,9 @@ class PegasusPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
PROPHETNET_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -2917,6 +3664,9 @@ class ProphetNetForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ProphetNetForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2926,6 +3676,9 @@ class ProphetNetForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ProphetNetModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2935,6 +3688,9 @@ class ProphetNetModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ProphetNetPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2944,6 +3700,9 @@ class ProphetNetPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RagModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2953,6 +3712,9 @@ class RagModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RagPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2962,6 +3724,9 @@ class RagPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RagSequenceForGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2989,6 +3754,9 @@ class ReformerForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ReformerForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2998,6 +3766,9 @@ class ReformerForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ReformerForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3007,6 +3778,9 @@ class ReformerForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ReformerLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3021,6 +3795,9 @@ class ReformerModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ReformerModelWithLMHead
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3030,6 +3807,9 @@ class ReformerModelWithLMHead:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ReformerPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3039,6 +3819,9 @@ class ReformerPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
REMBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3051,6 +3834,9 @@ class RemBertForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RemBertForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3060,6 +3846,9 @@ class RemBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RemBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3069,6 +3858,9 @@ class RemBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RemBertForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3078,6 +3870,9 @@ class RemBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RemBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3087,6 +3882,9 @@ class RemBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RemBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3096,6 +3894,9 @@ class RemBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RemBertLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3110,6 +3911,9 @@ class RemBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RemBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3119,6 +3923,9 @@ class RemBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_rembert
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_rembert
,
[
"torch"
])
...
...
@@ -3135,6 +3942,9 @@ class RetriBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RetriBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3144,6 +3954,9 @@ class RetriBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3156,6 +3969,9 @@ class RobertaForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RobertaForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3165,6 +3981,9 @@ class RobertaForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RobertaForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3174,6 +3993,9 @@ class RobertaForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RobertaForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3183,6 +4005,9 @@ class RobertaForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RobertaForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3192,6 +4017,9 @@ class RobertaForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RobertaForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3201,6 +4029,9 @@ class RobertaForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RobertaModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3210,6 +4041,9 @@ class RobertaModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RobertaPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3219,6 +4053,9 @@ class RobertaPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
ROFORMER_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3231,6 +4068,9 @@ class RoFormerForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RoFormerForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3240,6 +4080,9 @@ class RoFormerForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RoFormerForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3249,6 +4092,9 @@ class RoFormerForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RoFormerForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3258,6 +4104,9 @@ class RoFormerForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RoFormerForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3267,6 +4116,9 @@ class RoFormerForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RoFormerForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3276,6 +4128,9 @@ class RoFormerForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RoFormerLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3290,6 +4145,9 @@ class RoFormerModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
RoFormerPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3299,6 +4157,9 @@ class RoFormerPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_roformer
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_roformer
,
[
"torch"
])
...
...
@@ -3335,6 +4196,9 @@ class SegformerModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SegformerPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3344,6 +4208,9 @@ class SegformerPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
SEW_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3361,6 +4228,9 @@ class SEWForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SEWModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3370,6 +4240,9 @@ class SEWModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SEWPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3379,6 +4252,9 @@ class SEWPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
SEW_D_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3396,6 +4272,9 @@ class SEWDForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SEWDModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3405,6 +4284,9 @@ class SEWDModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SEWDPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3414,6 +4296,9 @@ class SEWDPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SpeechEncoderDecoderModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3423,6 +4308,9 @@ class SpeechEncoderDecoderModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
SPEECH_TO_TEXT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3435,6 +4323,9 @@ class Speech2TextForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
Speech2TextModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3444,6 +4335,9 @@ class Speech2TextModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
Speech2TextPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3453,6 +4347,9 @@ class Speech2TextPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
Speech2Text2ForCausalLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3462,6 +4359,9 @@ class Speech2Text2ForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
Speech2Text2PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3471,6 +4371,9 @@ class Speech2Text2PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
SPLINTER_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3483,6 +4386,9 @@ class SplinterForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SplinterLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3497,6 +4403,9 @@ class SplinterModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SplinterPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3506,6 +4415,9 @@ class SplinterPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
SQUEEZEBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3518,6 +4430,9 @@ class SqueezeBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SqueezeBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3527,6 +4442,9 @@ class SqueezeBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SqueezeBertForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3536,6 +4454,9 @@ class SqueezeBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SqueezeBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3545,6 +4466,9 @@ class SqueezeBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SqueezeBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3554,6 +4478,9 @@ class SqueezeBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SqueezeBertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3563,6 +4490,9 @@ class SqueezeBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
SqueezeBertModule
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3577,6 +4507,9 @@ class SqueezeBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
T5_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3589,6 +4522,9 @@ class T5EncoderModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
T5ForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3598,6 +4534,9 @@ class T5ForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
T5Model
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3607,6 +4546,9 @@ class T5Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
T5PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3616,6 +4558,9 @@ class T5PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_t5
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_t5
,
[
"torch"
])
...
...
@@ -3637,6 +4582,9 @@ class TransfoXLForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
TransfoXLLMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3646,6 +4594,9 @@ class TransfoXLLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
TransfoXLModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3655,6 +4606,9 @@ class TransfoXLModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
TransfoXLPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3664,6 +4618,9 @@ class TransfoXLPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_transfo_xl
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_transfo_xl
,
[
"torch"
])
...
...
@@ -3680,6 +4637,9 @@ class TrOCRForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
TrOCRPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3689,6 +4649,9 @@ class TrOCRPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
UNISPEECH_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3711,6 +4674,9 @@ class UniSpeechForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
UniSpeechModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3720,6 +4686,9 @@ class UniSpeechModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
UniSpeechPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3729,6 +4698,9 @@ class UniSpeechPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
UNISPEECH_SAT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3751,6 +4723,9 @@ class UniSpeechSatForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
UniSpeechSatModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3760,6 +4735,9 @@ class UniSpeechSatModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
UniSpeechSatPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3769,6 +4747,9 @@ class UniSpeechSatPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
VisionEncoderDecoderModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3778,6 +4759,9 @@ class VisionEncoderDecoderModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3790,6 +4774,9 @@ class VisualBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
VisualBertForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3804,6 +4791,9 @@ class VisualBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
VisualBertForRegionToPhraseAlignment
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3828,6 +4818,9 @@ class VisualBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
VisualBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3837,6 +4830,9 @@ class VisualBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
VIT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3854,6 +4850,9 @@ class ViTModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
ViTPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3863,6 +4862,9 @@ class ViTPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
WAV_2_VEC_2_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3880,6 +4882,9 @@ class Wav2Vec2ForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
Wav2Vec2ForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3894,6 +4899,9 @@ class Wav2Vec2ForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
Wav2Vec2Model
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3903,6 +4911,9 @@ class Wav2Vec2Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
Wav2Vec2PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3912,6 +4923,9 @@ class Wav2Vec2PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
XLM_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -3924,6 +4938,9 @@ class XLMForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3933,6 +4950,9 @@ class XLMForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMForQuestionAnsweringSimple
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3942,6 +4962,9 @@ class XLMForQuestionAnsweringSimple:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3951,6 +4974,9 @@ class XLMForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3960,6 +4986,9 @@ class XLMForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3969,6 +4998,9 @@ class XLMModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3978,6 +5010,9 @@ class XLMPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMWithLMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -3987,6 +5022,9 @@ class XLMWithLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
XLM_PROPHETNET_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -4009,6 +5047,9 @@ class XLMProphetNetForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMProphetNetForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4018,6 +5059,9 @@ class XLMProphetNetForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMProphetNetModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4027,6 +5071,9 @@ class XLMProphetNetModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
XLM_ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -4039,6 +5086,9 @@ class XLMRobertaForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMRobertaForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4048,6 +5098,9 @@ class XLMRobertaForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMRobertaForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4057,6 +5110,9 @@ class XLMRobertaForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMRobertaForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4066,6 +5122,9 @@ class XLMRobertaForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMRobertaForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4075,6 +5134,9 @@ class XLMRobertaForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMRobertaForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4084,6 +5146,9 @@ class XLMRobertaForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLMRobertaModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4093,6 +5158,9 @@ class XLMRobertaModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
XLNET_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -4105,6 +5173,9 @@ class XLNetForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLNetForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4114,6 +5185,9 @@ class XLNetForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLNetForQuestionAnsweringSimple
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4123,6 +5197,9 @@ class XLNetForQuestionAnsweringSimple:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLNetForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4132,6 +5209,9 @@ class XLNetForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLNetForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4141,6 +5221,9 @@ class XLNetForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLNetLMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4150,6 +5233,9 @@ class XLNetLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLNetModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4159,6 +5245,9 @@ class XLNetModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
class
XLNetPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -4168,6 +5257,9 @@ class XLNetPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"torch"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"torch"
])
def
load_tf_weights_in_xlnet
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_xlnet
,
[
"torch"
])
...
...
src/transformers/utils/dummy_scatter_objects.py
View file @
3e8d17e6
...
...
@@ -13,6 +13,9 @@ class TapasForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"scatter"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"scatter"
])
class
TapasForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -22,6 +25,9 @@ class TapasForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"scatter"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"scatter"
])
class
TapasForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -31,6 +37,9 @@ class TapasForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"scatter"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"scatter"
])
class
TapasModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -40,6 +49,9 @@ class TapasModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"scatter"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"scatter"
])
class
TapasPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -49,6 +61,9 @@ class TapasPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"scatter"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"scatter"
])
def
load_tf_weights_in_tapas
(
*
args
,
**
kwargs
):
requires_backends
(
load_tf_weights_in_tapas
,
[
"scatter"
])
src/transformers/utils/dummy_tf_objects.py
View file @
3e8d17e6
...
...
@@ -32,6 +32,9 @@ class TFLayoutLMForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLayoutLMForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -41,6 +44,9 @@ class TFLayoutLMForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLayoutLMForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -50,6 +56,9 @@ class TFLayoutLMForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLayoutLMMainLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -64,6 +73,9 @@ class TFLayoutLMModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLayoutLMPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -73,6 +85,9 @@ class TFLayoutLMPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -82,6 +97,9 @@ class TFPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFSequenceSummary
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -108,6 +126,9 @@ class TFAlbertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAlbertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -117,6 +138,9 @@ class TFAlbertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAlbertForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -131,6 +155,9 @@ class TFAlbertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAlbertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -140,6 +167,9 @@ class TFAlbertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAlbertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -149,6 +179,9 @@ class TFAlbertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAlbertMainLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -163,6 +196,9 @@ class TFAlbertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAlbertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -172,6 +208,9 @@ class TFAlbertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_MODEL_FOR_CAUSAL_LM_MAPPING
=
None
...
...
@@ -217,6 +256,9 @@ class TFAutoModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAutoModelForCausalLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -226,6 +268,9 @@ class TFAutoModelForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAutoModelForImageClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -235,6 +280,9 @@ class TFAutoModelForImageClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAutoModelForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -244,6 +292,9 @@ class TFAutoModelForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAutoModelForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -253,6 +304,9 @@ class TFAutoModelForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAutoModelForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -262,6 +316,9 @@ class TFAutoModelForPreTraining:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAutoModelForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -271,6 +328,9 @@ class TFAutoModelForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAutoModelForSeq2SeqLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -280,6 +340,9 @@ class TFAutoModelForSeq2SeqLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAutoModelForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -289,6 +352,9 @@ class TFAutoModelForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAutoModelForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -298,6 +364,9 @@ class TFAutoModelForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFAutoModelWithLMHead
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -307,6 +376,9 @@ class TFAutoModelWithLMHead:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBartForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -316,6 +388,9 @@ class TFBartForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBartModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -325,6 +400,9 @@ class TFBartModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBartPretrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -334,6 +412,9 @@ class TFBartPretrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_BERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -351,6 +432,9 @@ class TFBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -360,6 +444,9 @@ class TFBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBertForNextSentencePrediction
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -379,6 +466,9 @@ class TFBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -388,6 +478,9 @@ class TFBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -397,6 +490,9 @@ class TFBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBertLMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -406,6 +502,9 @@ class TFBertLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBertMainLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -420,6 +519,9 @@ class TFBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -429,6 +531,9 @@ class TFBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBlenderbotForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -438,6 +543,9 @@ class TFBlenderbotForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBlenderbotModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -447,6 +555,9 @@ class TFBlenderbotModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBlenderbotPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -456,6 +567,9 @@ class TFBlenderbotPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBlenderbotSmallForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -465,6 +579,9 @@ class TFBlenderbotSmallForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBlenderbotSmallModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -474,6 +591,9 @@ class TFBlenderbotSmallModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFBlenderbotSmallPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -483,6 +603,9 @@ class TFBlenderbotSmallPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_CAMEMBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -495,6 +618,9 @@ class TFCamembertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFCamembertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -504,6 +630,9 @@ class TFCamembertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFCamembertForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -513,6 +642,9 @@ class TFCamembertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFCamembertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -522,6 +654,9 @@ class TFCamembertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFCamembertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -531,6 +666,9 @@ class TFCamembertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFCamembertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -540,6 +678,9 @@ class TFCamembertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -552,6 +693,9 @@ class TFConvBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFConvBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -561,6 +705,9 @@ class TFConvBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFConvBertForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -570,6 +717,9 @@ class TFConvBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFConvBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -579,6 +729,9 @@ class TFConvBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFConvBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -588,6 +741,9 @@ class TFConvBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFConvBertLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -602,6 +758,9 @@ class TFConvBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFConvBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -611,6 +770,9 @@ class TFConvBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_CTRL_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -623,6 +785,9 @@ class TFCTRLForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFCTRLLMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -632,6 +797,9 @@ class TFCTRLLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFCTRLModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -641,6 +809,9 @@ class TFCTRLModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFCTRLPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -650,6 +821,9 @@ class TFCTRLPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -662,6 +836,9 @@ class TFDebertaForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDebertaForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -671,6 +848,9 @@ class TFDebertaForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDebertaForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -680,6 +860,9 @@ class TFDebertaForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDebertaForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -689,6 +872,9 @@ class TFDebertaForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDebertaModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -698,6 +884,9 @@ class TFDebertaModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDebertaPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -707,6 +896,9 @@ class TFDebertaPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -719,6 +911,9 @@ class TFDebertaV2ForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDebertaV2ForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -728,6 +923,9 @@ class TFDebertaV2ForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDebertaV2ForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -737,6 +935,9 @@ class TFDebertaV2ForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDebertaV2ForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -746,6 +947,9 @@ class TFDebertaV2ForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDebertaV2Model
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -755,6 +959,9 @@ class TFDebertaV2Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDebertaV2PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -764,6 +971,9 @@ class TFDebertaV2PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -776,6 +986,9 @@ class TFDistilBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDistilBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -785,6 +998,9 @@ class TFDistilBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDistilBertForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -794,6 +1010,9 @@ class TFDistilBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDistilBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -803,6 +1022,9 @@ class TFDistilBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDistilBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -812,6 +1034,9 @@ class TFDistilBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDistilBertMainLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -826,6 +1051,9 @@ class TFDistilBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFDistilBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -835,6 +1063,9 @@ class TFDistilBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -886,6 +1117,9 @@ class TFElectraForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFElectraForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -895,6 +1129,9 @@ class TFElectraForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFElectraForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -909,6 +1146,9 @@ class TFElectraForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFElectraForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -918,6 +1158,9 @@ class TFElectraForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFElectraForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -927,6 +1170,9 @@ class TFElectraForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFElectraModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -936,6 +1182,9 @@ class TFElectraModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFElectraPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -945,6 +1194,9 @@ class TFElectraPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFEncoderDecoderModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -954,6 +1206,9 @@ class TFEncoderDecoderModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -966,6 +1221,9 @@ class TFFlaubertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFFlaubertForQuestionAnsweringSimple
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -975,6 +1233,9 @@ class TFFlaubertForQuestionAnsweringSimple:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFFlaubertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -984,6 +1245,9 @@ class TFFlaubertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFFlaubertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -993,6 +1257,9 @@ class TFFlaubertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFFlaubertModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1002,6 +1269,9 @@ class TFFlaubertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFFlaubertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1011,6 +1281,9 @@ class TFFlaubertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFFlaubertWithLMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1020,6 +1293,9 @@ class TFFlaubertWithLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1032,6 +1308,9 @@ class TFFunnelBaseModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFFunnelForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1041,6 +1320,9 @@ class TFFunnelForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFFunnelForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1050,6 +1332,9 @@ class TFFunnelForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFFunnelForPreTraining
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1064,6 +1349,9 @@ class TFFunnelForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFFunnelForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1073,6 +1361,9 @@ class TFFunnelForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFFunnelForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1082,6 +1373,9 @@ class TFFunnelForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFFunnelModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1091,6 +1385,9 @@ class TFFunnelModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFFunnelPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1100,6 +1397,9 @@ class TFFunnelPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_GPT2_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1112,6 +1412,9 @@ class TFGPT2DoubleHeadsModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFGPT2ForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1121,6 +1424,9 @@ class TFGPT2ForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFGPT2LMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1130,6 +1436,9 @@ class TFGPT2LMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFGPT2MainLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1144,6 +1453,9 @@ class TFGPT2Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFGPT2PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1153,6 +1465,9 @@ class TFGPT2PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1170,6 +1485,9 @@ class TFHubertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFHubertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1179,6 +1497,9 @@ class TFHubertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLEDForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1188,6 +1509,9 @@ class TFLEDForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLEDModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1197,6 +1521,9 @@ class TFLEDModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLEDPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1206,6 +1533,9 @@ class TFLEDPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_LONGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1218,6 +1548,9 @@ class TFLongformerForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLongformerForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1227,6 +1560,9 @@ class TFLongformerForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLongformerForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1236,6 +1572,9 @@ class TFLongformerForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLongformerForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1245,6 +1584,9 @@ class TFLongformerForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLongformerForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1254,6 +1596,9 @@ class TFLongformerForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLongformerModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1263,6 +1608,9 @@ class TFLongformerModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLongformerPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1272,6 +1620,9 @@ class TFLongformerPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLongformerSelfAttention
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1299,6 +1650,9 @@ class TFLxmertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLxmertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1308,6 +1662,9 @@ class TFLxmertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFLxmertVisualFeatureEncoder
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1322,6 +1679,9 @@ class TFMarianModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMarianMTModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1331,6 +1691,9 @@ class TFMarianMTModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMarianPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1340,6 +1703,9 @@ class TFMarianPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMBartForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1349,6 +1715,9 @@ class TFMBartForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMBartModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1358,6 +1727,9 @@ class TFMBartModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMBartPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1367,6 +1739,9 @@ class TFMBartPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_MOBILEBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1379,6 +1754,9 @@ class TFMobileBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMobileBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1388,6 +1766,9 @@ class TFMobileBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMobileBertForNextSentencePrediction
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1407,6 +1788,9 @@ class TFMobileBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMobileBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1416,6 +1800,9 @@ class TFMobileBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMobileBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1425,6 +1812,9 @@ class TFMobileBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMobileBertMainLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1439,6 +1829,9 @@ class TFMobileBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMobileBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1448,6 +1841,9 @@ class TFMobileBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_MPNET_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1460,6 +1856,9 @@ class TFMPNetForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMPNetForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1469,6 +1868,9 @@ class TFMPNetForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMPNetForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1478,6 +1880,9 @@ class TFMPNetForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMPNetForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1487,6 +1892,9 @@ class TFMPNetForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMPNetForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1496,6 +1904,9 @@ class TFMPNetForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMPNetMainLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1510,6 +1921,9 @@ class TFMPNetModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMPNetPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1519,6 +1933,9 @@ class TFMPNetPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMT5EncoderModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1528,6 +1945,9 @@ class TFMT5EncoderModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMT5ForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1537,6 +1957,9 @@ class TFMT5ForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFMT5Model
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1546,6 +1969,9 @@ class TFMT5Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1558,6 +1984,9 @@ class TFOpenAIGPTDoubleHeadsModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFOpenAIGPTForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1567,6 +1996,9 @@ class TFOpenAIGPTForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFOpenAIGPTLMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1576,6 +2008,9 @@ class TFOpenAIGPTLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFOpenAIGPTMainLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1590,6 +2025,9 @@ class TFOpenAIGPTModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFOpenAIGPTPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1599,6 +2037,9 @@ class TFOpenAIGPTPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFPegasusForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1608,6 +2049,9 @@ class TFPegasusForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFPegasusModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1617,6 +2061,9 @@ class TFPegasusModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFPegasusPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1626,6 +2073,9 @@ class TFPegasusPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRagModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1635,6 +2085,9 @@ class TFRagModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRagPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1644,6 +2097,9 @@ class TFRagPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRagSequenceForGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1666,6 +2122,9 @@ class TFRemBertForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRemBertForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1675,6 +2134,9 @@ class TFRemBertForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRemBertForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1684,6 +2146,9 @@ class TFRemBertForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRemBertForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1693,6 +2158,9 @@ class TFRemBertForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRemBertForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1702,6 +2170,9 @@ class TFRemBertForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRemBertForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1711,6 +2182,9 @@ class TFRemBertForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRemBertLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1725,6 +2199,9 @@ class TFRemBertModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRemBertPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1734,6 +2211,9 @@ class TFRemBertPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1746,6 +2226,9 @@ class TFRobertaForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRobertaForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1755,6 +2238,9 @@ class TFRobertaForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRobertaForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1764,6 +2250,9 @@ class TFRobertaForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRobertaForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1773,6 +2262,9 @@ class TFRobertaForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRobertaForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1782,6 +2274,9 @@ class TFRobertaForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRobertaForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1791,6 +2286,9 @@ class TFRobertaForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRobertaMainLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1805,6 +2303,9 @@ class TFRobertaModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRobertaPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1814,6 +2315,9 @@ class TFRobertaPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_ROFORMER_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1826,6 +2330,9 @@ class TFRoFormerForCausalLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRoFormerForMaskedLM
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1835,6 +2342,9 @@ class TFRoFormerForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRoFormerForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1844,6 +2354,9 @@ class TFRoFormerForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRoFormerForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1853,6 +2366,9 @@ class TFRoFormerForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRoFormerForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1862,6 +2378,9 @@ class TFRoFormerForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRoFormerForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1871,6 +2390,9 @@ class TFRoFormerForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRoFormerLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1885,6 +2407,9 @@ class TFRoFormerModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFRoFormerPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1894,6 +2419,9 @@ class TFRoFormerPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_T5_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1906,6 +2434,9 @@ class TFT5EncoderModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFT5ForConditionalGeneration
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1915,6 +2446,9 @@ class TFT5ForConditionalGeneration:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFT5Model
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1924,6 +2458,9 @@ class TFT5Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFT5PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1933,6 +2470,9 @@ class TFT5PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -1950,6 +2490,9 @@ class TFTransfoXLForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFTransfoXLLMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1959,6 +2502,9 @@ class TFTransfoXLLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFTransfoXLMainLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1973,6 +2519,9 @@ class TFTransfoXLModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFTransfoXLPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1982,6 +2531,9 @@ class TFTransfoXLPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFViTForImageClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1996,6 +2548,9 @@ class TFViTModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFViTPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2005,6 +2560,9 @@ class TFViTPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_WAV_2_VEC_2_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -2022,6 +2580,9 @@ class TFWav2Vec2Model:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFWav2Vec2PreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2031,6 +2592,9 @@ class TFWav2Vec2PreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -2043,6 +2607,9 @@ class TFXLMForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLMForQuestionAnsweringSimple
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2052,6 +2619,9 @@ class TFXLMForQuestionAnsweringSimple:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLMForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2061,6 +2631,9 @@ class TFXLMForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLMForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2070,6 +2643,9 @@ class TFXLMForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLMMainLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2084,6 +2660,9 @@ class TFXLMModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLMPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2093,6 +2672,9 @@ class TFXLMPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLMWithLMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2102,6 +2684,9 @@ class TFXLMWithLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_XLM_ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -2114,6 +2699,9 @@ class TFXLMRobertaForMaskedLM:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLMRobertaForMultipleChoice
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2123,6 +2711,9 @@ class TFXLMRobertaForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLMRobertaForQuestionAnswering
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2132,6 +2723,9 @@ class TFXLMRobertaForQuestionAnswering:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLMRobertaForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2141,6 +2735,9 @@ class TFXLMRobertaForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLMRobertaForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2150,6 +2747,9 @@ class TFXLMRobertaForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLMRobertaModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2159,6 +2759,9 @@ class TFXLMRobertaModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
TF_XLNET_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
...
...
@@ -2171,6 +2774,9 @@ class TFXLNetForMultipleChoice:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLNetForQuestionAnsweringSimple
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2180,6 +2786,9 @@ class TFXLNetForQuestionAnsweringSimple:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLNetForSequenceClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2189,6 +2798,9 @@ class TFXLNetForSequenceClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLNetForTokenClassification
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2198,6 +2810,9 @@ class TFXLNetForTokenClassification:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLNetLMHeadModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2207,6 +2822,9 @@ class TFXLNetLMHeadModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLNetMainLayer
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2221,6 +2839,9 @@ class TFXLNetModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
TFXLNetPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -2230,6 +2851,9 @@ class TFXLNetPreTrainedModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"tf"
])
def
call
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"tf"
])
class
AdamWeightDecay
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
src/transformers/utils/dummy_timm_and_vision_objects.py
View file @
3e8d17e6
...
...
@@ -13,6 +13,9 @@ class DetrForObjectDetection:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"timm"
,
"vision"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"timm"
,
"vision"
])
class
DetrForSegmentation
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -22,6 +25,9 @@ class DetrForSegmentation:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"timm"
,
"vision"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"timm"
,
"vision"
])
class
DetrModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -31,6 +37,9 @@ class DetrModel:
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"timm"
,
"vision"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"timm"
,
"vision"
])
class
DetrPreTrainedModel
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -39,3 +48,6 @@ class DetrPreTrainedModel:
@
classmethod
def
from_pretrained
(
cls
,
*
args
,
**
kwargs
):
requires_backends
(
cls
,
[
"timm"
,
"vision"
])
def
forward
(
self
,
*
args
,
**
kwargs
):
requires_backends
(
self
,
[
"timm"
,
"vision"
])
utils/check_dummies.py
View file @
3e8d17e6
...
...
@@ -43,6 +43,30 @@ class {0}:
requires_backends(cls, {1})
"""
PT_DUMMY_PRETRAINED_CLASS
=
(
DUMMY_PRETRAINED_CLASS
+
"""
def forward(self, *args, **kwargs):
requires_backends(self, {1})
"""
)
TF_DUMMY_PRETRAINED_CLASS
=
(
DUMMY_PRETRAINED_CLASS
+
"""
def call(self, *args, **kwargs):
requires_backends(self, {1})
"""
)
FLAX_DUMMY_PRETRAINED_CLASS
=
(
DUMMY_PRETRAINED_CLASS
+
"""
def __call__(self, *args, **kwargs):
requires_backends(self, {1})
"""
)
DUMMY_CLASS
=
"""
class {0}:
def __init__(self, *args, **kwargs):
...
...
@@ -102,8 +126,7 @@ def read_init():
def
create_dummy_object
(
name
,
backend_name
):
"""Create the code for the dummy object corresponding to `name`."""
_pretrained
=
[
"Config"
,
_models
=
[
"ForCausalLM"
,
"ForConditionalGeneration"
,
"ForMaskedLM"
,
...
...
@@ -114,14 +137,24 @@ def create_dummy_object(name, backend_name):
"ForSequenceClassification"
,
"ForTokenClassification"
,
"Model"
,
"Tokenizer"
,
"Processor"
,
]
_pretrained
=
[
"Config"
,
"Tokenizer"
,
"Processor"
]
if
name
.
isupper
():
return
DUMMY_CONSTANT
.
format
(
name
)
elif
name
.
islower
():
return
DUMMY_FUNCTION
.
format
(
name
,
backend_name
)
else
:
is_model
=
False
for
part
in
_models
:
if
part
in
name
:
is_model
=
True
break
if
is_model
:
if
name
.
startswith
(
"TF"
):
return
TF_DUMMY_PRETRAINED_CLASS
.
format
(
name
,
backend_name
)
if
name
.
startswith
(
"Flax"
):
return
FLAX_DUMMY_PRETRAINED_CLASS
.
format
(
name
,
backend_name
)
return
PT_DUMMY_PRETRAINED_CLASS
.
format
(
name
,
backend_name
)
is_pretrained
=
False
for
part
in
_pretrained
:
if
part
in
name
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment