o
    hj                     @   s  d Z ddlZddlmZ ddlmZ ddlmZmZm	Z	m
Z
 ddlmZ eeZeg d	Zeg d
Zeg dZeg dZeg dZedgZeg dZedgZeg dZedgZeg dZeg dZeg dZeg dZeg dZeddgZeddgZ eg dZ!eg dZ"eg dZ#eg dZ$ed gZ%ed!d"gZ&eg d#Z'eg d$Z(eg d%Z)eg d&Z*eg d'Z+eg d(Z,eg d)Z-eg d*Z.ed+gZ/eg d,Z0eg d-Z1eg d.Z2ed/gZ3eg d0Z4ed1d2gZ5ed3d4gZ6ed5gZ7e	eeZ8e	eeZ9e	eeZ:e	eeZ;e	eeZ<e	eeZ=e	ee1Z>e	eeZ?e	eeZ@e	eeZAe	eeZBe	eeZCe	eeZDe	ee&ZEe	ee'ZFe	eeZGe	eeZHe	eeZIe	eeZJe	ee ZKe	ee!ZLe	ee#ZMe	ee$ZNe	ee%ZOe	ee(ZPe	ee)ZQe	ee*ZRe	ee+ZSe	ee,ZTe	ee"ZUe	ee-ZVe	ee.ZWe	ee/ZXe	ee0ZYe	ee2ZZe	ee3Z[e	ee4Z\e	ee5Z]e	ee6Z^e	ee7Z_G d6d7 d7eZ`G d8d9 d9eZaG d:d; d;eZbG d<d= d=eZce
ecZcG d>d? d?eZde
edd@dAZdG dBdC dCeZee
eedDdAZeG dEdF dFeZfe
efdGdAZfG dHdI dIeZge
egdJdAZgG dKdL dLeZhe
ehdMdNdOZhG dPdQ dQeZie
eidRdAZiG dSdT dTeZje
ejdUdAZjG dVdW dWeZke
ekdXdYdOZkG dZd[ d[eZle
eld\d]dOZlG d^d_ d_eZme
emd`dadOZmG dbdc dceZne
endddAZnG dedf dfeZoe
eodgdAZoG dhdi dieZpe
epdjdAZpG dkdl dleZqe
eqdmdAZqG dndo doeZre
erdpdAZrG dqdr dreZse
esdsdAZsG dtdu dueZte
etdvdAZtG dwdx dxeZue
eudydAZuG dzd{ d{eZve
evd|dAZvG d}d~ d~eZwe
ewddAZwG dd deZxe
exddAZxG dd deZye
eyddAZyG dd deZze
ezddAZzG dd deZ{e
e{ddAZ{G dd deZ|e
e|ddAZ|G dd deZ}e
e}ddAZ}G dd deZ~e
e~ddAZ~G dd deZe
eddAZG dd deZG dd deZG dd deZG dd deZe
eddAZG dd deZe
eddAZG dd deeZdS )z Auto Model class.    N)OrderedDict   )logging   )_BaseAutoBackboneClass_BaseAutoModelClass_LazyAutoMappingauto_class_update)CONFIG_MAPPING_NAMES)ЩalbertAlbertModelalign
AlignModelaltclipAltCLIPModel)audio-spectrogram-transformerASTModel)
autoformerAutoformerModelbark	BarkModel)bart	BartModel)beit	BeitModelbert	BertModel)bert-generationBertGenerationEncoderbig_birdBigBirdModel)bigbird_pegasusBigBirdPegasusModel)biogptBioGptModel)bitBitModel)
blenderbotBlenderbotModel)blenderbot-smallBlenderbotSmallModelblip	BlipModel)blip-2
Blip2Model)bloom
BloomModel)bridgetowerBridgeTowerModel)bros	BrosModel)	camembertCamembertModel)canineCanineModelchinese_clipChineseCLIPModel)clap	ClapModelclip	CLIPModel)clip_vision_modelCLIPVisionModelclipsegCLIPSegModel)clvp!ClvpModelForConditionalGeneration)
code_llama
LlamaModel)codegenCodeGenModel)conditional_detrConditionalDetrModel)convbertConvBertModel)convnextConvNextModel)
convnextv2ConvNextV2Model)cpmantCpmAntModel)ctrl	CTRLModel)cvtCvtModel)data2vec-audioData2VecAudioModeldata2vec-textData2VecTextModel)data2vec-visionData2VecVisionModeldebertaDebertaModel
deberta-v2DebertaV2Model)decision_transformerDecisionTransformerModel)deformable_detrDeformableDetrModel)deit	DeiTModel)deta	DetaModel)detr	DetrModel)dinat
DinatModel)dinov2Dinov2Model
distilbertDistilBertModel)z
donut-swinDonutSwinModel)dprDPRQuestionEncoder)dptDPTModel)efficientformerEfficientFormerModel)efficientnetEfficientNetModelelectraElectraModel)encodecEncodecModel)ernie
ErnieModel)ernie_mErnieMModel)esmEsmModel)falconFalconModelflaubertFlaubertModel)flava
FlavaModel)fnet	FNetModel)focalnetFocalNetModel)fsmt	FSMTModel)funnel)FunnelModelFunnelBaseModel)gitGitModel)glpn	GLPNModel)gpt-sw3	GPT2Model)gpt2r   )gpt_bigcodeGPTBigCodeModel)gpt_neoGPTNeoModel)gpt_neoxGPTNeoXModel)gpt_neox_japaneseGPTNeoXJapaneseModel)gptj	GPTJModelzgptsan-japanese&GPTSanJapaneseForConditionalGeneration)
graphormerGraphormerModel)groupvitGroupViTModel)hubertHubertModelibert
IBertModel)ideficsIdeficsModel)imagegptImageGPTModel)informerInformerModel)jukeboxJukeboxModel)kosmos-2Kosmos2Model)layoutlmLayoutLMModel)
layoutlmv2LayoutLMv2Model)
layoutlmv3LayoutLMv3Model)ledLEDModel)levit
LevitModel)lilt	LiltModel)llamarP   
longformerLongformerModel)longt5LongT5Model)luke	LukeModel)lxmertLxmertModel)m2m_100M2M100Model)marianMarianModel)markuplmMarkupLMModel)mask2formerMask2FormerModel)
maskformerMaskFormerModel)maskformer-swinMaskFormerSwinModel)mbart
MBartModel)mctct
MCTCTModel)mega	MegaModel)megatron-bertMegatronBertModel)zmgp-strMgpstrForSceneTextRecognition)mistralMistralModel)mixtralMixtralModel
mobilebertMobileBertModel)mobilenet_v1MobileNetV1Model)mobilenet_v2MobileNetV2Model)	mobilevitMobileViTModel)mobilevitv2MobileViTV2Model)mpnet
MPNetModel)mptMptModel)mraMraModel)mt5MT5Model)mvpMvpModel)natNatModel)nezha
NezhaModel)nllb-moeNllbMoeModelnystromformerNystromformerModel)	oneformerOneFormerModel)
open-llamaOpenLlamaModel)
openai-gptOpenAIGPTModel)optOPTModel)owlv2
Owlv2Model)owlvitOwlViTModel)patchtsmixerPatchTSMixerModel)patchtstPatchTSTModel)pegasusPegasusModel)	pegasus_xPegasusXModel)	perceiverPerceiverModel)	persimmonPersimmonModel)phiPhiModel)plbartPLBartModel)
poolformerPoolFormerModel)
prophetnetProphetNetModel)pvtPvtModel)qdqbertQDQBertModelreformerReformerModel)regnetRegNetModelrembertRemBertModel)resnetResNetModel	retribertRetriBertModelrobertaRobertaModelroberta-prelayernormRobertaPreLayerNormModelroc_bertRoCBertModelroformerRoFormerModel)rwkv	RwkvModelsamSamModel)seamless_m4tSeamlessM4TModel)seamless_m4t_v2SeamlessM4Tv2Model)	segformerSegformerModel)sewSEWModel)sew-d	SEWDModel)speech_to_textSpeech2TextModel)speecht5SpeechT5Model)splinterSplinterModelsqueezebertSqueezeBertModel)swiftformerSwiftFormerModel)swin	SwinModel)swin2srSwin2SRModel)swinv2Swinv2Model)switch_transformersSwitchTransformersModel)t5T5Model)table-transformerTableTransformerModel)tapas
TapasModel)time_series_transformerTimeSeriesTransformerModel)timesformerTimesformerModeltimm_backboneTimmBackbone)trajectory_transformerTrajectoryTransformerModel)
transfo-xlTransfoXLModel)tvlt	TvltModel)tvpTvpModel)umt5	UMT5Model)	unispeechUniSpeechModel)unispeech-satUniSpeechSatModel)univnetUnivNetModel)vanVanModel)videomaeVideoMAEModel)vilt	ViltModel)zvision-text-dual-encoderVisionTextDualEncoderModel)visual_bertVisualBertModel)vitViTModel)
vit_hybridViTHybridModel)vit_maeViTMAEModel)vit_msnViTMSNModel)vitdetVitDetModelvits	VitsModel)vivit
VivitModel)wav2vec2Wav2Vec2Model)wav2vec2-conformerWav2Vec2ConformerModel)wavlm
WavLMModel)whisperWhisperModel)xclip
XCLIPModel)xglm	XGLMModelxlmXLMModel)xlm-prophetnetXLMProphetNetModelxlm-robertaXLMRobertaModelxlm-roberta-xlXLMRobertaXLModel)xlnet
XLNetModel)xmod	XmodModel)yolos
YolosModel)yoso	YosoModel)?)r   AlbertForPreTrainingr   BartForConditionalGeneration)r    BertForPreTraining)r%   BigBirdForPreTrainingr6   BloomForCausalLMr<   CamembertForMaskedLMr]   CTRLLMHeadModelrd   Data2VecTextForMaskedLMri   DebertaForMaskedLMrl   DebertaV2ForMaskedLMr}   DistilBertForMaskedLM)r   ElectraForPreTraining)r   ErnieForPreTrainingr   FlaubertWithLMHeadModel)r   FlavaForPreTraining)r   FNetForPreTrainingr   FSMTForConditionalGeneration)r   FunnelForPreTrainingr   GPT2LMHeadModelr   r  r   GPTBigCodeForCausalLMr   r   IBertForMaskedLM)r   IdeficsForVisionText2Textr   LayoutLMForMaskedLMllavaLlavaForConditionalGenerationr   LongformerForMaskedLMr   LukeForMaskedLM)r   LxmertForPreTrainingr   MegaForMaskedLM)r   MegatronBertForPreTraining)r   MobileBertForPreTrainingr  MPNetForMaskedLMr  MptForCausalLMr  MraForMaskedLMr  MvpForConditionalGeneration)r  NezhaForPreTrainingr  NllbMoeForConditionalGenerationr  OpenAIGPTLMHeadModelrD  rH  RobertaForMaskedLMrK  RobertaPreLayerNormForMaskedLM)rN  RoCBertForPreTrainingrS  RwkvForCausalLM)rf  SplinterForPreTrainingri  SqueezeBertForMaskedLMrs  *SwitchTransformersForConditionalGenerationru  T5ForConditionalGenerationry  TapasForMaskedLMr  TransfoXLLMHeadModel)r  TvltForPreTraining)r  UniSpeechForPreTraining)r  UniSpeechSatForPreTraining)r  VideoMAEForPreTraining)r  VisualBertForPreTraining)r  ViTMAEForPreTraining)r  Wav2Vec2ForPreTraining)r  Wav2Vec2ConformerForPreTrainingr  XLMWithLMHeadModelr  XLMRobertaForMaskedLMr  XLMRobertaXLForMaskedLMr  XLNetLMHeadModelr  XmodForMaskedLM)Mr   AlbertForMaskedLMr  r    BertForMaskedLMr%   BigBirdForMaskedLMr'   &BigBirdPegasusForConditionalGenerationr/   'BlenderbotSmallForConditionalGenerationr  r  rQ   CodeGenForCausalLMrU   ConvBertForMaskedLMr[   CpmAntForCausalLMr  r  r  r  r  r   ElectraForMaskedLMzencoder-decoderEncoderDecoderModelr   ErnieForMaskedLMr   EsmForMaskedLMr  r   FNetForMaskedLMr  r   FunnelForMaskedLMr   GitForCausalLMr  r  r  r   GPTNeoForCausalLMr   GPTNeoXForCausalLMr   GPTNeoXJapaneseForCausalLMr   GPTJForCausalLMr   r  r  r   LEDForConditionalGenerationr  r   LongT5ForConditionalGenerationr  r   M2M100ForConditionalGenerationr   MarianMTModelr  r   MegatronBertForCausalLMr   MobileBertForMaskedLMr  r  r  r  r  NezhaForMaskedLMr  r  NystromformerForMaskedLMr  r(   PegasusXForConditionalGenerationr0  PLBartForConditionalGeneration	pop2piano!Pop2PianoForConditionalGenerationr8  QDQBertForMaskedLMr;  ReformerModelWithLMHeadr@  RemBertForMaskedLMr  r
  rN  RoCBertForMaskedLMrQ  RoFormerForMaskedLMr  rb  #Speech2TextForConditionalGenerationr  r  r  r  r  r  Wav2Vec2ForMaskedLMr  WhisperForConditionalGenerationr"  r$  r&  r(  r*  r  YosoForMaskedLM)@)r   BartForCausalLM)r    BertLMHeadModel)r"   BertGenerationDecoder)r%   BigBirdForCausalLM)r'   BigBirdPegasusForCausalLM)r)   BioGptForCausalLM)r-   BlenderbotForCausalLM)r/   BlenderbotSmallForCausalLMr  )r<   CamembertForCausalLM)rO   LlamaForCausalLMr6  r:  r  )rd   Data2VecTextForCausalLM)r   ElectraForCausalLM)r   ErnieForCausalLM)r   FalconForCausalLM)fuyuFuyuForCausalLMrH  r  r  r  rJ  rL  rN  rP  )r   r  )r   MarianForCausalLM)r   MBartForCausalLM)r   MegaForCausalLMrZ  )r   MistralForCausalLM)r   MixtralForCausalLMr  )musicgenMusicgenForCausalLM)r  MvpForCausalLM)r  OpenLlamaForCausalLMr  )r  OPTForCausalLM)r&  PegasusForCausalLM)r,  PersimmonForCausalLM)r.  PhiForCausalLM)r0  PLBartForCausalLM)r4  ProphetNetForCausalLM)r8  QDQBertLMHeadModelrk  )r@  RemBertForCausalLM)rH  RobertaForCausalLM)rK  RobertaPreLayerNormForCausalLM)rN  RoCBertForCausalLM)rQ  RoFormerForCausalLMr  )speech_to_text_2Speech2Text2ForCausalLMr  )trocrTrOCRForCausalLM)r  WhisperForCausalLM)r  XGLMForCausalLMr"  )r  XLMProphetNetForCausalLM)r  XLMRobertaForCausalLM)r  XLMRobertaXLForCausalLMr(  )r  XmodForCausalLM))rr   DeiTForMaskedImageModeling)r   FocalNetForMaskedImageModeling)rm  SwinForMaskedImageModeling)rq  Swinv2ForMaskedImageModeling)r  ViTForMaskedImageModeling)r   ImageGPTForCausalImageModeling) )r   BeitForImageClassification)r+   BitForImageClassification)rW   ConvNextForImageClassification)rY    ConvNextV2ForImageClassification)r_   CvtForImageClassification)rf   $Data2VecVisionForImageClassification)rr   )DeiTForImageClassification%DeiTForImageClassificationWithTeacher)rx   DinatForImageClassification)rz   Dinov2ForImageClassification)r   )%EfficientFormerForImageClassification0EfficientFormerForImageClassificationWithTeacher)r   "EfficientNetForImageClassification)r   FocalNetForImageClassification)r   ImageGPTForImageClassification)r   )LevitForImageClassification&LevitForImageClassificationWithTeacher)r   !MobileNetV1ForImageClassification)r   !MobileNetV2ForImageClassification)r   MobileViTForImageClassification)r  !MobileViTV2ForImageClassification)r  NatForImageClassification)r*  )&PerceiverForImageClassificationLearned&PerceiverForImageClassificationFourier-PerceiverForImageClassificationConvProcessing)r2   PoolFormerForImageClassification)r6  PvtForImageClassification)r=  RegNetForImageClassification)rB  ResNetForImageClassification)r\  SegformerForImageClassification)rk  !SwiftFormerForImageClassification)rm  SwinForImageClassification)rq  Swinv2ForImageClassification)r  VanForImageClassification)r  ViTForImageClassification)r  ViTHybridForImageClassification)r  ViTMSNForImageClassificationrv   DetrForSegmentation))r   BeitForSemanticSegmentation)rf   %Data2VecVisionForSemanticSegmentation)r   DPTForSemanticSegmentation)r   "MobileNetV2ForSemanticSegmentation)r    MobileViTForSemanticSegmentation)r  "MobileViTV2ForSemanticSegmentation)r\   SegformerForSemanticSegmentation)upernetUperNetForSemanticSegmentationr   !MaskFormerForInstanceSegmentation)r  )r   #Mask2FormerForUniversalSegmentationr  )r  !OneFormerForUniversalSegmentation))r}  !TimesformerForVideoClassification)r  VideoMAEForVideoClassification)r  VivitForVideoClassification))r2   BlipForConditionalGenerationr4   Blip2ForConditionalGenerationrH  )instructblip$InstructBlipForConditionalGeneration)r   Kosmos2ForConditionalGenerationr  )
pix2struct"Pix2StructForConditionalGeneration)zvision-encoder-decoderVisionEncoderDecoderModel)-r,  r  r.  r0  r  r8  r  r  r  r  r<  r@  rB  r  rD  rF  r  r  r  r  r   MBartForConditionalGenerationr  )r   MegatronBertForMaskedLMr\  r  r  r  r^  r`  )r*  PerceiverForMaskedLMri  )r;  ReformerForMaskedLMrm  r  r
  ro  rq  r  r  ru  r"  r$  r&  r*  ry  ))rS   !ConditionalDetrForObjectDetection)rp    DeformableDetrForObjectDetection)rt   DetaForObjectDetection)rv   DetrForObjectDetection)rw  "TableTransformerForObjectDetection)r  YolosForObjectDetection)r  Owlv2ForObjectDetection)r   OwlViTForObjectDetection)r   DPTForDepthEstimation)r   GLPNForDepthEstimation)r  r2  )r-   "BlenderbotForConditionalGenerationr4  r>  r  r   rR  rT  rV  rX  r  )r	  MT5ForConditionalGenerationr  r  )r&  PegasusForConditionalGenerationrb  rd  )r4  "ProphetNetForConditionalGeneration)rX  SeamlessM4TForTextToText)rZ  SeamlessM4Tv2ForTextToTextr  r  )r  UMT5ForConditionalGeneration)r  %XLMProphetNetForConditionalGeneration)rf  )rX  SeamlessM4TForSpeechToText)rZ  SeamlessM4Tv2ForSpeechToText)zspeech-encoder-decoderSpeechEncoderDecoderModelrs  )rd  SpeechT5ForSpeechToTextrw  )N)r   AlbertForSequenceClassification)r   BartForSequenceClassification)r    BertForSequenceClassification)r%    BigBirdForSequenceClassification)r'   'BigBirdPegasusForSequenceClassification)r)   BioGptForSequenceClassification)r6   BloomForSequenceClassification)r<   "CamembertForSequenceClassification)r>   CanineForSequenceClassification)rO   LlamaForSequenceClassification)rU   !ConvBertForSequenceClassification)r]   CTRLForSequenceClassification)rd   %Data2VecTextForSequenceClassification)ri    DebertaForSequenceClassification)rl   "DebertaV2ForSequenceClassification)r}   #DistilBertForSequenceClassification)r    ElectraForSequenceClassification)r   ErnieForSequenceClassification)r   ErnieMForSequenceClassification)r   EsmForSequenceClassification)r   FalconForSequenceClassification)r   !FlaubertForSequenceClassification)r   FNetForSequenceClassification)r   FunnelForSequenceClassification)r   GPT2ForSequenceClassification)r   r#  )r   #GPTBigCodeForSequenceClassification)r   GPTNeoForSequenceClassification)r    GPTNeoXForSequenceClassification)r   GPTJForSequenceClassification)r   IBertForSequenceClassification)r   !LayoutLMForSequenceClassification)r   #LayoutLMv2ForSequenceClassification)r   #LayoutLMv3ForSequenceClassification)r   LEDForSequenceClassification)r   LiltForSequenceClassification)r   r  )r   #LongformerForSequenceClassification)r   LukeForSequenceClassification)r   !MarkupLMForSequenceClassification)r   MBartForSequenceClassification)r   MegaForSequenceClassification)r   %MegatronBertForSequenceClassification)r    MistralForSequenceClassification)r    MixtralForSequenceClassification)r   #MobileBertForSequenceClassification)r  MPNetForSequenceClassification)r  MptForSequenceClassification)r  MraForSequenceClassification)r	  MT5ForSequenceClassification)r  MvpForSequenceClassification)r  NezhaForSequenceClassification)r  &NystromformerForSequenceClassification)r  "OpenLlamaForSequenceClassification)r  "OpenAIGPTForSequenceClassification)r  OPTForSequenceClassification)r*  "PerceiverForSequenceClassification)r,  "PersimmonForSequenceClassification)r.  PhiForSequenceClassification)r0  PLBartForSequenceClassification)r8   QDQBertForSequenceClassification)r;  !ReformerForSequenceClassification)r@   RemBertForSequenceClassification)rH   RobertaForSequenceClassification)rK  ,RobertaPreLayerNormForSequenceClassification)rN   RoCBertForSequenceClassification)rQ  !RoFormerForSequenceClassification)ri  $SqueezeBertForSequenceClassification)ru  T5ForSequenceClassification)ry  TapasForSequenceClassification)r  "TransfoXLForSequenceClassification)r  UMT5ForSequenceClassification)r  XLMForSequenceClassification)r  #XLMRobertaForSequenceClassification)r  %XLMRobertaXLForSequenceClassification)r  XLNetForSequenceClassification)r  XmodForSequenceClassification)r  YosoForSequenceClassification)>)r   AlbertForQuestionAnswering)r   BartForQuestionAnswering)r    BertForQuestionAnswering)r%   BigBirdForQuestionAnswering)r'   "BigBirdPegasusForQuestionAnswering)r6   BloomForQuestionAnswering)r<   CamembertForQuestionAnswering)r>   CanineForQuestionAnswering)rU   ConvBertForQuestionAnswering)rd    Data2VecTextForQuestionAnswering)ri   DebertaForQuestionAnswering)rl   DebertaV2ForQuestionAnswering)r}   DistilBertForQuestionAnswering)r   ElectraForQuestionAnswering)r   ErnieForQuestionAnswering)r   ErnieMForQuestionAnswering)r   FalconForQuestionAnswering)r   "FlaubertForQuestionAnsweringSimple)r   FNetForQuestionAnswering)r   FunnelForQuestionAnswering)r   GPT2ForQuestionAnswering)r   GPTNeoForQuestionAnswering)r   GPTNeoXForQuestionAnswering)r   GPTJForQuestionAnswering)r   IBertForQuestionAnsweringr   LayoutLMv2ForQuestionAnsweringr   LayoutLMv3ForQuestionAnswering)r   LEDForQuestionAnswering)r   LiltForQuestionAnswering)r   LongformerForQuestionAnswering)r   LukeForQuestionAnswering)r   LxmertForQuestionAnswering)r   MarkupLMForQuestionAnswering)r   MBartForQuestionAnswering)r   MegaForQuestionAnswering)r    MegatronBertForQuestionAnswering)r   MobileBertForQuestionAnswering)r  MPNetForQuestionAnswering)r  MptForQuestionAnswering)r  MraForQuestionAnswering)r	  MT5ForQuestionAnswering)r  MvpForQuestionAnswering)r  NezhaForQuestionAnswering)r  !NystromformerForQuestionAnswering)r  OPTForQuestionAnswering)r8  QDQBertForQuestionAnswering)r;  ReformerForQuestionAnswering)r@  RemBertForQuestionAnswering)rH  RobertaForQuestionAnswering)rK  'RobertaPreLayerNormForQuestionAnswering)rN  RoCBertForQuestionAnswering)rQ  RoFormerForQuestionAnswering)rf  SplinterForQuestionAnswering)ri  SqueezeBertForQuestionAnswering)ru  T5ForQuestionAnswering)r  UMT5ForQuestionAnswering)r  XLMForQuestionAnsweringSimple)r  XLMRobertaForQuestionAnswering)r   XLMRobertaXLForQuestionAnswering)r  XLNetForQuestionAnsweringSimple)r  XmodForQuestionAnswering)r  YosoForQuestionAnswering)ry  TapasForQuestionAnsweringr  )r  ViltForQuestionAnswering))r   LayoutLMForQuestionAnsweringrp  rr  )8)r   AlbertForTokenClassification)r    BertForTokenClassification)r%   BigBirdForTokenClassification)r)   BioGptForTokenClassification)r6   BloomForTokenClassification)r:   BrosForTokenClassification)r<   CamembertForTokenClassification)r>   CanineForTokenClassification)rU   ConvBertForTokenClassification)rd   "Data2VecTextForTokenClassification)ri   DebertaForTokenClassification)rl   DebertaV2ForTokenClassification)r}    DistilBertForTokenClassification)r   ElectraForTokenClassification)r   ErnieForTokenClassification)r   ErnieMForTokenClassification)r   EsmForTokenClassification)r   FalconForTokenClassification)r   FlaubertForTokenClassification)r   FNetForTokenClassification)r   FunnelForTokenClassification)r   GPT2ForTokenClassification)r   r  )r    GPTBigCodeForTokenClassification)r   GPTNeoForTokenClassification)r   GPTNeoXForTokenClassification)r   IBertForTokenClassification)r   LayoutLMForTokenClassification)r    LayoutLMv2ForTokenClassification)r    LayoutLMv3ForTokenClassification)r   LiltForTokenClassification)r    LongformerForTokenClassification)r   LukeForTokenClassification)r   MarkupLMForTokenClassification)r   MegaForTokenClassification)r   "MegatronBertForTokenClassification)r    MobileBertForTokenClassification)r  MPNetForTokenClassification)r  MptForTokenClassification)r  MraForTokenClassification)r  NezhaForTokenClassification)r  #NystromformerForTokenClassification)r.  PhiForTokenClassification)r8  QDQBertForTokenClassification)r@  RemBertForTokenClassification)rH  RobertaForTokenClassification)rK  )RobertaPreLayerNormForTokenClassification)rN  RoCBertForTokenClassification)rQ  RoFormerForTokenClassification)ri  !SqueezeBertForTokenClassification)r  XLMForTokenClassification)r   XLMRobertaForTokenClassification)r  "XLMRobertaXLForTokenClassification)r  XLNetForTokenClassification)r  XmodForTokenClassification)r  YosoForTokenClassification)&)r   AlbertForMultipleChoice)r    BertForMultipleChoice)r%   BigBirdForMultipleChoice)r<   CamembertForMultipleChoice)r>   CanineForMultipleChoice)rU   ConvBertForMultipleChoice)rd   Data2VecTextForMultipleChoice)rl   DebertaV2ForMultipleChoice)r}   DistilBertForMultipleChoice)r   ElectraForMultipleChoice)r   ErnieForMultipleChoice)r   ErnieMForMultipleChoice)r   FlaubertForMultipleChoice)r   FNetForMultipleChoice)r   FunnelForMultipleChoice)r   IBertForMultipleChoice)r   LongformerForMultipleChoice)r   LukeForMultipleChoice)r   MegaForMultipleChoice)r   MegatronBertForMultipleChoice)r   MobileBertForMultipleChoice)r  MPNetForMultipleChoice)r  MraForMultipleChoice)r  NezhaForMultipleChoice)r  NystromformerForMultipleChoice)r8  QDQBertForMultipleChoice)r@  RemBertForMultipleChoice)rH  RobertaForMultipleChoice)rK  $RobertaPreLayerNormForMultipleChoice)rN  RoCBertForMultipleChoice)rQ  RoFormerForMultipleChoice)ri  SqueezeBertForMultipleChoice)r  XLMForMultipleChoice)r  XLMRobertaForMultipleChoice)r  XLMRobertaXLForMultipleChoice)r  XLNetForMultipleChoice)r  XmodForMultipleChoice)r  YosoForMultipleChoice))r    BertForNextSentencePrediction)r   ErnieForNextSentencePrediction)r   FNetForNextSentencePrediction)r   %MegatronBertForNextSentencePrediction)r   #MobileBertForNextSentencePrediction)r  NezhaForNextSentencePrediction)r8   QDQBertForNextSentencePrediction))r   ASTForAudioClassification)ra   &Data2VecAudioForSequenceClassification)r   HubertForSequenceClassification)r^  SEWForSequenceClassification)r`  SEWDForSequenceClassification)r  "UniSpeechForSequenceClassification)r  %UniSpeechSatForSequenceClassification)r  !Wav2Vec2ForSequenceClassification)r  *Wav2Vec2ConformerForSequenceClassification)r  WavLMForSequenceClassification)r  WhisperForAudioClassification)
)ra   Data2VecAudioForCTC)r   HubertForCTC)r   MCTCTForCTC)r^  	SEWForCTC)r`  
SEWDForCTC)r  UniSpeechForCTC)r  UniSpeechSatForCTC)r  Wav2Vec2ForCTC)r  Wav2Vec2ConformerForCTC)r  WavLMForCTC))ra   (Data2VecAudioForAudioFrameClassification)r  'UniSpeechSatForAudioFrameClassification)r  #Wav2Vec2ForAudioFrameClassification)r  ,Wav2Vec2ConformerForAudioFrameClassification)r   WavLMForAudioFrameClassification))ra   Data2VecAudioForXVector)r  UniSpeechSatForXVector)r  Wav2Vec2ForXVector)r  Wav2Vec2ConformerForXVector)r  WavLMForXVector)rd  SpeechT5ForTextToSpeech)r   )r   MusicgenForConditionalGeneration)rX  SeamlessM4TForTextToSpeech)rZ  SeamlessM4Tv2ForTextToSpeechr  )r   r   r1   r@   rE   rJ   ))r   BeitBackbone)r+   BitBackbone)rW   ConvNextBackbone)rY   ConvNextV2Backbone)rx   DinatBackbone)rz   Dinov2Backbone)r   FocalNetBackbone)r   MaskFormerSwinBackbone)r  NatBackbone)rB  ResNetBackbone)rm  SwinBackboner  )r  VitDetBackbonerU  )r   r   r$   rc   rh   rk   r|   r   r   r   r   r   )r	  MT5EncoderModelr  r:  r?  rG  rJ  rM  rP  rh  )ru  T5EncoderModel)r  UMT5EncoderModelr  r  r  )r"  'PatchTSMixerForTimeSeriesClassification)r$  PatchTSTForClassification)r"  PatchTSMixerForRegression)r$  PatchTSTForRegression)ro  Swin2SRForImageSuperResolutionc                   @      e Zd ZeZdS )AutoModelForMaskGenerationN)__name__
__module____qualname__!MODEL_FOR_MASK_GENERATION_MAPPING_model_mapping r<  r<  \/var/www/html/ai/venv/lib/python3.10/site-packages/transformers/models/auto/modeling_auto.pyr6        r6  c                   @   r5  )AutoModelForTextEncodingN)r7  r8  r9  MODEL_FOR_TEXT_ENCODING_MAPPINGr;  r<  r<  r<  r=  r?    r>  r?  c                   @   r5  )AutoModelForImageToImageN)r7  r8  r9   MODEL_FOR_IMAGE_TO_IMAGE_MAPPINGr;  r<  r<  r<  r=  rA    r>  rA  c                   @   r5  )	AutoModelN)r7  r8  r9  MODEL_MAPPINGr;  r<  r<  r<  r=  rC    r>  rC  c                   @   r5  )AutoModelForPreTrainingN)r7  r8  r9  MODEL_FOR_PRETRAINING_MAPPINGr;  r<  r<  r<  r=  rE    r>  rE  pretraining)head_docc                   @   r5  )_AutoModelWithLMHeadN)r7  r8  r9  MODEL_WITH_LM_HEAD_MAPPINGr;  r<  r<  r<  r=  rI    r>  rI  zlanguage modelingc                   @   r5  )AutoModelForCausalLMN)r7  r8  r9  MODEL_FOR_CAUSAL_LM_MAPPINGr;  r<  r<  r<  r=  rK    r>  rK  zcausal language modelingc                   @   r5  )AutoModelForMaskedLMN)r7  r8  r9  MODEL_FOR_MASKED_LM_MAPPINGr;  r<  r<  r<  r=  rM  $  r>  rM  zmasked language modelingc                   @   r5  )AutoModelForSeq2SeqLMN)r7  r8  r9  &MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPINGr;  r<  r<  r<  r=  rO  +  r>  rO  z&sequence-to-sequence language modelingzt5-base)rH  checkpoint_for_examplec                   @   r5  )"AutoModelForSequenceClassificationN)r7  r8  r9  )MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPINGr;  r<  r<  r<  r=  rR  6  r>  rR  zsequence classificationc                   @   r5  )AutoModelForQuestionAnsweringN)r7  r8  r9  $MODEL_FOR_QUESTION_ANSWERING_MAPPINGr;  r<  r<  r<  r=  rT  ?  r>  rT  zquestion answeringc                   @   r5  )"AutoModelForTableQuestionAnsweringN)r7  r8  r9  *MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPINGr;  r<  r<  r<  r=  rV  F  r>  rV  ztable question answeringzgoogle/tapas-base-finetuned-wtqc                   @   r5  )#AutoModelForVisualQuestionAnsweringN)r7  r8  r9  +MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPINGr;  r<  r<  r<  r=  rX  Q  r>  rX  zvisual question answeringzdandelin/vilt-b32-finetuned-vqac                   @   r5  )%AutoModelForDocumentQuestionAnsweringN)r7  r8  r9  -MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPINGr;  r<  r<  r<  r=  rZ  \  r>  rZ  zdocument question answeringz/impira/layoutlm-document-qa", revision="52e01b3c                   @   r5  )AutoModelForTokenClassificationN)r7  r8  r9  &MODEL_FOR_TOKEN_CLASSIFICATION_MAPPINGr;  r<  r<  r<  r=  r\  g  r>  r\  ztoken classificationc                   @   r5  )AutoModelForMultipleChoiceN)r7  r8  r9  !MODEL_FOR_MULTIPLE_CHOICE_MAPPINGr;  r<  r<  r<  r=  r^  n  r>  r^  zmultiple choicec                   @   r5  )"AutoModelForNextSentencePredictionN)r7  r8  r9  *MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPINGr;  r<  r<  r<  r=  r`  u  r>  r`  znext sentence predictionc                   @   r5  )AutoModelForImageClassificationN)r7  r8  r9  &MODEL_FOR_IMAGE_CLASSIFICATION_MAPPINGr;  r<  r<  r<  r=  rb  ~  r>  rb  zimage classificationc                   @   r5  )'AutoModelForZeroShotImageClassificationN)r7  r8  r9  0MODEL_FOR_ZERO_SHOT_IMAGE_CLASSIFICATION_MAPPINGr;  r<  r<  r<  r=  rd    r>  rd  zzero-shot image classificationc                   @   r5  )AutoModelForImageSegmentationN)r7  r8  r9  $MODEL_FOR_IMAGE_SEGMENTATION_MAPPINGr;  r<  r<  r<  r=  rf    r>  rf  zimage segmentationc                   @   r5  ) AutoModelForSemanticSegmentationN)r7  r8  r9  'MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPINGr;  r<  r<  r<  r=  rh    r>  rh  zsemantic segmentationc                   @   r5  )!AutoModelForUniversalSegmentationN)r7  r8  r9  (MODEL_FOR_UNIVERSAL_SEGMENTATION_MAPPINGr;  r<  r<  r<  r=  rj    r>  rj  zuniversal image segmentationc                   @   r5  ) AutoModelForInstanceSegmentationN)r7  r8  r9  'MODEL_FOR_INSTANCE_SEGMENTATION_MAPPINGr;  r<  r<  r<  r=  rl    r>  rl  zinstance segmentationc                   @   r5  )AutoModelForObjectDetectionN)r7  r8  r9  "MODEL_FOR_OBJECT_DETECTION_MAPPINGr;  r<  r<  r<  r=  rn    r>  rn  zobject detectionc                   @   r5  )#AutoModelForZeroShotObjectDetectionN)r7  r8  r9  ,MODEL_FOR_ZERO_SHOT_OBJECT_DETECTION_MAPPINGr;  r<  r<  r<  r=  rp    r>  rp  zzero-shot object detectionc                   @   r5  )AutoModelForDepthEstimationN)r7  r8  r9  "MODEL_FOR_DEPTH_ESTIMATION_MAPPINGr;  r<  r<  r<  r=  rr    r>  rr  zdepth estimationc                   @   r5  )AutoModelForVideoClassificationN)r7  r8  r9  &MODEL_FOR_VIDEO_CLASSIFICATION_MAPPINGr;  r<  r<  r<  r=  rt    r>  rt  zvideo classificationc                   @   r5  )AutoModelForVision2SeqN)r7  r8  r9  MODEL_FOR_VISION_2_SEQ_MAPPINGr;  r<  r<  r<  r=  rv    r>  rv  zvision-to-text modelingc                   @   r5  )AutoModelForAudioClassificationN)r7  r8  r9  &MODEL_FOR_AUDIO_CLASSIFICATION_MAPPINGr;  r<  r<  r<  r=  rx    r>  rx  zaudio classificationc                   @   r5  )AutoModelForCTCN)r7  r8  r9  MODEL_FOR_CTC_MAPPINGr;  r<  r<  r<  r=  rz    r>  rz  z%connectionist temporal classificationc                   @   r5  )AutoModelForSpeechSeq2SeqN)r7  r8  r9  "MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPINGr;  r<  r<  r<  r=  r|    r>  r|  z,sequence-to-sequence speech-to-text modelingc                   @   r5  )$AutoModelForAudioFrameClassificationN)r7  r8  r9  ,MODEL_FOR_AUDIO_FRAME_CLASSIFICATION_MAPPINGr;  r<  r<  r<  r=  r~    r>  r~  z"audio frame (token) classificationc                   @   r5  )AutoModelForAudioXVectorN)r7  r8  r9  MODEL_FOR_AUDIO_XVECTOR_MAPPINGr;  r<  r<  r<  r=  r    r>  r  c                   @   r5  )AutoModelForTextToSpectrogramN)r7  r8  r9  %MODEL_FOR_TEXT_TO_SPECTROGRAM_MAPPINGr;  r<  r<  r<  r=  r    r>  r  c                   @   r5  )AutoModelForTextToWaveformN)r7  r8  r9  "MODEL_FOR_TEXT_TO_WAVEFORM_MAPPINGr;  r<  r<  r<  r=  r    r>  r  c                   @   r5  )AutoBackboneN)r7  r8  r9  MODEL_FOR_BACKBONE_MAPPINGr;  r<  r<  r<  r=  r    r>  r  zaudio retrieval via x-vectorc                   @   r5  )AutoModelForMaskedImageModelingN)r7  r8  r9  'MODEL_FOR_MASKED_IMAGE_MODELING_MAPPINGr;  r<  r<  r<  r=  r    r>  r  zmasked image modelingc                       s0   e Zd Ze fddZe fddZ  ZS )AutoModelWithLMHeadc                    s   t dt t |S NzThe class `AutoModelWithLMHead` is deprecated and will be removed in a future version. Please use `AutoModelForCausalLM` for causal language models, `AutoModelForMaskedLM` for masked language models and `AutoModelForSeq2SeqLM` for encoder-decoder models.)warningswarnFutureWarningsuperfrom_config)clsconfig	__class__r<  r=  r    s
   zAutoModelWithLMHead.from_configc                    s&   t dt t j|g|R i |S r  )r  r  r  r  from_pretrained)r  pretrained_model_name_or_path
model_argskwargsr  r<  r=  r    s
   z#AutoModelWithLMHead.from_pretrained)r7  r8  r9  classmethodr  r  __classcell__r<  r<  r  r=  r    s
    	r  )__doc__r  collectionsr   utilsr   auto_factoryr   r   r   r	   configuration_autor
   
get_loggerr7  loggerMODEL_MAPPING_NAMES#MODEL_FOR_PRETRAINING_MAPPING_NAMES MODEL_WITH_LM_HEAD_MAPPING_NAMES!MODEL_FOR_CAUSAL_LM_MAPPING_NAMES-MODEL_FOR_MASKED_IMAGE_MODELING_MAPPING_NAMES-MODEL_FOR_CAUSAL_IMAGE_MODELING_MAPPING_NAMES,MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING_NAMES*MODEL_FOR_IMAGE_SEGMENTATION_MAPPING_NAMES-MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING_NAMES-MODEL_FOR_INSTANCE_SEGMENTATION_MAPPING_NAMES.MODEL_FOR_UNIVERSAL_SEGMENTATION_MAPPING_NAMES,MODEL_FOR_VIDEO_CLASSIFICATION_MAPPING_NAMES$MODEL_FOR_VISION_2_SEQ_MAPPING_NAMES!MODEL_FOR_MASKED_LM_MAPPING_NAMES(MODEL_FOR_OBJECT_DETECTION_MAPPING_NAMES2MODEL_FOR_ZERO_SHOT_OBJECT_DETECTION_MAPPING_NAMES(MODEL_FOR_DEPTH_ESTIMATION_MAPPING_NAMES,MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMES(MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMES/MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING_NAMES*MODEL_FOR_QUESTION_ANSWERING_MAPPING_NAMES0MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPING_NAMES1MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPING_NAMES3MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPING_NAMES,MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING_NAMES'MODEL_FOR_MULTIPLE_CHOICE_MAPPING_NAMES0MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPING_NAMES,MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING_NAMESMODEL_FOR_CTC_MAPPING_NAMES2MODEL_FOR_AUDIO_FRAME_CLASSIFICATION_MAPPING_NAMES%MODEL_FOR_AUDIO_XVECTOR_MAPPING_NAMES+MODEL_FOR_TEXT_TO_SPECTROGRAM_MAPPING_NAMES(MODEL_FOR_TEXT_TO_WAVEFORM_MAPPING_NAMES6MODEL_FOR_ZERO_SHOT_IMAGE_CLASSIFICATION_MAPPING_NAMES MODEL_FOR_BACKBONE_MAPPING_NAMES'MODEL_FOR_MASK_GENERATION_MAPPING_NAMES%MODEL_FOR_TEXT_ENCODING_MAPPING_NAMES2MODEL_FOR_TIME_SERIES_CLASSIFICATION_MAPPING_NAMES.MODEL_FOR_TIME_SERIES_REGRESSION_MAPPING_NAMES&MODEL_FOR_IMAGE_TO_IMAGE_MAPPING_NAMESrD  rF  rJ  rL  'MODEL_FOR_CAUSAL_IMAGE_MODELING_MAPPINGrc  re  rg  ri  rm  rk  ru  rw  rY  r[  rN  r  ro  rq  rs  rP  rS  rU  rW  r]  r_  ra  ry  r{  r}  r  r  r  r  r  r:  r@  ,MODEL_FOR_TIME_SERIES_CLASSIFICATION_MAPPING(MODEL_FOR_TIME_SERIES_REGRESSION_MAPPINGrB  r6  r?  rA  rC  rE  rI  rK  rM  rO  rR  rT  rV  rX  rZ  r\  r^  r`  rb  rd  rf  rh  rj  rl  rn  rp  rr  rt  rv  rx  rz  r|  r~  r  r  r  r  r  r  r<  r<  r<  r=  <module>   s  
 WESF9
3TD>,
















