dummy_pt_objects.py 135 KB
Newer Older
1
# This file is autogenerated by the command `make fix-copies`, do not edit.
2
from ..file_utils import requires_backends
3
4
5
6


class PyTorchBenchmark:
    def __init__(self, *args, **kwargs):
7
        requires_backends(self, ["torch"])
8
9
10
11


class PyTorchBenchmarkArguments:
    def __init__(self, *args, **kwargs):
12
        requires_backends(self, ["torch"])
13
14
15
16


class GlueDataset:
    def __init__(self, *args, **kwargs):
17
        requires_backends(self, ["torch"])
18
19
20
21


class GlueDataTrainingArguments:
    def __init__(self, *args, **kwargs):
22
        requires_backends(self, ["torch"])
23
24
25
26


class LineByLineTextDataset:
    def __init__(self, *args, **kwargs):
27
        requires_backends(self, ["torch"])
28
29


30
31
class LineByLineWithRefDataset:
    def __init__(self, *args, **kwargs):
32
        requires_backends(self, ["torch"])
33
34


35
36
class LineByLineWithSOPTextDataset:
    def __init__(self, *args, **kwargs):
37
        requires_backends(self, ["torch"])
38
39
40
41


class SquadDataset:
    def __init__(self, *args, **kwargs):
42
        requires_backends(self, ["torch"])
43
44
45
46


class SquadDataTrainingArguments:
    def __init__(self, *args, **kwargs):
47
        requires_backends(self, ["torch"])
48
49
50
51


class TextDataset:
    def __init__(self, *args, **kwargs):
52
        requires_backends(self, ["torch"])
53
54
55
56


class TextDatasetForNextSentencePrediction:
    def __init__(self, *args, **kwargs):
57
        requires_backends(self, ["torch"])
58

59
60
61
62
63
64
65
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

66

67
68
class BeamScorer:
    def __init__(self, *args, **kwargs):
69
        requires_backends(self, ["torch"])
70
71
72
73


class BeamSearchScorer:
    def __init__(self, *args, **kwargs):
74
        requires_backends(self, ["torch"])
75
76


77
78
class ForcedBOSTokenLogitsProcessor:
    def __init__(self, *args, **kwargs):
79
        requires_backends(self, ["torch"])
80

81
82
83
84
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

85
86
87

class ForcedEOSTokenLogitsProcessor:
    def __init__(self, *args, **kwargs):
88
        requires_backends(self, ["torch"])
89

90
91
92
93
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

94

95
96
class HammingDiversityLogitsProcessor:
    def __init__(self, *args, **kwargs):
97
        requires_backends(self, ["torch"])
98

99
100
101
102
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

103

104
105
class InfNanRemoveLogitsProcessor:
    def __init__(self, *args, **kwargs):
106
        requires_backends(self, ["torch"])
107

108
109
110
111
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

112

113
114
class LogitsProcessor:
    def __init__(self, *args, **kwargs):
115
        requires_backends(self, ["torch"])
116

117
118
119
120
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

121
122
123

class LogitsProcessorList:
    def __init__(self, *args, **kwargs):
124
        requires_backends(self, ["torch"])
125

126
127
128
129
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

130
131
132

class LogitsWarper:
    def __init__(self, *args, **kwargs):
133
        requires_backends(self, ["torch"])
134
135
136
137


class MinLengthLogitsProcessor:
    def __init__(self, *args, **kwargs):
138
        requires_backends(self, ["torch"])
139

140
141
142
143
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

144
145
146

class NoBadWordsLogitsProcessor:
    def __init__(self, *args, **kwargs):
147
        requires_backends(self, ["torch"])
148

149
150
151
152
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

153
154
155

class NoRepeatNGramLogitsProcessor:
    def __init__(self, *args, **kwargs):
156
        requires_backends(self, ["torch"])
157

158
159
160
161
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

162

163
164
class PrefixConstrainedLogitsProcessor:
    def __init__(self, *args, **kwargs):
165
        requires_backends(self, ["torch"])
166

167
168
169
170
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

171

172
173
class RepetitionPenaltyLogitsProcessor:
    def __init__(self, *args, **kwargs):
174
        requires_backends(self, ["torch"])
175

176
177
178
179
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

180
181
182

class TemperatureLogitsWarper:
    def __init__(self, *args, **kwargs):
183
        requires_backends(self, ["torch"])
184
185
186
187


class TopKLogitsWarper:
    def __init__(self, *args, **kwargs):
188
        requires_backends(self, ["torch"])
189
190
191
192


class TopPLogitsWarper:
    def __init__(self, *args, **kwargs):
193
        requires_backends(self, ["torch"])
194
195


196
197
class MaxLengthCriteria:
    def __init__(self, *args, **kwargs):
198
        requires_backends(self, ["torch"])
199
200
201
202


class MaxTimeCriteria:
    def __init__(self, *args, **kwargs):
203
        requires_backends(self, ["torch"])
204
205
206
207


class StoppingCriteria:
    def __init__(self, *args, **kwargs):
208
        requires_backends(self, ["torch"])
209
210
211
212


class StoppingCriteriaList:
    def __init__(self, *args, **kwargs):
213
        requires_backends(self, ["torch"])
214
215


216
def top_k_top_p_filtering(*args, **kwargs):
217
    requires_backends(top_k_top_p_filtering, ["torch"])
218
219


Sylvain Gugger's avatar
Sylvain Gugger committed
220
221
class Conv1D:
    def __init__(self, *args, **kwargs):
222
        requires_backends(self, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
223
224
225
226


class PreTrainedModel:
    def __init__(self, *args, **kwargs):
227
        requires_backends(self, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
228
229

    @classmethod
230
231
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
232

233
234
235
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sylvain Gugger's avatar
Sylvain Gugger committed
236
237

def apply_chunking_to_forward(*args, **kwargs):
238
    requires_backends(apply_chunking_to_forward, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
239
240
241


def prune_layer(*args, **kwargs):
242
    requires_backends(prune_layer, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
243
244


245
246
247
248
249
ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class AlbertForMaskedLM:
    def __init__(self, *args, **kwargs):
250
        requires_backends(self, ["torch"])
251
252

    @classmethod
253
254
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
255

256
257
258
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

259
260
261

class AlbertForMultipleChoice:
    def __init__(self, *args, **kwargs):
262
        requires_backends(self, ["torch"])
263
264

    @classmethod
265
266
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
267

268
269
270
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

271
272
273

class AlbertForPreTraining:
    def __init__(self, *args, **kwargs):
274
        requires_backends(self, ["torch"])
275
276
277
278


class AlbertForQuestionAnswering:
    def __init__(self, *args, **kwargs):
279
        requires_backends(self, ["torch"])
280
281

    @classmethod
282
283
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
284

285
286
287
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

288
289
290

class AlbertForSequenceClassification:
    def __init__(self, *args, **kwargs):
291
        requires_backends(self, ["torch"])
292
293

    @classmethod
294
295
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
296

297
298
299
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

300
301
302

class AlbertForTokenClassification:
    def __init__(self, *args, **kwargs):
303
        requires_backends(self, ["torch"])
304
305

    @classmethod
306
307
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
308

309
310
311
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

312
313
314

class AlbertModel:
    def __init__(self, *args, **kwargs):
315
        requires_backends(self, ["torch"])
316
317

    @classmethod
318
319
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
320

321
322
323
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

324
325
326

class AlbertPreTrainedModel:
    def __init__(self, *args, **kwargs):
327
        requires_backends(self, ["torch"])
328
329

    @classmethod
330
331
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
332

333
334
335
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

336
337

def load_tf_weights_in_albert(*args, **kwargs):
338
    requires_backends(load_tf_weights_in_albert, ["torch"])
339
340


341
342
343
MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING = None


NielsRogge's avatar
NielsRogge committed
344
345
346
MODEL_FOR_CAUSAL_IMAGE_MODELING_MAPPING = None


347
348
349
MODEL_FOR_CAUSAL_LM_MAPPING = None


350
351
352
MODEL_FOR_CTC_MAPPING = None


353
354
355
MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING = None


356
357
358
MODEL_FOR_IMAGE_SEGMENTATION_MAPPING = None


359
360
361
362
363
364
MODEL_FOR_MASKED_LM_MAPPING = None


MODEL_FOR_MULTIPLE_CHOICE_MAPPING = None


365
366
367
MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPING = None


NielsRogge's avatar
NielsRogge committed
368
369
370
MODEL_FOR_OBJECT_DETECTION_MAPPING = None


371
372
373
374
375
376
377
378
379
380
381
382
MODEL_FOR_PRETRAINING_MAPPING = None


MODEL_FOR_QUESTION_ANSWERING_MAPPING = None


MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING = None


MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING = None


383
384
385
MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING = None


386
387
388
MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPING = None


389
390
391
MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING = None


392
393
394
MODEL_FOR_VISION_2_SEQ_MAPPING = None


395
396
397
398
399
400
401
402
MODEL_MAPPING = None


MODEL_WITH_LM_HEAD_MAPPING = None


class AutoModel:
    def __init__(self, *args, **kwargs):
403
        requires_backends(self, ["torch"])
404
405

    @classmethod
406
407
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
408

409
410
411
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

412

413
414
415
416
417
418
419
420
class AutoModelForAudioClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

421
422
423
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

424

425
426
class AutoModelForCausalLM:
    def __init__(self, *args, **kwargs):
427
        requires_backends(self, ["torch"])
428
429

    @classmethod
430
431
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
432

433
434
435
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

436

437
438
439
440
441
442
443
444
class AutoModelForCTC:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

445
446
447
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

448

449
450
451
452
453
class AutoModelForImageClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
454
455
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
456

457
458
459
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

460

461
462
463
464
465
466
467
468
class AutoModelForImageSegmentation:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

469
470
471
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

472

473
474
class AutoModelForMaskedLM:
    def __init__(self, *args, **kwargs):
475
        requires_backends(self, ["torch"])
476
477

    @classmethod
478
479
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
480

481
482
483
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

484
485
486

class AutoModelForMultipleChoice:
    def __init__(self, *args, **kwargs):
487
        requires_backends(self, ["torch"])
488
489

    @classmethod
490
491
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
492

493
494
495
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

496

497
498
class AutoModelForNextSentencePrediction:
    def __init__(self, *args, **kwargs):
499
        requires_backends(self, ["torch"])
500
501

    @classmethod
502
503
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
504

505
506
507
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

508

509
510
511
512
513
514
515
516
class AutoModelForObjectDetection:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

517
518
519
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

520

521
522
class AutoModelForPreTraining:
    def __init__(self, *args, **kwargs):
523
        requires_backends(self, ["torch"])
524
525

    @classmethod
526
527
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
528

529
530
531
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

532
533
534

class AutoModelForQuestionAnswering:
    def __init__(self, *args, **kwargs):
535
        requires_backends(self, ["torch"])
536
537

    @classmethod
538
539
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
540

541
542
543
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

544
545
546

class AutoModelForSeq2SeqLM:
    def __init__(self, *args, **kwargs):
547
        requires_backends(self, ["torch"])
548
549

    @classmethod
550
551
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
552

553
554
555
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

556
557
558

class AutoModelForSequenceClassification:
    def __init__(self, *args, **kwargs):
559
        requires_backends(self, ["torch"])
560
561

    @classmethod
562
563
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
564

565
566
567
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

568

569
570
571
572
573
574
575
576
class AutoModelForSpeechSeq2Seq:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

577
578
579
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

580

581
582
class AutoModelForTableQuestionAnswering:
    def __init__(self, *args, **kwargs):
583
        requires_backends(self, ["torch"])
584
585

    @classmethod
586
587
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
588

589
590
591
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

592
593
594

class AutoModelForTokenClassification:
    def __init__(self, *args, **kwargs):
595
        requires_backends(self, ["torch"])
596
597

    @classmethod
598
599
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
600

601
602
603
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

604

605
606
607
608
609
610
611
612
class AutoModelForVision2Seq:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

613
614
615
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

616

617
618
class AutoModelWithLMHead:
    def __init__(self, *args, **kwargs):
619
        requires_backends(self, ["torch"])
620
621

    @classmethod
622
623
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
624

625
626
627
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

628
629
630
631

BART_PRETRAINED_MODEL_ARCHIVE_LIST = None


632
633
class BartForCausalLM:
    def __init__(self, *args, **kwargs):
634
        requires_backends(self, ["torch"])
635

636
637
638
639
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

640
641
642
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

643

644
645
class BartForConditionalGeneration:
    def __init__(self, *args, **kwargs):
646
        requires_backends(self, ["torch"])
647
648

    @classmethod
649
650
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
651

652
653
654
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

655
656
657

class BartForQuestionAnswering:
    def __init__(self, *args, **kwargs):
658
        requires_backends(self, ["torch"])
659
660

    @classmethod
661
662
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
663

664
665
666
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

667
668
669

class BartForSequenceClassification:
    def __init__(self, *args, **kwargs):
670
        requires_backends(self, ["torch"])
671
672

    @classmethod
673
674
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
675

676
677
678
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

679
680
681

class BartModel:
    def __init__(self, *args, **kwargs):
682
        requires_backends(self, ["torch"])
683
684

    @classmethod
685
686
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
687

688
689
690
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

691

692
693
class BartPretrainedModel:
    def __init__(self, *args, **kwargs):
694
        requires_backends(self, ["torch"])
695
696

    @classmethod
697
698
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
699

700
701
702
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

703

704
705
class PretrainedBartModel:
    def __init__(self, *args, **kwargs):
706
        requires_backends(self, ["torch"])
707
708

    @classmethod
709
710
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
711

712
713
714
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

715

NielsRogge's avatar
NielsRogge committed
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
BEIT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class BeitForImageClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class BeitForMaskedImageModeling:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

732
733
734
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
735

736
737
738
739
740
class BeitForSemanticSegmentation:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


NielsRogge's avatar
NielsRogge committed
741
742
743
744
745
746
747
748
class BeitModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

749
750
751
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
752
753
754
755
756
757
758
759
760

class BeitPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

761
762
763
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
764

765
766
767
768
769
BERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class BertForMaskedLM:
    def __init__(self, *args, **kwargs):
770
        requires_backends(self, ["torch"])
771
772

    @classmethod
773
774
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
775

776
777
778
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

779
780
781

class BertForMultipleChoice:
    def __init__(self, *args, **kwargs):
782
        requires_backends(self, ["torch"])
783
784

    @classmethod
785
786
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
787

788
789
790
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

791
792
793

class BertForNextSentencePrediction:
    def __init__(self, *args, **kwargs):
794
        requires_backends(self, ["torch"])
795

796
797
798
799
800
801
802
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

803
804
805

class BertForPreTraining:
    def __init__(self, *args, **kwargs):
806
        requires_backends(self, ["torch"])
807
808
809
810


class BertForQuestionAnswering:
    def __init__(self, *args, **kwargs):
811
        requires_backends(self, ["torch"])
812
813

    @classmethod
814
815
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
816

817
818
819
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

820
821
822

class BertForSequenceClassification:
    def __init__(self, *args, **kwargs):
823
        requires_backends(self, ["torch"])
824
825

    @classmethod
826
827
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
828

829
830
831
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

832
833
834

class BertForTokenClassification:
    def __init__(self, *args, **kwargs):
835
        requires_backends(self, ["torch"])
836
837

    @classmethod
838
839
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
840

841
842
843
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

844
845
846

class BertLayer:
    def __init__(self, *args, **kwargs):
847
        requires_backends(self, ["torch"])
848
849
850
851


class BertLMHeadModel:
    def __init__(self, *args, **kwargs):
852
        requires_backends(self, ["torch"])
853
854

    @classmethod
855
856
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
857

858
859
860
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

861
862
863

class BertModel:
    def __init__(self, *args, **kwargs):
864
        requires_backends(self, ["torch"])
865
866

    @classmethod
867
868
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
869

870
871
872
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

873
874
875

class BertPreTrainedModel:
    def __init__(self, *args, **kwargs):
876
        requires_backends(self, ["torch"])
877
878

    @classmethod
879
880
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
881

882
883
884
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

885
886

def load_tf_weights_in_bert(*args, **kwargs):
887
    requires_backends(load_tf_weights_in_bert, ["torch"])
888
889
890
891


class BertGenerationDecoder:
    def __init__(self, *args, **kwargs):
892
        requires_backends(self, ["torch"])
893
894
895
896


class BertGenerationEncoder:
    def __init__(self, *args, **kwargs):
897
        requires_backends(self, ["torch"])
898
899


900
901
902
903
904
905
906
907
class BertGenerationPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

908
909
910
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

911

912
def load_tf_weights_in_bert_generation(*args, **kwargs):
913
    requires_backends(load_tf_weights_in_bert_generation, ["torch"])
914
915


Vasudev Gupta's avatar
Vasudev Gupta committed
916
917
918
919
920
BIG_BIRD_PRETRAINED_MODEL_ARCHIVE_LIST = None


class BigBirdForCausalLM:
    def __init__(self, *args, **kwargs):
921
        requires_backends(self, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
922

923
924
925
926
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

927
928
929
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Vasudev Gupta's avatar
Vasudev Gupta committed
930
931
932

class BigBirdForMaskedLM:
    def __init__(self, *args, **kwargs):
933
        requires_backends(self, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
934
935

    @classmethod
936
937
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
938

939
940
941
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Vasudev Gupta's avatar
Vasudev Gupta committed
942
943
944

class BigBirdForMultipleChoice:
    def __init__(self, *args, **kwargs):
945
        requires_backends(self, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
946
947

    @classmethod
948
949
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
950

951
952
953
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Vasudev Gupta's avatar
Vasudev Gupta committed
954
955
956

class BigBirdForPreTraining:
    def __init__(self, *args, **kwargs):
957
        requires_backends(self, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
958
959
960
961


class BigBirdForQuestionAnswering:
    def __init__(self, *args, **kwargs):
962
        requires_backends(self, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
963
964

    @classmethod
965
966
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
967

968
969
970
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Vasudev Gupta's avatar
Vasudev Gupta committed
971
972
973

class BigBirdForSequenceClassification:
    def __init__(self, *args, **kwargs):
974
        requires_backends(self, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
975
976

    @classmethod
977
978
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
979

980
981
982
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Vasudev Gupta's avatar
Vasudev Gupta committed
983
984
985

class BigBirdForTokenClassification:
    def __init__(self, *args, **kwargs):
986
        requires_backends(self, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
987
988

    @classmethod
989
990
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
991

992
993
994
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Vasudev Gupta's avatar
Vasudev Gupta committed
995
996
997

class BigBirdLayer:
    def __init__(self, *args, **kwargs):
998
        requires_backends(self, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
999
1000
1001
1002


class BigBirdModel:
    def __init__(self, *args, **kwargs):
1003
        requires_backends(self, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
1004
1005

    @classmethod
1006
1007
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
1008

1009
1010
1011
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Vasudev Gupta's avatar
Vasudev Gupta committed
1012
1013
1014

class BigBirdPreTrainedModel:
    def __init__(self, *args, **kwargs):
1015
        requires_backends(self, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
1016
1017

    @classmethod
1018
1019
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
1020

1021
1022
1023
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Vasudev Gupta's avatar
Vasudev Gupta committed
1024
1025

def load_tf_weights_in_big_bird(*args, **kwargs):
1026
    requires_backends(load_tf_weights_in_big_bird, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
1027
1028


Vasudev Gupta's avatar
Vasudev Gupta committed
1029
1030
1031
1032
1033
1034
1035
BIGBIRD_PEGASUS_PRETRAINED_MODEL_ARCHIVE_LIST = None


class BigBirdPegasusForCausalLM:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1036
1037
1038
1039
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1040
1041
1042
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Vasudev Gupta's avatar
Vasudev Gupta committed
1043
1044
1045
1046
1047
1048

class BigBirdPegasusForConditionalGeneration:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
1049
1050
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
1051

1052
1053
1054
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Vasudev Gupta's avatar
Vasudev Gupta committed
1055
1056
1057
1058
1059
1060

class BigBirdPegasusForQuestionAnswering:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
1061
1062
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
1063

1064
1065
1066
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Vasudev Gupta's avatar
Vasudev Gupta committed
1067
1068
1069
1070
1071
1072

class BigBirdPegasusForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
1073
1074
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
1075

1076
1077
1078
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Vasudev Gupta's avatar
Vasudev Gupta committed
1079
1080
1081
1082
1083
1084

class BigBirdPegasusModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
1085
1086
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Vasudev Gupta's avatar
Vasudev Gupta committed
1087

1088
1089
1090
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Vasudev Gupta's avatar
Vasudev Gupta committed
1091

1092
1093
1094
1095
1096
1097
1098
1099
class BigBirdPegasusPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1100
1101
1102
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1103

Sam Shleifer's avatar
Sam Shleifer committed
1104
1105
1106
BLENDERBOT_PRETRAINED_MODEL_ARCHIVE_LIST = None


1107
1108
class BlenderbotForCausalLM:
    def __init__(self, *args, **kwargs):
1109
        requires_backends(self, ["torch"])
1110

1111
1112
1113
1114
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1115
1116
1117
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1118

Sam Shleifer's avatar
Sam Shleifer committed
1119
1120
class BlenderbotForConditionalGeneration:
    def __init__(self, *args, **kwargs):
1121
        requires_backends(self, ["torch"])
Sam Shleifer's avatar
Sam Shleifer committed
1122
1123

    @classmethod
1124
1125
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sam Shleifer's avatar
Sam Shleifer committed
1126

1127
1128
1129
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sam Shleifer's avatar
Sam Shleifer committed
1130

1131
1132
class BlenderbotModel:
    def __init__(self, *args, **kwargs):
1133
        requires_backends(self, ["torch"])
1134
1135

    @classmethod
1136
1137
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1138

1139
1140
1141
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1142

1143
1144
1145
1146
1147
1148
1149
1150
class BlenderbotPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1151
1152
1153
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1154

1155
1156
1157
BLENDERBOT_SMALL_PRETRAINED_MODEL_ARCHIVE_LIST = None


1158
1159
class BlenderbotSmallForCausalLM:
    def __init__(self, *args, **kwargs):
1160
        requires_backends(self, ["torch"])
1161

1162
1163
1164
1165
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1166
1167
1168
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1169

1170
1171
class BlenderbotSmallForConditionalGeneration:
    def __init__(self, *args, **kwargs):
1172
        requires_backends(self, ["torch"])
1173
1174

    @classmethod
1175
1176
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1177

1178
1179
1180
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1181
1182
1183

class BlenderbotSmallModel:
    def __init__(self, *args, **kwargs):
1184
        requires_backends(self, ["torch"])
1185
1186

    @classmethod
1187
1188
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1189

1190
1191
1192
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1193

1194
1195
1196
1197
1198
1199
1200
1201
class BlenderbotSmallPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1202
1203
1204
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1205

1206
1207
1208
1209
1210
CAMEMBERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class CamembertForCausalLM:
    def __init__(self, *args, **kwargs):
1211
        requires_backends(self, ["torch"])
1212

1213
1214
1215
1216
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1217
1218
1219
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1220
1221
1222

class CamembertForMaskedLM:
    def __init__(self, *args, **kwargs):
1223
        requires_backends(self, ["torch"])
1224
1225

    @classmethod
1226
1227
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1228

1229
1230
1231
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1232
1233
1234

class CamembertForMultipleChoice:
    def __init__(self, *args, **kwargs):
1235
        requires_backends(self, ["torch"])
1236
1237

    @classmethod
1238
1239
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1240

1241
1242
1243
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1244
1245
1246

class CamembertForQuestionAnswering:
    def __init__(self, *args, **kwargs):
1247
        requires_backends(self, ["torch"])
1248
1249

    @classmethod
1250
1251
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1252

1253
1254
1255
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1256
1257
1258

class CamembertForSequenceClassification:
    def __init__(self, *args, **kwargs):
1259
        requires_backends(self, ["torch"])
1260
1261

    @classmethod
1262
1263
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1264

1265
1266
1267
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1268
1269
1270

class CamembertForTokenClassification:
    def __init__(self, *args, **kwargs):
1271
        requires_backends(self, ["torch"])
1272
1273

    @classmethod
1274
1275
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1276

1277
1278
1279
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1280
1281
1282

class CamembertModel:
    def __init__(self, *args, **kwargs):
Suraj Patil's avatar
Suraj Patil committed
1283
1284
1285
        requires_backends(self, ["torch"])

    @classmethod
1286
1287
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
1288

1289
1290
1291
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Suraj Patil's avatar
Suraj Patil committed
1292

NielsRogge's avatar
NielsRogge committed
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
CANINE_PRETRAINED_MODEL_ARCHIVE_LIST = None


class CanineForMultipleChoice:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1304
1305
1306
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
1307
1308
1309
1310
1311
1312
1313
1314
1315

class CanineForQuestionAnswering:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1316
1317
1318
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
1319
1320
1321
1322
1323
1324
1325
1326
1327

class CanineForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1328
1329
1330
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
1331
1332
1333
1334
1335
1336
1337
1338
1339

class CanineForTokenClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1340
1341
1342
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356

class CanineLayer:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class CanineModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1357
1358
1359
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
1360
1361
1362
1363
1364
1365
1366
1367
1368

class CaninePreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1369
1370
1371
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
1372
1373
1374
1375
1376

def load_tf_weights_in_canine(*args, **kwargs):
    requires_backends(load_tf_weights_in_canine, ["torch"])


Suraj Patil's avatar
Suraj Patil committed
1377
1378
1379
1380
1381
1382
1383
1384
CLIP_PRETRAINED_MODEL_ARCHIVE_LIST = None


class CLIPModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
1385
1386
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
1387

1388
1389
1390
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Suraj Patil's avatar
Suraj Patil committed
1391
1392
1393
1394
1395
1396

class CLIPPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
1397
1398
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
1399

1400
1401
1402
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Suraj Patil's avatar
Suraj Patil committed
1403
1404
1405
1406
1407
1408

class CLIPTextModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
1409
1410
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
1411

1412
1413
1414
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Suraj Patil's avatar
Suraj Patil committed
1415
1416
1417

class CLIPVisionModel:
    def __init__(self, *args, **kwargs):
1418
        requires_backends(self, ["torch"])
1419
1420

    @classmethod
1421
1422
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1423

1424
1425
1426
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1427

abhishek thakur's avatar
abhishek thakur committed
1428
1429
1430
1431
1432
CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class ConvBertForMaskedLM:
    def __init__(self, *args, **kwargs):
1433
        requires_backends(self, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1434
1435

    @classmethod
1436
1437
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1438

1439
1440
1441
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

abhishek thakur's avatar
abhishek thakur committed
1442
1443
1444

class ConvBertForMultipleChoice:
    def __init__(self, *args, **kwargs):
1445
        requires_backends(self, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1446
1447

    @classmethod
1448
1449
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1450

1451
1452
1453
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

abhishek thakur's avatar
abhishek thakur committed
1454
1455
1456

class ConvBertForQuestionAnswering:
    def __init__(self, *args, **kwargs):
1457
        requires_backends(self, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1458
1459

    @classmethod
1460
1461
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1462

1463
1464
1465
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

abhishek thakur's avatar
abhishek thakur committed
1466
1467
1468

class ConvBertForSequenceClassification:
    def __init__(self, *args, **kwargs):
1469
        requires_backends(self, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1470
1471

    @classmethod
1472
1473
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1474

1475
1476
1477
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

abhishek thakur's avatar
abhishek thakur committed
1478
1479
1480

class ConvBertForTokenClassification:
    def __init__(self, *args, **kwargs):
1481
        requires_backends(self, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1482
1483

    @classmethod
1484
1485
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1486

1487
1488
1489
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

abhishek thakur's avatar
abhishek thakur committed
1490
1491
1492

class ConvBertLayer:
    def __init__(self, *args, **kwargs):
1493
        requires_backends(self, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1494
1495
1496
1497


class ConvBertModel:
    def __init__(self, *args, **kwargs):
1498
        requires_backends(self, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1499
1500

    @classmethod
1501
1502
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1503

1504
1505
1506
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

abhishek thakur's avatar
abhishek thakur committed
1507
1508
1509

class ConvBertPreTrainedModel:
    def __init__(self, *args, **kwargs):
1510
        requires_backends(self, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1511
1512

    @classmethod
1513
1514
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1515

1516
1517
1518
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

abhishek thakur's avatar
abhishek thakur committed
1519
1520

def load_tf_weights_in_convbert(*args, **kwargs):
1521
    requires_backends(load_tf_weights_in_convbert, ["torch"])
abhishek thakur's avatar
abhishek thakur committed
1522
1523


1524
1525
1526
CTRL_PRETRAINED_MODEL_ARCHIVE_LIST = None


1527
1528
class CTRLForSequenceClassification:
    def __init__(self, *args, **kwargs):
1529
        requires_backends(self, ["torch"])
1530
1531

    @classmethod
1532
1533
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1534

1535
1536
1537
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1538

1539
1540
class CTRLLMHeadModel:
    def __init__(self, *args, **kwargs):
1541
        requires_backends(self, ["torch"])
1542
1543

    @classmethod
1544
1545
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1546

1547
1548
1549
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1550
1551
1552

class CTRLModel:
    def __init__(self, *args, **kwargs):
1553
        requires_backends(self, ["torch"])
1554
1555

    @classmethod
1556
1557
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1558

1559
1560
1561
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1562
1563
1564

class CTRLPreTrainedModel:
    def __init__(self, *args, **kwargs):
1565
        requires_backends(self, ["torch"])
1566
1567

    @classmethod
1568
1569
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1570

1571
1572
1573
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1574
1575
1576
1577

DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST = None


NielsRogge's avatar
NielsRogge committed
1578
1579
class DebertaForMaskedLM:
    def __init__(self, *args, **kwargs):
1580
        requires_backends(self, ["torch"])
NielsRogge's avatar
NielsRogge committed
1581
1582

    @classmethod
1583
1584
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
NielsRogge's avatar
NielsRogge committed
1585

1586
1587
1588
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
1589
1590
1591

class DebertaForQuestionAnswering:
    def __init__(self, *args, **kwargs):
1592
        requires_backends(self, ["torch"])
NielsRogge's avatar
NielsRogge committed
1593
1594

    @classmethod
1595
1596
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
NielsRogge's avatar
NielsRogge committed
1597

1598
1599
1600
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
1601

1602
1603
class DebertaForSequenceClassification:
    def __init__(self, *args, **kwargs):
1604
        requires_backends(self, ["torch"])
1605
1606

    @classmethod
1607
1608
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1609

1610
1611
1612
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1613

NielsRogge's avatar
NielsRogge committed
1614
1615
class DebertaForTokenClassification:
    def __init__(self, *args, **kwargs):
1616
        requires_backends(self, ["torch"])
NielsRogge's avatar
NielsRogge committed
1617
1618

    @classmethod
1619
1620
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
NielsRogge's avatar
NielsRogge committed
1621

1622
1623
1624
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
1625

1626
1627
class DebertaModel:
    def __init__(self, *args, **kwargs):
1628
        requires_backends(self, ["torch"])
1629
1630

    @classmethod
1631
1632
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1633

1634
1635
1636
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1637
1638
1639

class DebertaPreTrainedModel:
    def __init__(self, *args, **kwargs):
1640
        requires_backends(self, ["torch"])
1641
1642

    @classmethod
1643
1644
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1645

1646
1647
1648
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1649

1650
1651
1652
1653
1654
DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST = None


class DebertaV2ForMaskedLM:
    def __init__(self, *args, **kwargs):
1655
        requires_backends(self, ["torch"])
1656
1657

    @classmethod
1658
1659
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1660

1661
1662
1663
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1664
1665
1666

class DebertaV2ForQuestionAnswering:
    def __init__(self, *args, **kwargs):
1667
        requires_backends(self, ["torch"])
1668
1669

    @classmethod
1670
1671
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1672

1673
1674
1675
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1676
1677
1678

class DebertaV2ForSequenceClassification:
    def __init__(self, *args, **kwargs):
1679
        requires_backends(self, ["torch"])
1680
1681

    @classmethod
1682
1683
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1684

1685
1686
1687
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1688
1689
1690

class DebertaV2ForTokenClassification:
    def __init__(self, *args, **kwargs):
1691
        requires_backends(self, ["torch"])
1692
1693

    @classmethod
1694
1695
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1696

1697
1698
1699
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1700
1701
1702

class DebertaV2Model:
    def __init__(self, *args, **kwargs):
1703
        requires_backends(self, ["torch"])
1704
1705

    @classmethod
1706
1707
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1708

1709
1710
1711
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1712
1713

class DebertaV2PreTrainedModel:
NielsRogge's avatar
NielsRogge committed
1714
1715
1716
1717
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
1718
1719
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
NielsRogge's avatar
NielsRogge committed
1720

1721
1722
1723
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742

DEIT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class DeiTForImageClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class DeiTForImageClassificationWithTeacher:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class DeiTModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
1743
1744
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
NielsRogge's avatar
NielsRogge committed
1745

1746
1747
1748
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
1749
1750

class DeiTPreTrainedModel:
1751
    def __init__(self, *args, **kwargs):
1752
        requires_backends(self, ["torch"])
1753
1754

    @classmethod
1755
1756
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1757

1758
1759
1760
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1761

1762
1763
1764
1765
1766
DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class DistilBertForMaskedLM:
    def __init__(self, *args, **kwargs):
1767
        requires_backends(self, ["torch"])
1768
1769

    @classmethod
1770
1771
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1772

1773
1774
1775
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1776
1777
1778

class DistilBertForMultipleChoice:
    def __init__(self, *args, **kwargs):
1779
        requires_backends(self, ["torch"])
1780
1781

    @classmethod
1782
1783
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1784

1785
1786
1787
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1788
1789
1790

class DistilBertForQuestionAnswering:
    def __init__(self, *args, **kwargs):
1791
        requires_backends(self, ["torch"])
1792
1793

    @classmethod
1794
1795
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1796

1797
1798
1799
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1800
1801
1802

class DistilBertForSequenceClassification:
    def __init__(self, *args, **kwargs):
1803
        requires_backends(self, ["torch"])
1804
1805

    @classmethod
1806
1807
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1808

1809
1810
1811
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1812
1813
1814

class DistilBertForTokenClassification:
    def __init__(self, *args, **kwargs):
1815
        requires_backends(self, ["torch"])
1816
1817

    @classmethod
1818
1819
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1820

1821
1822
1823
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1824
1825
1826

class DistilBertModel:
    def __init__(self, *args, **kwargs):
1827
        requires_backends(self, ["torch"])
1828
1829

    @classmethod
1830
1831
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1832

1833
1834
1835
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1836
1837
1838

class DistilBertPreTrainedModel:
    def __init__(self, *args, **kwargs):
1839
        requires_backends(self, ["torch"])
1840
1841

    @classmethod
1842
1843
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1844

1845
1846
1847
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1848

Ratthachat (Jung)'s avatar
Ratthachat (Jung) committed
1849
1850
1851
1852
1853
1854
1855
1856
1857
DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST = None


DPR_QUESTION_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST = None


DPR_READER_PRETRAINED_MODEL_ARCHIVE_LIST = None


1858
1859
class DPRContextEncoder:
    def __init__(self, *args, **kwargs):
1860
        requires_backends(self, ["torch"])
1861
1862
1863
1864


class DPRPretrainedContextEncoder:
    def __init__(self, *args, **kwargs):
1865
        requires_backends(self, ["torch"])
1866
1867


1868
1869
1870
1871
1872
1873
1874
1875
class DPRPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

1876
1877
1878
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1879

1880
1881
class DPRPretrainedQuestionEncoder:
    def __init__(self, *args, **kwargs):
1882
        requires_backends(self, ["torch"])
1883
1884
1885
1886


class DPRPretrainedReader:
    def __init__(self, *args, **kwargs):
1887
        requires_backends(self, ["torch"])
1888
1889
1890
1891


class DPRQuestionEncoder:
    def __init__(self, *args, **kwargs):
1892
        requires_backends(self, ["torch"])
1893
1894
1895
1896


class DPRReader:
    def __init__(self, *args, **kwargs):
1897
        requires_backends(self, ["torch"])
1898
1899
1900
1901
1902
1903
1904


ELECTRA_PRETRAINED_MODEL_ARCHIVE_LIST = None


class ElectraForMaskedLM:
    def __init__(self, *args, **kwargs):
1905
        requires_backends(self, ["torch"])
1906
1907

    @classmethod
1908
1909
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1910

1911
1912
1913
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1914
1915
1916

class ElectraForMultipleChoice:
    def __init__(self, *args, **kwargs):
1917
        requires_backends(self, ["torch"])
1918
1919

    @classmethod
1920
1921
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1922

1923
1924
1925
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1926
1927
1928

class ElectraForPreTraining:
    def __init__(self, *args, **kwargs):
1929
        requires_backends(self, ["torch"])
1930
1931
1932
1933


class ElectraForQuestionAnswering:
    def __init__(self, *args, **kwargs):
1934
        requires_backends(self, ["torch"])
1935
1936

    @classmethod
1937
1938
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1939

1940
1941
1942
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1943
1944
1945

class ElectraForSequenceClassification:
    def __init__(self, *args, **kwargs):
1946
        requires_backends(self, ["torch"])
1947
1948

    @classmethod
1949
1950
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1951

1952
1953
1954
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1955
1956
1957

class ElectraForTokenClassification:
    def __init__(self, *args, **kwargs):
1958
        requires_backends(self, ["torch"])
1959
1960

    @classmethod
1961
1962
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1963

1964
1965
1966
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1967
1968
1969

class ElectraModel:
    def __init__(self, *args, **kwargs):
1970
        requires_backends(self, ["torch"])
1971
1972

    @classmethod
1973
1974
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1975

1976
1977
1978
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1979
1980
1981

class ElectraPreTrainedModel:
    def __init__(self, *args, **kwargs):
1982
        requires_backends(self, ["torch"])
1983
1984

    @classmethod
1985
1986
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
1987

1988
1989
1990
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

1991
1992

def load_tf_weights_in_electra(*args, **kwargs):
1993
    requires_backends(load_tf_weights_in_electra, ["torch"])
1994
1995
1996
1997


class EncoderDecoderModel:
    def __init__(self, *args, **kwargs):
1998
        requires_backends(self, ["torch"])
1999
2000

    @classmethod
2001
2002
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2003

2004
2005
2006
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2007
2008
2009
2010
2011
2012

FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class FlaubertForMultipleChoice:
    def __init__(self, *args, **kwargs):
2013
        requires_backends(self, ["torch"])
2014
2015

    @classmethod
2016
2017
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2018

2019
2020
2021
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2022
2023
2024

class FlaubertForQuestionAnswering:
    def __init__(self, *args, **kwargs):
2025
        requires_backends(self, ["torch"])
2026
2027

    @classmethod
2028
2029
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2030

2031
2032
2033
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2034
2035
2036

class FlaubertForQuestionAnsweringSimple:
    def __init__(self, *args, **kwargs):
2037
        requires_backends(self, ["torch"])
2038
2039

    @classmethod
2040
2041
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2042

2043
2044
2045
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2046
2047
2048

class FlaubertForSequenceClassification:
    def __init__(self, *args, **kwargs):
2049
        requires_backends(self, ["torch"])
2050
2051

    @classmethod
2052
2053
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2054

2055
2056
2057
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2058
2059
2060

class FlaubertForTokenClassification:
    def __init__(self, *args, **kwargs):
2061
        requires_backends(self, ["torch"])
2062
2063

    @classmethod
2064
2065
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2066

2067
2068
2069
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2070
2071
2072

class FlaubertModel:
    def __init__(self, *args, **kwargs):
2073
        requires_backends(self, ["torch"])
2074
2075

    @classmethod
2076
2077
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2078

2079
2080
2081
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2082
2083
2084

class FlaubertWithLMHeadModel:
    def __init__(self, *args, **kwargs):
2085
        requires_backends(self, ["torch"])
2086
2087

    @classmethod
2088
2089
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2090

2091
2092
2093
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2094

Gunjan Chhablani's avatar
Gunjan Chhablani committed
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
FNET_PRETRAINED_MODEL_ARCHIVE_LIST = None


class FNetForMaskedLM:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2106
2107
2108
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Gunjan Chhablani's avatar
Gunjan Chhablani committed
2109
2110
2111
2112
2113
2114
2115
2116
2117

class FNetForMultipleChoice:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2118
2119
2120
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Gunjan Chhablani's avatar
Gunjan Chhablani committed
2121
2122
2123
2124
2125

class FNetForNextSentencePrediction:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2126
2127
2128
2129
2130
2131
2132
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Gunjan Chhablani's avatar
Gunjan Chhablani committed
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146

class FNetForPreTraining:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class FNetForQuestionAnswering:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2147
2148
2149
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Gunjan Chhablani's avatar
Gunjan Chhablani committed
2150
2151
2152
2153
2154
2155
2156
2157
2158

class FNetForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2159
2160
2161
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Gunjan Chhablani's avatar
Gunjan Chhablani committed
2162
2163
2164
2165
2166
2167
2168
2169
2170

class FNetForTokenClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2171
2172
2173
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Gunjan Chhablani's avatar
Gunjan Chhablani committed
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187

class FNetLayer:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class FNetModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2188
2189
2190
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Gunjan Chhablani's avatar
Gunjan Chhablani committed
2191
2192
2193
2194
2195
2196
2197
2198
2199

class FNetPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2200
2201
2202
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Gunjan Chhablani's avatar
Gunjan Chhablani committed
2203

2204
2205
class FSMTForConditionalGeneration:
    def __init__(self, *args, **kwargs):
2206
        requires_backends(self, ["torch"])
2207
2208

    @classmethod
2209
2210
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2211

2212
2213
2214
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2215
2216
2217

class FSMTModel:
    def __init__(self, *args, **kwargs):
2218
        requires_backends(self, ["torch"])
2219
2220

    @classmethod
2221
2222
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2223

2224
2225
2226
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2227
2228
2229

class PretrainedFSMTModel:
    def __init__(self, *args, **kwargs):
2230
        requires_backends(self, ["torch"])
2231
2232

    @classmethod
2233
2234
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2235

2236
2237
2238
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2239
2240
2241
2242
2243
2244

FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST = None


class FunnelBaseModel:
    def __init__(self, *args, **kwargs):
2245
        requires_backends(self, ["torch"])
2246
2247

    @classmethod
2248
2249
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2250

2251
2252
2253
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2254
2255
2256

class FunnelForMaskedLM:
    def __init__(self, *args, **kwargs):
2257
        requires_backends(self, ["torch"])
2258
2259

    @classmethod
2260
2261
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2262

2263
2264
2265
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2266
2267
2268

class FunnelForMultipleChoice:
    def __init__(self, *args, **kwargs):
2269
        requires_backends(self, ["torch"])
2270
2271

    @classmethod
2272
2273
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2274

2275
2276
2277
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2278
2279
2280

class FunnelForPreTraining:
    def __init__(self, *args, **kwargs):
2281
        requires_backends(self, ["torch"])
2282
2283
2284
2285


class FunnelForQuestionAnswering:
    def __init__(self, *args, **kwargs):
2286
        requires_backends(self, ["torch"])
2287
2288

    @classmethod
2289
2290
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2291

2292
2293
2294
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2295
2296
2297

class FunnelForSequenceClassification:
    def __init__(self, *args, **kwargs):
2298
        requires_backends(self, ["torch"])
2299
2300

    @classmethod
2301
2302
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2303

2304
2305
2306
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2307
2308
2309

class FunnelForTokenClassification:
    def __init__(self, *args, **kwargs):
2310
        requires_backends(self, ["torch"])
2311
2312

    @classmethod
2313
2314
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2315

2316
2317
2318
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2319
2320
2321

class FunnelModel:
    def __init__(self, *args, **kwargs):
2322
        requires_backends(self, ["torch"])
2323
2324

    @classmethod
2325
2326
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2327

2328
2329
2330
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2331

2332
2333
2334
2335
2336
2337
2338
2339
class FunnelPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2340
2341
2342
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2343

2344
def load_tf_weights_in_funnel(*args, **kwargs):
2345
    requires_backends(load_tf_weights_in_funnel, ["torch"])
2346
2347
2348
2349
2350
2351
2352


GPT2_PRETRAINED_MODEL_ARCHIVE_LIST = None


class GPT2DoubleHeadsModel:
    def __init__(self, *args, **kwargs):
2353
        requires_backends(self, ["torch"])
2354
2355

    @classmethod
2356
2357
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2358

2359
2360
2361
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2362

Lysandre's avatar
Lysandre committed
2363
2364
class GPT2ForSequenceClassification:
    def __init__(self, *args, **kwargs):
2365
        requires_backends(self, ["torch"])
Lysandre's avatar
Lysandre committed
2366
2367

    @classmethod
2368
2369
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Lysandre's avatar
Lysandre committed
2370

2371
2372
2373
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Lysandre's avatar
Lysandre committed
2374

2375
2376
2377
2378
2379
2380
2381
2382
class GPT2ForTokenClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2383
2384
2385
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2386

2387
2388
class GPT2LMHeadModel:
    def __init__(self, *args, **kwargs):
2389
        requires_backends(self, ["torch"])
2390
2391

    @classmethod
2392
2393
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2394

2395
2396
2397
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2398
2399
2400

class GPT2Model:
    def __init__(self, *args, **kwargs):
2401
        requires_backends(self, ["torch"])
2402
2403

    @classmethod
2404
2405
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2406

2407
2408
2409
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2410
2411
2412

class GPT2PreTrainedModel:
    def __init__(self, *args, **kwargs):
2413
        requires_backends(self, ["torch"])
2414
2415

    @classmethod
2416
2417
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2418

2419
2420
2421
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2422
2423

def load_tf_weights_in_gpt2(*args, **kwargs):
2424
    requires_backends(load_tf_weights_in_gpt2, ["torch"])
2425
2426


Suraj Patil's avatar
Suraj Patil committed
2427
2428
2429
2430
2431
GPT_NEO_PRETRAINED_MODEL_ARCHIVE_LIST = None


class GPTNeoForCausalLM:
    def __init__(self, *args, **kwargs):
2432
        requires_backends(self, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
2433

2434
2435
2436
2437
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2438
2439
2440
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Suraj Patil's avatar
Suraj Patil committed
2441

2442
2443
2444
2445
2446
class GPTNeoForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
2447
2448
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2449

2450
2451
2452
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2453

Suraj Patil's avatar
Suraj Patil committed
2454
2455
class GPTNeoModel:
    def __init__(self, *args, **kwargs):
2456
        requires_backends(self, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
2457
2458

    @classmethod
2459
2460
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
2461

2462
2463
2464
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Suraj Patil's avatar
Suraj Patil committed
2465
2466
2467

class GPTNeoPreTrainedModel:
    def __init__(self, *args, **kwargs):
2468
        requires_backends(self, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
2469
2470

    @classmethod
2471
2472
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
2473

2474
2475
2476
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Suraj Patil's avatar
Suraj Patil committed
2477
2478

def load_tf_weights_in_gpt_neo(*args, **kwargs):
2479
    requires_backends(load_tf_weights_in_gpt_neo, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
2480
2481


Stella Biderman's avatar
Stella Biderman committed
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
GPTJ_PRETRAINED_MODEL_ARCHIVE_LIST = None


class GPTJForCausalLM:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2493
2494
2495
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Stella Biderman's avatar
Stella Biderman committed
2496

2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
class GPTJForQuestionAnswering:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])


Stella Biderman's avatar
Stella Biderman committed
2509
2510
2511
2512
2513
2514
2515
2516
class GPTJForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2517
2518
2519
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Stella Biderman's avatar
Stella Biderman committed
2520
2521
2522
2523
2524
2525
2526
2527
2528

class GPTJModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2529
2530
2531
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Stella Biderman's avatar
Stella Biderman committed
2532
2533
2534
2535
2536
2537
2538
2539
2540

class GPTJPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2541
2542
2543
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Stella Biderman's avatar
Stella Biderman committed
2544

Patrick von Platen's avatar
Patrick von Platen committed
2545
2546
2547
2548
2549
2550
2551
2552
HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class HubertForCTC:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


2553
2554
2555
2556
2557
2558
2559
2560
class HubertForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2561
2562
2563
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2564

Patrick von Platen's avatar
Patrick von Platen committed
2565
2566
2567
2568
2569
2570
2571
2572
class HubertModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2573
2574
2575
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Patrick von Platen's avatar
Patrick von Platen committed
2576
2577
2578
2579
2580
2581
2582
2583
2584

class HubertPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2585
2586
2587
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Patrick von Platen's avatar
Patrick von Platen committed
2588

Sehoon Kim's avatar
Sehoon Kim committed
2589
2590
2591
2592
2593
IBERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class IBertForMaskedLM:
    def __init__(self, *args, **kwargs):
2594
        requires_backends(self, ["torch"])
Sehoon Kim's avatar
Sehoon Kim committed
2595
2596

    @classmethod
2597
2598
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sehoon Kim's avatar
Sehoon Kim committed
2599

2600
2601
2602
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sehoon Kim's avatar
Sehoon Kim committed
2603
2604
2605

class IBertForMultipleChoice:
    def __init__(self, *args, **kwargs):
2606
        requires_backends(self, ["torch"])
Sehoon Kim's avatar
Sehoon Kim committed
2607
2608

    @classmethod
2609
2610
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sehoon Kim's avatar
Sehoon Kim committed
2611

2612
2613
2614
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sehoon Kim's avatar
Sehoon Kim committed
2615
2616
2617

class IBertForQuestionAnswering:
    def __init__(self, *args, **kwargs):
2618
        requires_backends(self, ["torch"])
Sehoon Kim's avatar
Sehoon Kim committed
2619
2620

    @classmethod
2621
2622
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sehoon Kim's avatar
Sehoon Kim committed
2623

2624
2625
2626
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sehoon Kim's avatar
Sehoon Kim committed
2627
2628
2629

class IBertForSequenceClassification:
    def __init__(self, *args, **kwargs):
2630
        requires_backends(self, ["torch"])
Sehoon Kim's avatar
Sehoon Kim committed
2631
2632

    @classmethod
2633
2634
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sehoon Kim's avatar
Sehoon Kim committed
2635

2636
2637
2638
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sehoon Kim's avatar
Sehoon Kim committed
2639
2640
2641

class IBertForTokenClassification:
    def __init__(self, *args, **kwargs):
2642
        requires_backends(self, ["torch"])
Sehoon Kim's avatar
Sehoon Kim committed
2643
2644

    @classmethod
2645
2646
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sehoon Kim's avatar
Sehoon Kim committed
2647

2648
2649
2650
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sehoon Kim's avatar
Sehoon Kim committed
2651
2652
2653

class IBertModel:
    def __init__(self, *args, **kwargs):
2654
        requires_backends(self, ["torch"])
Sehoon Kim's avatar
Sehoon Kim committed
2655
2656

    @classmethod
2657
2658
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sehoon Kim's avatar
Sehoon Kim committed
2659

2660
2661
2662
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sehoon Kim's avatar
Sehoon Kim committed
2663

2664
2665
class IBertPreTrainedModel:
    def __init__(self, *args, **kwargs):
2666
        requires_backends(self, ["torch"])
2667
2668

    @classmethod
2669
2670
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2671

2672
2673
2674
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2675

NielsRogge's avatar
NielsRogge committed
2676
2677
2678
IMAGEGPT_PRETRAINED_MODEL_ARCHIVE_LIST = None


NielsRogge's avatar
NielsRogge committed
2679
class ImageGPTForCausalImageModeling:
NielsRogge's avatar
NielsRogge committed
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class ImageGPTForImageClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class ImageGPTModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class ImageGPTPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])


def load_tf_weights_in_imagegpt(*args, **kwargs):
    requires_backends(load_tf_weights_in_imagegpt, ["torch"])


2724
2725
2726
2727
2728
LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST = None


class LayoutLMForMaskedLM:
    def __init__(self, *args, **kwargs):
2729
        requires_backends(self, ["torch"])
NielsRogge's avatar
NielsRogge committed
2730
2731

    @classmethod
2732
2733
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
NielsRogge's avatar
NielsRogge committed
2734

2735
2736
2737
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
2738
2739
2740

class LayoutLMForSequenceClassification:
    def __init__(self, *args, **kwargs):
2741
        requires_backends(self, ["torch"])
2742
2743

    @classmethod
2744
2745
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2746

2747
2748
2749
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2750
2751
2752

class LayoutLMForTokenClassification:
    def __init__(self, *args, **kwargs):
2753
        requires_backends(self, ["torch"])
2754
2755

    @classmethod
2756
2757
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2758

2759
2760
2761
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2762
2763
2764

class LayoutLMModel:
    def __init__(self, *args, **kwargs):
2765
        requires_backends(self, ["torch"])
2766
2767

    @classmethod
2768
2769
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2770

2771
2772
2773
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2774

2775
2776
2777
2778
2779
2780
2781
2782
class LayoutLMPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2783
2784
2785
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2786

2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
LAYOUTLMV2_PRETRAINED_MODEL_ARCHIVE_LIST = None


class LayoutLMv2ForQuestionAnswering:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2798
2799
2800
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2801
2802
2803
2804
2805
2806
2807
2808
2809

class LayoutLMv2ForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2810
2811
2812
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2813
2814
2815
2816
2817
2818
2819
2820
2821

class LayoutLMv2ForTokenClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2822
2823
2824
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2825
2826
2827
2828
2829
2830
2831
2832
2833

class LayoutLMv2Model:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2834
2835
2836
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2837
2838
2839
2840
2841
2842
2843
2844
2845

class LayoutLMv2PreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2846
2847
2848
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2849

Patrick von Platen's avatar
Patrick von Platen committed
2850
2851
2852
2853
2854
LED_PRETRAINED_MODEL_ARCHIVE_LIST = None


class LEDForConditionalGeneration:
    def __init__(self, *args, **kwargs):
2855
        requires_backends(self, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
2856
2857

    @classmethod
2858
2859
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
2860

2861
2862
2863
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Patrick von Platen's avatar
Patrick von Platen committed
2864
2865
2866

class LEDForQuestionAnswering:
    def __init__(self, *args, **kwargs):
2867
        requires_backends(self, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
2868
2869

    @classmethod
2870
2871
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
2872

2873
2874
2875
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Patrick von Platen's avatar
Patrick von Platen committed
2876
2877
2878

class LEDForSequenceClassification:
    def __init__(self, *args, **kwargs):
2879
        requires_backends(self, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
2880
2881

    @classmethod
2882
2883
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
2884

2885
2886
2887
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Patrick von Platen's avatar
Patrick von Platen committed
2888
2889
2890

class LEDModel:
    def __init__(self, *args, **kwargs):
2891
        requires_backends(self, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
2892
2893

    @classmethod
2894
2895
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
2896

2897
2898
2899
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Patrick von Platen's avatar
Patrick von Platen committed
2900

2901
2902
2903
2904
2905
2906
2907
2908
class LEDPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2909
2910
2911
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2912

2913
2914
2915
2916
2917
LONGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST = None


class LongformerForMaskedLM:
    def __init__(self, *args, **kwargs):
2918
        requires_backends(self, ["torch"])
2919
2920

    @classmethod
2921
2922
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2923

2924
2925
2926
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2927
2928
2929

class LongformerForMultipleChoice:
    def __init__(self, *args, **kwargs):
2930
        requires_backends(self, ["torch"])
2931
2932

    @classmethod
2933
2934
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2935

2936
2937
2938
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2939
2940
2941

class LongformerForQuestionAnswering:
    def __init__(self, *args, **kwargs):
2942
        requires_backends(self, ["torch"])
2943
2944

    @classmethod
2945
2946
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2947

2948
2949
2950
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2951
2952
2953

class LongformerForSequenceClassification:
    def __init__(self, *args, **kwargs):
2954
        requires_backends(self, ["torch"])
2955
2956

    @classmethod
2957
2958
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2959

2960
2961
2962
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2963
2964
2965

class LongformerForTokenClassification:
    def __init__(self, *args, **kwargs):
2966
        requires_backends(self, ["torch"])
2967
2968

    @classmethod
2969
2970
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2971

2972
2973
2974
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2975
2976
2977

class LongformerModel:
    def __init__(self, *args, **kwargs):
2978
        requires_backends(self, ["torch"])
2979
2980

    @classmethod
2981
2982
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
2983

2984
2985
2986
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2987

2988
2989
2990
2991
2992
2993
2994
2995
class LongformerPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

2996
2997
2998
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

2999

3000
3001
class LongformerSelfAttention:
    def __init__(self, *args, **kwargs):
3002
        requires_backends(self, ["torch"])
3003
3004


NielsRogge's avatar
NielsRogge committed
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
LUKE_PRETRAINED_MODEL_ARCHIVE_LIST = None


class LukeForEntityClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class LukeForEntityPairClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class LukeForEntitySpanClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])
Ryokan RI's avatar
Ryokan RI committed
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032


class LukeForMaskedLM:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])
NielsRogge's avatar
NielsRogge committed
3033
3034
3035
3036
3037
3038
3039


class LukeModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
3040
3041
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
NielsRogge's avatar
NielsRogge committed
3042

3043
3044
3045
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
3046
3047
3048
3049
3050
3051

class LukePreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
3052
3053
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
NielsRogge's avatar
NielsRogge committed
3054

3055
3056
3057
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
3058

3059
3060
class LxmertEncoder:
    def __init__(self, *args, **kwargs):
3061
        requires_backends(self, ["torch"])
3062
3063
3064
3065


class LxmertForPreTraining:
    def __init__(self, *args, **kwargs):
3066
        requires_backends(self, ["torch"])
3067
3068
3069
3070


class LxmertForQuestionAnswering:
    def __init__(self, *args, **kwargs):
3071
        requires_backends(self, ["torch"])
3072
3073

    @classmethod
3074
3075
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3076

3077
3078
3079
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3080
3081
3082

class LxmertModel:
    def __init__(self, *args, **kwargs):
3083
        requires_backends(self, ["torch"])
3084
3085

    @classmethod
3086
3087
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3088

3089
3090
3091
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3092
3093
3094

class LxmertPreTrainedModel:
    def __init__(self, *args, **kwargs):
3095
        requires_backends(self, ["torch"])
3096
3097

    @classmethod
3098
3099
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3100

3101
3102
3103
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3104
3105
3106

class LxmertVisualFeatureEncoder:
    def __init__(self, *args, **kwargs):
3107
        requires_backends(self, ["torch"])
3108
3109
3110
3111


class LxmertXLayer:
    def __init__(self, *args, **kwargs):
3112
        requires_backends(self, ["torch"])
3113
3114


Suraj Patil's avatar
Suraj Patil committed
3115
3116
3117
3118
3119
M2M_100_PRETRAINED_MODEL_ARCHIVE_LIST = None


class M2M100ForConditionalGeneration:
    def __init__(self, *args, **kwargs):
3120
        requires_backends(self, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
3121
3122

    @classmethod
3123
3124
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
3125

3126
3127
3128
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Suraj Patil's avatar
Suraj Patil committed
3129
3130
3131

class M2M100Model:
    def __init__(self, *args, **kwargs):
3132
        requires_backends(self, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
3133
3134

    @classmethod
3135
3136
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
3137

3138
3139
3140
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Suraj Patil's avatar
Suraj Patil committed
3141

3142
3143
3144
3145
3146
3147
3148
3149
class M2M100PreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

3150
3151
3152
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3153

3154
3155
class MarianForCausalLM:
    def __init__(self, *args, **kwargs):
3156
        requires_backends(self, ["torch"])
3157

3158
3159
3160
3161
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

3162
3163
3164
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3165

3166
3167
class MarianModel:
    def __init__(self, *args, **kwargs):
3168
        requires_backends(self, ["torch"])
3169
3170

    @classmethod
3171
3172
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3173

3174
3175
3176
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3177

3178
3179
class MarianMTModel:
    def __init__(self, *args, **kwargs):
3180
        requires_backends(self, ["torch"])
3181
3182

    @classmethod
3183
3184
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3185

3186
3187
3188
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3189

3190
3191
class MBartForCausalLM:
    def __init__(self, *args, **kwargs):
3192
        requires_backends(self, ["torch"])
3193

3194
3195
3196
3197
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

3198
3199
3200
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3201

3202
3203
class MBartForConditionalGeneration:
    def __init__(self, *args, **kwargs):
3204
        requires_backends(self, ["torch"])
3205
3206

    @classmethod
3207
3208
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3209

3210
3211
3212
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3213

3214
3215
class MBartForQuestionAnswering:
    def __init__(self, *args, **kwargs):
3216
        requires_backends(self, ["torch"])
3217
3218

    @classmethod
3219
3220
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3221

3222
3223
3224
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3225
3226
3227

class MBartForSequenceClassification:
    def __init__(self, *args, **kwargs):
3228
        requires_backends(self, ["torch"])
3229
3230

    @classmethod
3231
3232
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3233

3234
3235
3236
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3237

3238
3239
class MBartModel:
    def __init__(self, *args, **kwargs):
3240
        requires_backends(self, ["torch"])
3241
3242

    @classmethod
3243
3244
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3245

3246
3247
3248
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3249

3250
3251
3252
3253
3254
3255
3256
3257
class MBartPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

3258
3259
3260
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3261

3262
3263
3264
3265
3266
3267
3268
MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class MegatronBertForCausalLM:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3269
3270
3271
3272
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

3273
3274
3275
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3276
3277
3278
3279
3280
3281

class MegatronBertForMaskedLM:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
3282
3283
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3284

3285
3286
3287
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3288
3289
3290
3291
3292
3293

class MegatronBertForMultipleChoice:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
3294
3295
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3296

3297
3298
3299
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3300
3301
3302
3303
3304

class MegatronBertForNextSentencePrediction:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3305
3306
3307
3308
3309
3310
3311
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322

class MegatronBertForPreTraining:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class MegatronBertForQuestionAnswering:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
3323
3324
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3325

3326
3327
3328
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3329
3330
3331
3332
3333
3334

class MegatronBertForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
3335
3336
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3337

3338
3339
3340
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3341
3342
3343
3344
3345
3346

class MegatronBertForTokenClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
3347
3348
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3349

3350
3351
3352
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3353
3354
3355
3356
3357
3358

class MegatronBertModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
3359
3360
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3361

3362
3363
3364
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3365

3366
3367
3368
3369
3370
3371
3372
3373
class MegatronBertPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

3374
3375
3376
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3377

3378
3379
class MMBTForClassification:
    def __init__(self, *args, **kwargs):
3380
        requires_backends(self, ["torch"])
3381
3382
3383
3384


class MMBTModel:
    def __init__(self, *args, **kwargs):
3385
        requires_backends(self, ["torch"])
3386
3387

    @classmethod
3388
3389
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3390

3391
3392
3393
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3394
3395
3396

class ModalEmbeddings:
    def __init__(self, *args, **kwargs):
3397
        requires_backends(self, ["torch"])
3398
3399
3400
3401
3402
3403
3404


MOBILEBERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class MobileBertForMaskedLM:
    def __init__(self, *args, **kwargs):
3405
        requires_backends(self, ["torch"])
3406
3407

    @classmethod
3408
3409
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3410

3411
3412
3413
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3414
3415
3416

class MobileBertForMultipleChoice:
    def __init__(self, *args, **kwargs):
3417
        requires_backends(self, ["torch"])
3418
3419

    @classmethod
3420
3421
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3422

3423
3424
3425
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3426
3427
3428

class MobileBertForNextSentencePrediction:
    def __init__(self, *args, **kwargs):
3429
        requires_backends(self, ["torch"])
3430

3431
3432
3433
3434
3435
3436
3437
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3438
3439
3440

class MobileBertForPreTraining:
    def __init__(self, *args, **kwargs):
3441
        requires_backends(self, ["torch"])
3442
3443
3444
3445


class MobileBertForQuestionAnswering:
    def __init__(self, *args, **kwargs):
3446
        requires_backends(self, ["torch"])
3447
3448

    @classmethod
3449
3450
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3451

3452
3453
3454
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3455
3456
3457

class MobileBertForSequenceClassification:
    def __init__(self, *args, **kwargs):
3458
        requires_backends(self, ["torch"])
3459
3460

    @classmethod
3461
3462
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3463

3464
3465
3466
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3467
3468
3469

class MobileBertForTokenClassification:
    def __init__(self, *args, **kwargs):
3470
        requires_backends(self, ["torch"])
3471
3472

    @classmethod
3473
3474
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3475

3476
3477
3478
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3479
3480
3481

class MobileBertLayer:
    def __init__(self, *args, **kwargs):
3482
        requires_backends(self, ["torch"])
3483
3484
3485
3486


class MobileBertModel:
    def __init__(self, *args, **kwargs):
3487
        requires_backends(self, ["torch"])
3488
3489

    @classmethod
3490
3491
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3492

3493
3494
3495
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3496
3497
3498

class MobileBertPreTrainedModel:
    def __init__(self, *args, **kwargs):
3499
        requires_backends(self, ["torch"])
3500
3501

    @classmethod
3502
3503
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3504

3505
3506
3507
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3508
3509

def load_tf_weights_in_mobilebert(*args, **kwargs):
3510
    requires_backends(load_tf_weights_in_mobilebert, ["torch"])
3511
3512


StillKeepTry's avatar
StillKeepTry committed
3513
3514
3515
3516
3517
MPNET_PRETRAINED_MODEL_ARCHIVE_LIST = None


class MPNetForMaskedLM:
    def __init__(self, *args, **kwargs):
3518
        requires_backends(self, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3519
3520

    @classmethod
3521
3522
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3523

3524
3525
3526
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

StillKeepTry's avatar
StillKeepTry committed
3527
3528
3529

class MPNetForMultipleChoice:
    def __init__(self, *args, **kwargs):
3530
        requires_backends(self, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3531
3532

    @classmethod
3533
3534
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3535

3536
3537
3538
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

StillKeepTry's avatar
StillKeepTry committed
3539
3540
3541

class MPNetForQuestionAnswering:
    def __init__(self, *args, **kwargs):
3542
        requires_backends(self, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3543
3544

    @classmethod
3545
3546
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3547

3548
3549
3550
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

StillKeepTry's avatar
StillKeepTry committed
3551
3552
3553

class MPNetForSequenceClassification:
    def __init__(self, *args, **kwargs):
3554
        requires_backends(self, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3555
3556

    @classmethod
3557
3558
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3559

3560
3561
3562
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

StillKeepTry's avatar
StillKeepTry committed
3563
3564
3565

class MPNetForTokenClassification:
    def __init__(self, *args, **kwargs):
3566
        requires_backends(self, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3567
3568

    @classmethod
3569
3570
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3571

3572
3573
3574
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

StillKeepTry's avatar
StillKeepTry committed
3575
3576
3577

class MPNetLayer:
    def __init__(self, *args, **kwargs):
3578
        requires_backends(self, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3579
3580
3581
3582


class MPNetModel:
    def __init__(self, *args, **kwargs):
3583
        requires_backends(self, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3584
3585

    @classmethod
3586
3587
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3588

3589
3590
3591
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

StillKeepTry's avatar
StillKeepTry committed
3592
3593
3594

class MPNetPreTrainedModel:
    def __init__(self, *args, **kwargs):
3595
        requires_backends(self, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3596
3597

    @classmethod
3598
3599
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
StillKeepTry's avatar
StillKeepTry committed
3600

3601
3602
3603
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

StillKeepTry's avatar
StillKeepTry committed
3604

3605
3606
class MT5EncoderModel:
    def __init__(self, *args, **kwargs):
3607
        requires_backends(self, ["torch"])
3608
3609

    @classmethod
3610
3611
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3612

3613
3614
3615
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3616

Patrick von Platen's avatar
Patrick von Platen committed
3617
3618
class MT5ForConditionalGeneration:
    def __init__(self, *args, **kwargs):
3619
        requires_backends(self, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
3620
3621

    @classmethod
3622
3623
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
3624

3625
3626
3627
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Patrick von Platen's avatar
Patrick von Platen committed
3628
3629
3630

class MT5Model:
    def __init__(self, *args, **kwargs):
3631
        requires_backends(self, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
3632
3633

    @classmethod
3634
3635
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
3636

3637
3638
3639
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Patrick von Platen's avatar
Patrick von Platen committed
3640

3641
3642
3643
3644
3645
OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class OpenAIGPTDoubleHeadsModel:
    def __init__(self, *args, **kwargs):
3646
        requires_backends(self, ["torch"])
3647
3648

    @classmethod
3649
3650
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3651

3652
3653
3654
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3655

3656
3657
class OpenAIGPTForSequenceClassification:
    def __init__(self, *args, **kwargs):
3658
        requires_backends(self, ["torch"])
3659
3660

    @classmethod
3661
3662
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3663

3664
3665
3666
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3667

3668
3669
class OpenAIGPTLMHeadModel:
    def __init__(self, *args, **kwargs):
3670
        requires_backends(self, ["torch"])
3671
3672

    @classmethod
3673
3674
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3675

3676
3677
3678
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3679
3680
3681

class OpenAIGPTModel:
    def __init__(self, *args, **kwargs):
3682
        requires_backends(self, ["torch"])
3683
3684

    @classmethod
3685
3686
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3687

3688
3689
3690
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3691
3692
3693

class OpenAIGPTPreTrainedModel:
    def __init__(self, *args, **kwargs):
3694
        requires_backends(self, ["torch"])
3695
3696

    @classmethod
3697
3698
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3699

3700
3701
3702
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3703
3704

def load_tf_weights_in_openai_gpt(*args, **kwargs):
3705
    requires_backends(load_tf_weights_in_openai_gpt, ["torch"])
3706
3707


3708
3709
class PegasusForCausalLM:
    def __init__(self, *args, **kwargs):
3710
        requires_backends(self, ["torch"])
3711

3712
3713
3714
3715
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

3716
3717
3718
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3719

3720
3721
class PegasusForConditionalGeneration:
    def __init__(self, *args, **kwargs):
3722
        requires_backends(self, ["torch"])
3723
3724

    @classmethod
3725
3726
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3727

3728
3729
3730
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3731

3732
3733
class PegasusModel:
    def __init__(self, *args, **kwargs):
3734
        requires_backends(self, ["torch"])
3735
3736

    @classmethod
3737
3738
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3739

3740
3741
3742
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3743

3744
3745
3746
3747
3748
3749
3750
3751
class PegasusPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

3752
3753
3754
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3755

NielsRogge's avatar
NielsRogge committed
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
PERCEIVER_PRETRAINED_MODEL_ARCHIVE_LIST = None


class PerceiverForImageClassificationConvProcessing:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class PerceiverForImageClassificationFourier:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class PerceiverForImageClassificationLearned:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class PerceiverForMaskedLM:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class PerceiverForMultimodalAutoencoding:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class PerceiverForOpticalFlow:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class PerceiverForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class PerceiverLayer:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class PerceiverModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class PerceiverPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])


Weizhen's avatar
Weizhen committed
3837
3838
3839
3840
3841
PROPHETNET_PRETRAINED_MODEL_ARCHIVE_LIST = None


class ProphetNetDecoder:
    def __init__(self, *args, **kwargs):
3842
        requires_backends(self, ["torch"])
Weizhen's avatar
Weizhen committed
3843
3844
3845
3846


class ProphetNetEncoder:
    def __init__(self, *args, **kwargs):
3847
        requires_backends(self, ["torch"])
Weizhen's avatar
Weizhen committed
3848
3849
3850
3851


class ProphetNetForCausalLM:
    def __init__(self, *args, **kwargs):
3852
        requires_backends(self, ["torch"])
Weizhen's avatar
Weizhen committed
3853

3854
3855
3856
3857
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

3858
3859
3860
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Weizhen's avatar
Weizhen committed
3861
3862
3863

class ProphetNetForConditionalGeneration:
    def __init__(self, *args, **kwargs):
3864
        requires_backends(self, ["torch"])
Weizhen's avatar
Weizhen committed
3865
3866

    @classmethod
3867
3868
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Weizhen's avatar
Weizhen committed
3869

3870
3871
3872
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Weizhen's avatar
Weizhen committed
3873
3874
3875

class ProphetNetModel:
    def __init__(self, *args, **kwargs):
3876
        requires_backends(self, ["torch"])
Weizhen's avatar
Weizhen committed
3877
3878

    @classmethod
3879
3880
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Weizhen's avatar
Weizhen committed
3881

3882
3883
3884
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Weizhen's avatar
Weizhen committed
3885
3886
3887

class ProphetNetPreTrainedModel:
    def __init__(self, *args, **kwargs):
3888
        requires_backends(self, ["torch"])
Weizhen's avatar
Weizhen committed
3889
3890

    @classmethod
3891
3892
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Weizhen's avatar
Weizhen committed
3893

3894
3895
3896
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Weizhen's avatar
Weizhen committed
3897

3898
3899
class RagModel:
    def __init__(self, *args, **kwargs):
3900
        requires_backends(self, ["torch"])
3901
3902

    @classmethod
3903
3904
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3905

3906
3907
3908
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3909

3910
3911
3912
3913
3914
3915
3916
3917
class RagPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

3918
3919
3920
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3921

3922
3923
class RagSequenceForGeneration:
    def __init__(self, *args, **kwargs):
3924
        requires_backends(self, ["torch"])
3925
3926
3927
3928


class RagTokenForGeneration:
    def __init__(self, *args, **kwargs):
3929
        requires_backends(self, ["torch"])
3930
3931
3932
3933
3934
3935
3936


REFORMER_PRETRAINED_MODEL_ARCHIVE_LIST = None


class ReformerAttention:
    def __init__(self, *args, **kwargs):
3937
        requires_backends(self, ["torch"])
3938
3939
3940
3941


class ReformerForMaskedLM:
    def __init__(self, *args, **kwargs):
3942
        requires_backends(self, ["torch"])
3943
3944

    @classmethod
3945
3946
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3947

3948
3949
3950
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3951
3952
3953

class ReformerForQuestionAnswering:
    def __init__(self, *args, **kwargs):
3954
        requires_backends(self, ["torch"])
3955
3956

    @classmethod
3957
3958
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3959

3960
3961
3962
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3963
3964
3965

class ReformerForSequenceClassification:
    def __init__(self, *args, **kwargs):
3966
        requires_backends(self, ["torch"])
3967
3968

    @classmethod
3969
3970
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3971

3972
3973
3974
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3975
3976
3977

class ReformerLayer:
    def __init__(self, *args, **kwargs):
3978
        requires_backends(self, ["torch"])
3979
3980
3981
3982


class ReformerModel:
    def __init__(self, *args, **kwargs):
3983
        requires_backends(self, ["torch"])
3984
3985

    @classmethod
3986
3987
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
3988

3989
3990
3991
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

3992
3993
3994

class ReformerModelWithLMHead:
    def __init__(self, *args, **kwargs):
3995
        requires_backends(self, ["torch"])
3996
3997

    @classmethod
3998
3999
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4000

4001
4002
4003
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4004

4005
4006
4007
4008
4009
4010
4011
4012
class ReformerPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4013
4014
4015
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4016

4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
REMBERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class RemBertForCausalLM:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4028
4029
4030
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4031
4032
4033
4034
4035
4036
4037
4038
4039

class RemBertForMaskedLM:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4040
4041
4042
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4043
4044
4045
4046
4047
4048
4049
4050
4051

class RemBertForMultipleChoice:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4052
4053
4054
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4055
4056
4057
4058
4059
4060
4061
4062
4063

class RemBertForQuestionAnswering:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4064
4065
4066
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4067
4068
4069
4070
4071
4072
4073
4074
4075

class RemBertForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4076
4077
4078
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4079
4080
4081
4082
4083
4084
4085
4086
4087

class RemBertForTokenClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4088
4089
4090
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104

class RemBertLayer:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class RemBertModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4105
4106
4107
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4108
4109
4110
4111
4112
4113
4114
4115
4116

class RemBertPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4117
4118
4119
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4120
4121
4122
4123
4124

def load_tf_weights_in_rembert(*args, **kwargs):
    requires_backends(load_tf_weights_in_rembert, ["torch"])


4125
4126
4127
4128
4129
RETRIBERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class RetriBertModel:
    def __init__(self, *args, **kwargs):
4130
        requires_backends(self, ["torch"])
4131
4132

    @classmethod
4133
4134
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4135

4136
4137
4138
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4139
4140
4141

class RetriBertPreTrainedModel:
    def __init__(self, *args, **kwargs):
4142
        requires_backends(self, ["torch"])
4143
4144

    @classmethod
4145
4146
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4147

4148
4149
4150
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4151
4152
4153
4154
4155
4156

ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST = None


class RobertaForCausalLM:
    def __init__(self, *args, **kwargs):
4157
        requires_backends(self, ["torch"])
4158

4159
4160
4161
4162
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4163
4164
4165
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4166
4167
4168

class RobertaForMaskedLM:
    def __init__(self, *args, **kwargs):
4169
        requires_backends(self, ["torch"])
4170
4171

    @classmethod
4172
4173
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4174

4175
4176
4177
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4178
4179
4180

class RobertaForMultipleChoice:
    def __init__(self, *args, **kwargs):
4181
        requires_backends(self, ["torch"])
4182
4183

    @classmethod
4184
4185
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4186

4187
4188
4189
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4190
4191
4192

class RobertaForQuestionAnswering:
    def __init__(self, *args, **kwargs):
4193
        requires_backends(self, ["torch"])
4194
4195

    @classmethod
4196
4197
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4198

4199
4200
4201
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4202
4203
4204

class RobertaForSequenceClassification:
    def __init__(self, *args, **kwargs):
4205
        requires_backends(self, ["torch"])
4206
4207

    @classmethod
4208
4209
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4210

4211
4212
4213
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4214
4215
4216

class RobertaForTokenClassification:
    def __init__(self, *args, **kwargs):
4217
        requires_backends(self, ["torch"])
4218
4219

    @classmethod
4220
4221
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4222

4223
4224
4225
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4226
4227
4228

class RobertaModel:
    def __init__(self, *args, **kwargs):
4229
        requires_backends(self, ["torch"])
4230
4231

    @classmethod
4232
4233
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4234

4235
4236
4237
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4238

4239
4240
4241
4242
4243
4244
4245
4246
class RobertaPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4247
4248
4249
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4250

4251
4252
4253
4254
4255
4256
4257
ROFORMER_PRETRAINED_MODEL_ARCHIVE_LIST = None


class RoFormerForCausalLM:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4258
4259
4260
4261
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4262
4263
4264
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4265
4266
4267
4268
4269
4270

class RoFormerForMaskedLM:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
4271
4272
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4273

4274
4275
4276
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4277
4278
4279
4280
4281
4282

class RoFormerForMultipleChoice:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
4283
4284
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4285

4286
4287
4288
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4289
4290
4291
4292
4293
4294

class RoFormerForQuestionAnswering:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
4295
4296
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4297

4298
4299
4300
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4301
4302
4303
4304
4305
4306

class RoFormerForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
4307
4308
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4309

4310
4311
4312
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4313
4314
4315
4316
4317
4318

class RoFormerForTokenClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
4319
4320
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4321

4322
4323
4324
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335

class RoFormerLayer:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class RoFormerModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
4336
4337
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4338

4339
4340
4341
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4342
4343
4344
4345
4346
4347

class RoFormerPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
4348
4349
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4350

4351
4352
4353
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4354
4355
4356
4357
4358

def load_tf_weights_in_roformer(*args, **kwargs):
    requires_backends(load_tf_weights_in_roformer, ["torch"])


NielsRogge's avatar
NielsRogge committed
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST = None


class SegformerDecodeHead:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class SegformerForImageClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class SegformerForSemanticSegmentation:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class SegformerLayer:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class SegformerModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4390
4391
4392
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
4393
4394
4395
4396
4397
4398
4399
4400
4401

class SegformerPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4402
4403
4404
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

NielsRogge's avatar
NielsRogge committed
4405

4406
4407
4408
4409
4410
4411
4412
4413
SEW_PRETRAINED_MODEL_ARCHIVE_LIST = None


class SEWForCTC:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


4414
4415
4416
4417
4418
4419
4420
4421
class SEWForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4422
4423
4424
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4425

4426
4427
4428
4429
4430
4431
4432
4433
class SEWModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4434
4435
4436
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4437
4438
4439
4440
4441
4442
4443
4444
4445

class SEWPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4446
4447
4448
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4449
4450
4451
4452
4453
4454
4455
4456
4457

SEW_D_PRETRAINED_MODEL_ARCHIVE_LIST = None


class SEWDForCTC:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


4458
4459
4460
4461
4462
4463
4464
4465
class SEWDForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4466
4467
4468
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4469

4470
4471
4472
4473
4474
4475
4476
4477
class SEWDModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4478
4479
4480
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4481
4482
4483
4484
4485
4486
4487
4488
4489

class SEWDPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4490
4491
4492
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4493

4494
4495
4496
4497
4498
4499
4500
4501
class SpeechEncoderDecoderModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4502
4503
4504
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4505

Suraj Patil's avatar
Suraj Patil committed
4506
4507
4508
4509
4510
SPEECH_TO_TEXT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class Speech2TextForConditionalGeneration:
    def __init__(self, *args, **kwargs):
4511
        requires_backends(self, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
4512
4513

    @classmethod
4514
4515
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
4516

4517
4518
4519
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Suraj Patil's avatar
Suraj Patil committed
4520
4521
4522

class Speech2TextModel:
    def __init__(self, *args, **kwargs):
4523
        requires_backends(self, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
4524
4525

    @classmethod
4526
4527
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Suraj Patil's avatar
Suraj Patil committed
4528

4529
4530
4531
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Suraj Patil's avatar
Suraj Patil committed
4532

4533
4534
4535
4536
4537
4538
4539
4540
class Speech2TextPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4541
4542
4543
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4544

4545
4546
4547
4548
4549
4550
4551
4552
class Speech2Text2ForCausalLM:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4553
4554
4555
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4556
4557
4558
4559
4560
4561
4562
4563
4564

class Speech2Text2PreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4565
4566
4567
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4568

Ori Ram's avatar
Ori Ram committed
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
SPLINTER_PRETRAINED_MODEL_ARCHIVE_LIST = None


class SplinterForQuestionAnswering:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4580
4581
4582
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Ori Ram's avatar
Ori Ram committed
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596

class SplinterLayer:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class SplinterModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4597
4598
4599
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Ori Ram's avatar
Ori Ram committed
4600
4601
4602
4603
4604
4605
4606
4607
4608

class SplinterPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4609
4610
4611
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Ori Ram's avatar
Ori Ram committed
4612

Sylvain Gugger's avatar
Sylvain Gugger committed
4613
4614
4615
4616
4617
SQUEEZEBERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class SqueezeBertForMaskedLM:
    def __init__(self, *args, **kwargs):
4618
        requires_backends(self, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4619
4620

    @classmethod
4621
4622
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4623

4624
4625
4626
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sylvain Gugger's avatar
Sylvain Gugger committed
4627
4628
4629

class SqueezeBertForMultipleChoice:
    def __init__(self, *args, **kwargs):
4630
        requires_backends(self, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4631
4632

    @classmethod
4633
4634
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4635

4636
4637
4638
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sylvain Gugger's avatar
Sylvain Gugger committed
4639
4640
4641

class SqueezeBertForQuestionAnswering:
    def __init__(self, *args, **kwargs):
4642
        requires_backends(self, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4643
4644

    @classmethod
4645
4646
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4647

4648
4649
4650
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sylvain Gugger's avatar
Sylvain Gugger committed
4651
4652
4653

class SqueezeBertForSequenceClassification:
    def __init__(self, *args, **kwargs):
4654
        requires_backends(self, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4655
4656

    @classmethod
4657
4658
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4659

4660
4661
4662
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sylvain Gugger's avatar
Sylvain Gugger committed
4663
4664
4665

class SqueezeBertForTokenClassification:
    def __init__(self, *args, **kwargs):
4666
        requires_backends(self, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4667
4668

    @classmethod
4669
4670
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4671

4672
4673
4674
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sylvain Gugger's avatar
Sylvain Gugger committed
4675
4676
4677

class SqueezeBertModel:
    def __init__(self, *args, **kwargs):
4678
        requires_backends(self, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4679
4680

    @classmethod
4681
4682
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4683

4684
4685
4686
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sylvain Gugger's avatar
Sylvain Gugger committed
4687
4688
4689

class SqueezeBertModule:
    def __init__(self, *args, **kwargs):
4690
        requires_backends(self, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4691
4692
4693
4694


class SqueezeBertPreTrainedModel:
    def __init__(self, *args, **kwargs):
4695
        requires_backends(self, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4696
4697

    @classmethod
4698
4699
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
4700

4701
4702
4703
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Sylvain Gugger's avatar
Sylvain Gugger committed
4704

4705
4706
4707
T5_PRETRAINED_MODEL_ARCHIVE_LIST = None


4708
4709
class T5EncoderModel:
    def __init__(self, *args, **kwargs):
4710
        requires_backends(self, ["torch"])
4711
4712

    @classmethod
4713
4714
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4715

4716
4717
4718
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4719

4720
4721
class T5ForConditionalGeneration:
    def __init__(self, *args, **kwargs):
4722
        requires_backends(self, ["torch"])
4723
4724

    @classmethod
4725
4726
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4727

4728
4729
4730
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4731
4732
4733

class T5Model:
    def __init__(self, *args, **kwargs):
4734
        requires_backends(self, ["torch"])
4735
4736

    @classmethod
4737
4738
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4739

4740
4741
4742
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4743
4744
4745

class T5PreTrainedModel:
    def __init__(self, *args, **kwargs):
4746
        requires_backends(self, ["torch"])
4747
4748

    @classmethod
4749
4750
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4751

4752
4753
4754
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4755
4756

def load_tf_weights_in_t5(*args, **kwargs):
4757
    requires_backends(load_tf_weights_in_t5, ["torch"])
4758
4759
4760
4761
4762
4763
4764


TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST = None


class AdaptiveEmbedding:
    def __init__(self, *args, **kwargs):
4765
        requires_backends(self, ["torch"])
4766
4767


sandip's avatar
sandip committed
4768
4769
class TransfoXLForSequenceClassification:
    def __init__(self, *args, **kwargs):
4770
        requires_backends(self, ["torch"])
sandip's avatar
sandip committed
4771
4772

    @classmethod
4773
4774
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
sandip's avatar
sandip committed
4775

4776
4777
4778
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

sandip's avatar
sandip committed
4779

4780
4781
class TransfoXLLMHeadModel:
    def __init__(self, *args, **kwargs):
4782
        requires_backends(self, ["torch"])
4783
4784

    @classmethod
4785
4786
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4787

4788
4789
4790
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4791
4792
4793

class TransfoXLModel:
    def __init__(self, *args, **kwargs):
4794
        requires_backends(self, ["torch"])
4795
4796

    @classmethod
4797
4798
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4799

4800
4801
4802
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4803
4804
4805

class TransfoXLPreTrainedModel:
    def __init__(self, *args, **kwargs):
4806
        requires_backends(self, ["torch"])
4807
4808

    @classmethod
4809
4810
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
4811

4812
4813
4814
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4815
4816

def load_tf_weights_in_transfo_xl(*args, **kwargs):
4817
    requires_backends(load_tf_weights_in_transfo_xl, ["torch"])
4818
4819


4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
TROCR_PRETRAINED_MODEL_ARCHIVE_LIST = None


class TrOCRForCausalLM:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4831
4832
4833
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4834
4835
4836
4837
4838
4839

class TrOCRPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
4840
4841
4842
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4843
4844
4845
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867

UNISPEECH_PRETRAINED_MODEL_ARCHIVE_LIST = None


class UniSpeechForCTC:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class UniSpeechForPreTraining:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class UniSpeechForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4868
4869
4870
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4871
4872
4873
4874
4875
4876
4877
4878
4879

class UniSpeechModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4880
4881
4882
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4883
4884
4885
4886
4887
4888
4889
4890
4891

class UniSpeechPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4892
4893
4894
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916

UNISPEECH_SAT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class UniSpeechSatForCTC:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class UniSpeechSatForPreTraining:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class UniSpeechSatForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4917
4918
4919
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4920
4921
4922
4923
4924
4925
4926
4927
4928

class UniSpeechSatModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4929
4930
4931
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4932
4933
4934
4935
4936
4937

class UniSpeechSatPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
4938
4939
4940
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4941
4942
4943
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4944
4945
4946
4947
4948
4949
4950
4951
4952

class VisionEncoderDecoderModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

4953
4954
4955
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

4956

Suraj Patil's avatar
Suraj Patil committed
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
class VisionTextDualEncoderModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])


Gunjan Chhablani's avatar
Gunjan Chhablani committed
4969
4970
4971
4972
4973
4974
4975
4976
VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class VisualBertForMultipleChoice:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
4977
4978
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Gunjan Chhablani's avatar
Gunjan Chhablani committed
4979

4980
4981
4982
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Gunjan Chhablani's avatar
Gunjan Chhablani committed
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993

class VisualBertForPreTraining:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class VisualBertForQuestionAnswering:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
4994
4995
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Gunjan Chhablani's avatar
Gunjan Chhablani committed
4996

4997
4998
4999
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Gunjan Chhablani's avatar
Gunjan Chhablani committed
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020

class VisualBertForRegionToPhraseAlignment:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class VisualBertForVisualReasoning:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class VisualBertLayer:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])


class VisualBertModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
5021
5022
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Gunjan Chhablani's avatar
Gunjan Chhablani committed
5023

5024
5025
5026
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Gunjan Chhablani's avatar
Gunjan Chhablani committed
5027
5028
5029
5030
5031
5032

class VisualBertPreTrainedModel:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
5033
5034
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Gunjan Chhablani's avatar
Gunjan Chhablani committed
5035

5036
5037
5038
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Gunjan Chhablani's avatar
Gunjan Chhablani committed
5039

5040
5041
5042
5043
5044
VIT_PRETRAINED_MODEL_ARCHIVE_LIST = None


class ViTForImageClassification:
    def __init__(self, *args, **kwargs):
5045
        requires_backends(self, ["torch"])
5046
5047
5048
5049


class ViTModel:
    def __init__(self, *args, **kwargs):
5050
        requires_backends(self, ["torch"])
5051
5052

    @classmethod
5053
5054
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5055

5056
5057
5058
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5059
5060
5061

class ViTPreTrainedModel:
    def __init__(self, *args, **kwargs):
5062
        requires_backends(self, ["torch"])
5063
5064

    @classmethod
5065
5066
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5067

5068
5069
5070
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5071

Patrick von Platen's avatar
Patrick von Platen committed
5072
5073
5074
WAV_2_VEC_2_PRETRAINED_MODEL_ARCHIVE_LIST = None


5075
5076
class Wav2Vec2ForCTC:
    def __init__(self, *args, **kwargs):
5077
        requires_backends(self, ["torch"])
5078
5079


Patrick von Platen's avatar
Patrick von Platen committed
5080
5081
class Wav2Vec2ForMaskedLM:
    def __init__(self, *args, **kwargs):
5082
        requires_backends(self, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
5083
5084

    @classmethod
5085
5086
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
5087

5088
5089
5090
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Patrick von Platen's avatar
Patrick von Platen committed
5091

Anton Lozhkov's avatar
Anton Lozhkov committed
5092
5093
5094
class Wav2Vec2ForPreTraining:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])
5095
5096
5097
5098
5099
5100
5101
5102
5103


class Wav2Vec2ForSequenceClassification:
    def __init__(self, *args, **kwargs):
        requires_backends(self, ["torch"])

    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Anton Lozhkov's avatar
Anton Lozhkov committed
5104

5105
5106
5107
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Anton Lozhkov's avatar
Anton Lozhkov committed
5108

Patrick von Platen's avatar
Patrick von Platen committed
5109
5110
class Wav2Vec2Model:
    def __init__(self, *args, **kwargs):
5111
        requires_backends(self, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
5112
5113

    @classmethod
5114
5115
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
5116

5117
5118
5119
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Patrick von Platen's avatar
Patrick von Platen committed
5120
5121
5122

class Wav2Vec2PreTrainedModel:
    def __init__(self, *args, **kwargs):
5123
        requires_backends(self, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
5124
5125

    @classmethod
5126
5127
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Patrick von Platen's avatar
Patrick von Platen committed
5128

5129
5130
5131
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Patrick von Platen's avatar
Patrick von Platen committed
5132

5133
5134
5135
5136
5137
XLM_PRETRAINED_MODEL_ARCHIVE_LIST = None


class XLMForMultipleChoice:
    def __init__(self, *args, **kwargs):
5138
        requires_backends(self, ["torch"])
5139
5140

    @classmethod
5141
5142
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5143

5144
5145
5146
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5147
5148
5149

class XLMForQuestionAnswering:
    def __init__(self, *args, **kwargs):
5150
        requires_backends(self, ["torch"])
5151
5152

    @classmethod
5153
5154
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5155

5156
5157
5158
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5159
5160
5161

class XLMForQuestionAnsweringSimple:
    def __init__(self, *args, **kwargs):
5162
        requires_backends(self, ["torch"])
5163
5164

    @classmethod
5165
5166
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5167

5168
5169
5170
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5171
5172
5173

class XLMForSequenceClassification:
    def __init__(self, *args, **kwargs):
5174
        requires_backends(self, ["torch"])
5175
5176

    @classmethod
5177
5178
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5179

5180
5181
5182
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5183
5184
5185

class XLMForTokenClassification:
    def __init__(self, *args, **kwargs):
5186
        requires_backends(self, ["torch"])
5187
5188

    @classmethod
5189
5190
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5191

5192
5193
5194
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5195
5196
5197

class XLMModel:
    def __init__(self, *args, **kwargs):
5198
        requires_backends(self, ["torch"])
5199
5200

    @classmethod
5201
5202
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5203

5204
5205
5206
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5207
5208
5209

class XLMPreTrainedModel:
    def __init__(self, *args, **kwargs):
5210
        requires_backends(self, ["torch"])
5211
5212

    @classmethod
5213
5214
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5215

5216
5217
5218
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5219
5220
5221

class XLMWithLMHeadModel:
    def __init__(self, *args, **kwargs):
5222
        requires_backends(self, ["torch"])
5223
5224

    @classmethod
5225
5226
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5227

5228
5229
5230
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5231

Weizhen's avatar
Weizhen committed
5232
5233
5234
5235
5236
XLM_PROPHETNET_PRETRAINED_MODEL_ARCHIVE_LIST = None


class XLMProphetNetDecoder:
    def __init__(self, *args, **kwargs):
5237
        requires_backends(self, ["torch"])
Weizhen's avatar
Weizhen committed
5238
5239
5240
5241


class XLMProphetNetEncoder:
    def __init__(self, *args, **kwargs):
5242
        requires_backends(self, ["torch"])
Weizhen's avatar
Weizhen committed
5243
5244
5245
5246


class XLMProphetNetForCausalLM:
    def __init__(self, *args, **kwargs):
5247
        requires_backends(self, ["torch"])
Weizhen's avatar
Weizhen committed
5248

5249
5250
5251
5252
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

5253
5254
5255
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Weizhen's avatar
Weizhen committed
5256
5257
5258

class XLMProphetNetForConditionalGeneration:
    def __init__(self, *args, **kwargs):
5259
        requires_backends(self, ["torch"])
Weizhen's avatar
Weizhen committed
5260
5261

    @classmethod
5262
5263
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Weizhen's avatar
Weizhen committed
5264

5265
5266
5267
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Weizhen's avatar
Weizhen committed
5268
5269
5270

class XLMProphetNetModel:
    def __init__(self, *args, **kwargs):
5271
        requires_backends(self, ["torch"])
Weizhen's avatar
Weizhen committed
5272
5273

    @classmethod
5274
5275
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
Weizhen's avatar
Weizhen committed
5276

5277
5278
5279
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

Weizhen's avatar
Weizhen committed
5280

5281
5282
5283
5284
5285
XLM_ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST = None


class XLMRobertaForCausalLM:
    def __init__(self, *args, **kwargs):
5286
        requires_backends(self, ["torch"])
5287

5288
5289
5290
5291
    @classmethod
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])

5292
5293
5294
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5295
5296
5297

class XLMRobertaForMaskedLM:
    def __init__(self, *args, **kwargs):
5298
        requires_backends(self, ["torch"])
5299
5300

    @classmethod
5301
5302
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5303

5304
5305
5306
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5307
5308
5309

class XLMRobertaForMultipleChoice:
    def __init__(self, *args, **kwargs):
5310
        requires_backends(self, ["torch"])
5311
5312

    @classmethod
5313
5314
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5315

5316
5317
5318
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5319
5320
5321

class XLMRobertaForQuestionAnswering:
    def __init__(self, *args, **kwargs):
5322
        requires_backends(self, ["torch"])
5323
5324

    @classmethod
5325
5326
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5327

5328
5329
5330
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5331
5332
5333

class XLMRobertaForSequenceClassification:
    def __init__(self, *args, **kwargs):
5334
        requires_backends(self, ["torch"])
5335
5336

    @classmethod
5337
5338
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5339

5340
5341
5342
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5343
5344
5345

class XLMRobertaForTokenClassification:
    def __init__(self, *args, **kwargs):
5346
        requires_backends(self, ["torch"])
5347
5348

    @classmethod
5349
5350
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5351

5352
5353
5354
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5355
5356
5357

class XLMRobertaModel:
    def __init__(self, *args, **kwargs):
5358
        requires_backends(self, ["torch"])
5359
5360

    @classmethod
5361
5362
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5363

5364
5365
5366
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5367
5368
5369
5370
5371
5372

XLNET_PRETRAINED_MODEL_ARCHIVE_LIST = None


class XLNetForMultipleChoice:
    def __init__(self, *args, **kwargs):
5373
        requires_backends(self, ["torch"])
5374
5375

    @classmethod
5376
5377
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5378

5379
5380
5381
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5382
5383
5384

class XLNetForQuestionAnswering:
    def __init__(self, *args, **kwargs):
5385
        requires_backends(self, ["torch"])
5386
5387

    @classmethod
5388
5389
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5390

5391
5392
5393
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5394
5395
5396

class XLNetForQuestionAnsweringSimple:
    def __init__(self, *args, **kwargs):
5397
        requires_backends(self, ["torch"])
5398
5399

    @classmethod
5400
5401
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5402

5403
5404
5405
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5406
5407
5408

class XLNetForSequenceClassification:
    def __init__(self, *args, **kwargs):
5409
        requires_backends(self, ["torch"])
5410
5411

    @classmethod
5412
5413
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5414

5415
5416
5417
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5418
5419
5420

class XLNetForTokenClassification:
    def __init__(self, *args, **kwargs):
5421
        requires_backends(self, ["torch"])
5422
5423

    @classmethod
5424
5425
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5426

5427
5428
5429
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5430
5431
5432

class XLNetLMHeadModel:
    def __init__(self, *args, **kwargs):
5433
        requires_backends(self, ["torch"])
5434
5435

    @classmethod
5436
5437
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5438

5439
5440
5441
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5442
5443
5444

class XLNetModel:
    def __init__(self, *args, **kwargs):
5445
        requires_backends(self, ["torch"])
5446
5447

    @classmethod
5448
5449
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5450

5451
5452
5453
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5454
5455
5456

class XLNetPreTrainedModel:
    def __init__(self, *args, **kwargs):
5457
        requires_backends(self, ["torch"])
5458
5459

    @classmethod
5460
5461
    def from_pretrained(cls, *args, **kwargs):
        requires_backends(cls, ["torch"])
5462

5463
5464
5465
    def forward(self, *args, **kwargs):
        requires_backends(self, ["torch"])

5466
5467

def load_tf_weights_in_xlnet(*args, **kwargs):
5468
    requires_backends(load_tf_weights_in_xlnet, ["torch"])
5469
5470
5471
5472


class Adafactor:
    def __init__(self, *args, **kwargs):
5473
        requires_backends(self, ["torch"])
5474
5475
5476
5477


class AdamW:
    def __init__(self, *args, **kwargs):
5478
        requires_backends(self, ["torch"])
5479
5480
5481


def get_constant_schedule(*args, **kwargs):
5482
    requires_backends(get_constant_schedule, ["torch"])
5483
5484
5485


def get_constant_schedule_with_warmup(*args, **kwargs):
5486
    requires_backends(get_constant_schedule_with_warmup, ["torch"])
5487
5488
5489


def get_cosine_schedule_with_warmup(*args, **kwargs):
5490
    requires_backends(get_cosine_schedule_with_warmup, ["torch"])
5491
5492
5493


def get_cosine_with_hard_restarts_schedule_with_warmup(*args, **kwargs):
5494
    requires_backends(get_cosine_with_hard_restarts_schedule_with_warmup, ["torch"])
5495
5496
5497


def get_linear_schedule_with_warmup(*args, **kwargs):
5498
    requires_backends(get_linear_schedule_with_warmup, ["torch"])
5499
5500
5501


def get_polynomial_decay_schedule_with_warmup(*args, **kwargs):
5502
    requires_backends(get_polynomial_decay_schedule_with_warmup, ["torch"])
5503
5504


Sylvain Gugger's avatar
Sylvain Gugger committed
5505
def get_scheduler(*args, **kwargs):
5506
    requires_backends(get_scheduler, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
5507
5508


5509
5510
class Trainer:
    def __init__(self, *args, **kwargs):
5511
        requires_backends(self, ["torch"])
5512
5513
5514


def torch_distributed_zero_first(*args, **kwargs):
5515
    requires_backends(torch_distributed_zero_first, ["torch"])
Sylvain Gugger's avatar
Sylvain Gugger committed
5516
5517
5518
5519


class Seq2SeqTrainer:
    def __init__(self, *args, **kwargs):
5520
        requires_backends(self, ["torch"])