
    hx                        d Z ddlZddlZddlmZ ddlmZmZ ddlm	Z	 ddl
mZmZmZmZ dd	lmZ erdd
lmZ ddlmZ  G d dee      Z e	j,                  e      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      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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g d%      Z0 ed&g      Z1 eg d'      Z2 eg d(      Z3 eg d)      Z4 eg d*      Z5 eg d+      Z6 eg d,      Z7 eg d-      Z8 eg d.      Z9 eg d/      Z: ed0d1g      Z; eg d2      Z< eg d3      Z= eg d4      Z> eg d5      Z? ed6g      Z@ eg d7      ZA eg d8      ZB ed9d:g      ZC ed;d<g      ZD ed=g      ZE ed>g      ZF ed?g      ZG eee      ZH eee      ZI eee      ZJ eee      ZK eee      ZL eee       ZM eee=      ZN eee!      ZO eee"      ZP eee#      ZQ eee$      ZR eee%      ZS eee&      ZT eee(      ZU eee'      ZV eee2      ZW eee3      ZX eee)      ZY eee      ZZ eee      Z[ eee*      Z\ eee+      Z] eee,      Z^ eee-      Z_ eee/      Z` eee0      Za eee1      Zb eee4      Zc eee5      Zd eee6      Ze eee7      Zf eee8      Zg eee.      Zh eee9      Zi eee:      Zj eee;      Zk eee<      Zl eee>      Zm eee?      Zn eee@      Zo eeeA      Zp eeeB      Zq eeeC      Zr eeeD      Zs eeeE      Zt eeeF      Zu eeeG      Zv G d@ dAe      Zw G dB dCe      Zx G dD dEe      Zy G dF dGe      Zz G dH dIe      Z{ G dJ dKe      Z| ee|      Z| G dL dMe      Z} ee}dNO      Z} G dP dQe      Z~ ee~dRO      Z~ G dS dTe      Z eedUO      Z G dV dWe      Z eedXO      Z G dY dZe      Z eed[d\]      Z G d^ d_e      Z eed`O      Z G da dbe      Z eedcO      Z G dd dee      Z eedfdg]      Z G dh die      Z eedjdk]      Z G dl dme      Z eedndo]      Z G dp dqe      Z eedrO      Z G ds dte      Z eeduO      Z G dv dwe      Z eedxO      Z G dy dze      Z eed{O      Z G d| d}e      Z eed~O      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z G d de      Z G d de      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de      Z eedO      Z G d de~      Z G d de      Zg dZy)zAuto Model class.    N)OrderedDict)TYPE_CHECKINGUnion   )logging   )_BaseAutoBackboneClass_BaseAutoModelClass_LazyAutoMappingauto_class_update)CONFIG_MAPPING_NAMES)GenerationMixin)PreTrainedModelc                       e Zd Zy)_BaseModelWithGenerateN)__name__
__module____qualname__     d/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/transformers/models/auto/modeling_auto.pyr   r   %   s    r   r   (v  )aimv2
Aimv2Modelaimv2_vision_modelAimv2VisionModelalbertAlbertModelalign
AlignModelaltclipAltCLIPModel)apertusApertusModel)arcee
ArceeModel)aria	AriaModel)	aria_textAriaTextModel)audio-spectrogram-transformerASTModel)
autoformerAutoformerModel)
aya_visionAyaVisionModel)bamba
BambaModelbark	BarkModel)bart	BartModelbeit	BeitModelbert	BertModel)bert-generationBertGenerationEncoderbig_birdBigBirdModel)bigbird_pegasusBigBirdPegasusModel)biogptBioGptModelbitBitModel)bitnetBitNetModel)
blenderbotBlenderbotModel)blenderbot-smallBlenderbotSmallModelblip	BlipModel)blip-2
Blip2Model)blip_2_qformerBlip2QFormerModel)bloom
BloomModel)bridgetowerBridgeTowerModel)bros	BrosModel)	camembertCamembertModel)canineCanineModel)	chameleonChameleonModelchinese_clipChineseCLIPModel)chinese_clip_vision_modelChineseCLIPVisionModel)clap	ClapModelclip	CLIPModelclip_text_modelCLIPTextModel)clip_vision_modelCLIPVisionModelclipsegCLIPSegModel)clvp!ClvpModelForConditionalGeneration)
code_llama
LlamaModel)codegenCodeGenModel)cohereCohereModel)cohere2Cohere2Modelcohere2_visionCohere2VisionModelconditional_detrConditionalDetrModel)convbertConvBertModelconvnextConvNextModel
convnextv2ConvNextV2Model)cpmantCpmAntModelcsmCsmForConditionalGeneration)ctrl	CTRLModel)cvtCvtModel)d_fine
DFineModeldab-detrDabDetrModeldacDacModel)data2vec-audioData2VecAudioModeldata2vec-textData2VecTextModeldata2vec-visionData2VecVisionModel)dbrx	DbrxModeldebertaDebertaModel
deberta-v2DebertaV2Model)decision_transformerDecisionTransformerModel)deepseek_v2DeepseekV2Model)deepseek_v3DeepseekV3Model)deepseek_vlDeepseekVLModel)deepseek_vl_hybridDeepseekVLHybridModeldeformable_detrDeformableDetrModeldeit	DeiTModel	depth_proDepthProModeldeta	DetaModeldetr	DetrModel)diaDiaModel)	diffllamaDiffLlamaModeldinat
DinatModeldinov2Dinov2Modeldinov2_with_registersDinov2WithRegistersModeldinov3_convnextDINOv3ConvNextModel
dinov3_vitDINOv3ViTModel
distilbertDistilBertModel)doge	DogeModel)
donut-swinDonutSwinModel)dots1
Dots1Model)dprDPRQuestionEncoderdptDPTModelefficientformerEfficientFormerModel)efficientloftrEfficientLoFTRModelefficientnetEfficientNetModelelectraElectraModel)emu3	Emu3Model)encodecEncodecModel)ernie
ErnieModel)ernie4_5Ernie4_5Model)ernie4_5_moeErnie4_5_MoeModel)ernie_mErnieMModel)esmEsmModel)evollaEvollaModel)exaone4Exaone4Model)falconFalconModel)	falcon_h1FalconH1Model)falcon_mambaFalconMambaModelfastspeech2_conformerFastSpeech2ConformerModel"fastspeech2_conformer_with_hifiganFastSpeech2ConformerWithHifiGanflaubertFlaubertModel)flava
FlavaModel)	florence2Florence2Model)fnet	FNetModelfocalnetFocalNetModel)fsmt	FSMTModel)funnel)FunnelModelFunnelBaseModel)fuyu	FuyuModel)gemma
GemmaModel)gemma2Gemma2Model)gemma3Gemma3Model)gemma3_textGemma3TextModel)gemma3nGemma3nModel)gemma3n_audioGemma3nAudioEncoder)gemma3n_textGemma3nTextModel)gemma3n_visionTimmWrapperModel)gitGitModel)glmGlmModel)glm4	Glm4Model)glm4_moeGlm4MoeModel)glm4v
Glm4vModel)	glm4v_moeGlm4vMoeModel)glm4v_moe_textGlm4vMoeTextModel)
glm4v_textGlm4vTextModelglpn	GLPNModel)got_ocr2GotOcr2Model)gpt-sw3	GPT2Model)gpt2rM  )gpt_bigcodeGPTBigCodeModel)gpt_neoGPTNeoModel)gpt_neoxGPTNeoXModel)gpt_neox_japaneseGPTNeoXJapaneseModel)gpt_ossGptOssModel)gptj	GPTJModelzgptsan-japanese&GPTSanJapaneseForConditionalGeneration)graniteGraniteModel)
granitemoeGraniteMoeModel)granitemoehybridGraniteMoeHybridModel)granitemoesharedGraniteMoeSharedModel)
graphormerGraphormerModel)grounding-dinoGroundingDinoModel)groupvitGroupViTModel)heliumHeliumModelhgnet_v2HGNetV2Backbonehiera
HieraModel)hubertHubertModel)hunyuan_v1_denseHunYuanDenseV1Model)hunyuan_v1_moeHunYuanMoEV1Modelibert
IBertModel)ideficsIdeficsModel)idefics2Idefics2Model)idefics3Idefics3Model)idefics3_visionIdefics3VisionTransformerijepa
IJepaModelimagegptImageGPTModel)informerInformerModel)instructblipInstructBlipModel)instructblipvideoInstructBlipVideoModel)internvlInternVLModel)internvl_visionInternVLVisionModel)jamba
JambaModel)janus
JanusModel)jetmoeJetMoeModel)jukeboxJukeboxModel)kosmos-2Kosmos2Model)
kosmos-2.5Kosmos2_5Model)kyutai_speech_to_textKyutaiSpeechToTextModel)layoutlmLayoutLMModel)
layoutlmv2LayoutLMv2Model)
layoutlmv3LayoutLMv3Model)ledLEDModellevit
LevitModel)lfm2	Lfm2Model	lightglueLightGlueForKeypointMatching)lilt	LiltModel)llamar{   llama4Llama4ForConditionalGeneration)llama4_textLlama4TextModel)llava
LlavaModel)
llava_nextLlavaNextModel)llava_next_videoLlavaNextVideoModel)llava_onevisionLlavaOnevisionModel
longformerLongformerModel)longt5LongT5Model)luke	LukeModel)lxmertLxmertModel)m2m_100M2M100Model)mamba
MambaModel)mamba2Mamba2Model)marianMarianModel)markuplmMarkupLMModel)mask2formerMask2FormerModel)
maskformerMaskFormerModel)maskformer-swinMaskFormerSwinModel)mbart
MBartModel)mctct
MCTCTModel)mega	MegaModel)megatron-bertMegatronBertModel
metaclip_2MetaClip2Model)zmgp-strMgpstrForSceneTextRecognition)mimi	MimiModel)minimaxMiniMaxModel)mistralMistralModel)mistral3Mistral3Model)mixtralMixtralModelmlcdMLCDVisionModel)mllamaMllamaModel)mm-grounding-dinoMMGroundingDinoModel
mobilebertMobileBertModelmobilenet_v1MobileNetV1Modelmobilenet_v2MobileNetV2Model	mobilevitMobileViTModelmobilevitv2MobileViTV2Model)
modernbertModernBertModel)modernbert-decoderModernBertDecoderModel)	moonshineMoonshineModel)moshi
MoshiModel)mpnet
MPNetModel)mptMptModel)mraMraModel)mt5MT5Model)musicgenMusicgenModel)musicgen_melodyMusicgenMelodyModel)mvpMvpModelnatNatModel)nemotronNemotronModel)nezha
NezhaModel)nllb-moeNllbMoeModelnystromformerNystromformerModel)olmo	OlmoModel)olmo2
Olmo2Model)olmoe
OlmoeModelzomdet-turboOmDetTurboForObjectDetection)	oneformerOneFormerModel)
open-llamaOpenLlamaModel)
openai-gptOpenAIGPTModel)optOPTModel)ovis2
Ovis2Model)owlv2
Owlv2Model)owlvitOwlViTModel)	paligemmaPaliGemmaModel)patchtsmixerPatchTSMixerModel)patchtstPatchTSTModel)pegasusPegasusModel)	pegasus_xPegasusXModel)	perceiverPerceiverModel)perception_encoderPerceptionEncoder)perception_lmPerceptionLMModel)	persimmonPersimmonModel)phiPhiModel)phi3	Phi3Model)phi4_multimodalPhi4MultimodalModel)phimoePhimoeModel)pixtralPixtralVisionModel)plbartPLBartModel
poolformerPoolFormerModel)
prophetnetProphetNetModelpvtPvtModel)pvt_v2
PvtV2Model)qdqbertQDQBertModel)qwen2
Qwen2Model)
qwen2_5_vlQwen2_5_VLModel)qwen2_5_vl_textQwen2_5_VLTextModel)qwen2_audio_encoderQwen2AudioEncoder)	qwen2_moeQwen2MoeModel)qwen2_vlQwen2VLModel)qwen2_vl_textQwen2VLTextModel)qwen3
Qwen3Model)	qwen3_moeQwen3MoeModel)recurrent_gemmaRecurrentGemmaModelreformerReformerModelregnetRegNetModelrembertRemBertModelresnetResNetModel	retribertRetriBertModelrobertaRobertaModelroberta-prelayernormRobertaPreLayerNormModelroc_bertRoCBertModelroformerRoFormerModel)rt_detrRTDetrModel)
rt_detr_v2RTDetrV2Model)rwkv	RwkvModelsamSamModelsam2	Sam2Model)sam2_hiera_det_modelSam2HieraDetModel)
sam2_videoSam2VideoModel)sam2_vision_modelSam2VisionModelsam_hq
SamHQModel)sam_hq_vision_modelSamHQVisionModel)sam_vision_modelSamVisionModel)seamless_m4tSeamlessM4TModel)seamless_m4t_v2SeamlessM4Tv2Model)seed_ossSeedOssModel	segformerSegformerModel)seggptSegGptModel)sewSEWModel)sew-d	SEWDModelsiglipSiglipModelsiglip2Siglip2Modelsiglip_vision_modelSiglipVisionModel)smollm3SmolLM3Model)smolvlmSmolVLMModel)smolvlm_visionSmolVLMVisionTransformer)speech_to_textSpeech2TextModel)speecht5SpeechT5Model)splinterSplinterModelsqueezebertSqueezeBertModel)stablelmStableLmModel)
starcoder2Starcoder2ModelswiftformerSwiftFormerModelswin	SwinModelswin2srSwin2SRModelswinv2Swinv2Model)switch_transformersSwitchTransformersModel)t5T5Model)t5gemmaT5GemmaModeltable-transformerTableTransformerModel)tapas
TapasModel)textnetTextNetModel)time_series_transformerTimeSeriesTransformerModel)timesfmTimesFmModeltimesformerTimesformerModeltimm_backboneTimmBackbonetimm_wrapperr6  )trajectory_transformerTrajectoryTransformerModel)
transfo-xlTransfoXLModel)tvlt	TvltModel)tvpTvpModel)udop	UdopModel)umt5	UMT5Model)	unispeechUniSpeechModel)unispeech-satUniSpeechSatModel)univnetUnivNetModelvanVanModel)video_llavaVideoLlavaModelvideomaeVideoMAEModel)vilt	ViltModel)vipllavaVipLlavaModel)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)vjepa2VJEPA2ModelvoxtralVoxtralForConditionalGeneration)voxtral_encoderVoxtralEncoder)wav2vec2Wav2Vec2Model)wav2vec2-bertWav2Vec2BertModel)wav2vec2-conformerWav2Vec2ConformerModel)wavlm
WavLMModel)whisperWhisperModel)xclip
XCLIPModel)xcodecXcodecModel)xglm	XGLMModelxlmXLMModel)xlm-prophetnetXLMProphetNetModelxlm-robertaXLMRobertaModelxlm-roberta-xlXLMRobertaXLModel)xlnet
XLNetModel)xlstm
xLSTMModel)xmod	XmodModelyolos
YolosModel)yoso	YosoModel)zamba
ZambaModel)zamba2Zamba2Model)X)r   AlbertForPreTrainingr9   BartForConditionalGeneration)r?   BertForPreTraining)rD   BigBirdForPreTrainingrZ   BloomForCausalLMr`   CamembertForMaskedLMcolpaliColPaliForRetrieval)colqwen2ColQwen2ForRetrievalr   CTRLLMHeadModelr   Data2VecTextForMaskedLMr   DebertaForMaskedLMr   DebertaV2ForMaskedLMr   DistilBertForMaskedLM)r   ElectraForPreTraining)r   ErnieForPreTrainingr  EvollaForProteinText2Textr  Exaone4ForCausalLMr  FalconMambaForCausalLMr  FlaubertWithLMHeadModel)r  FlavaForPreTrainingr  !Florence2ForConditionalGeneration)r  FNetForPreTrainingr   FSMTForConditionalGeneration)r"  FunnelForPreTrainingr+  Gemma3ForConditionalGenerationrL  GPT2LMHeadModelrN  r  rO  GPTBigCodeForCausalLMr[  )rq  HieraForPreTrainingrz  IBertForMaskedLMr|  IdeficsForVisionText2Textr~   Idefics2ForConditionalGenerationr   Idefics3ForConditionalGenerationr  JanusForConditionalGenerationr  LayoutLMForMaskedLMr  LlavaForConditionalGenerationr  !LlavaNextForConditionalGenerationr  &LlavaNextVideoForConditionalGenerationr  &LlavaOnevisionForConditionalGenerationr  LongformerForMaskedLMr  LukeForMaskedLM)r  LxmertForPreTrainingr  MambaForCausalLMr  Mamba2ForCausalLMr  MegaForMaskedLM)r  MegatronBertForPreTrainingr   Mistral3ForConditionalGenerationr  MllamaForConditionalGeneration)r  MobileBertForPreTrainingr  MPNetForMaskedLMr  MptForCausalLMr  MraForMaskedLMr  MvpForConditionalGeneration)r"  NezhaForPreTrainingr$  NllbMoeForConditionalGenerationr5  OpenAIGPTLMHeadModelr?  !PaliGemmaForConditionalGenerationqwen2_audio"Qwen2AudioForConditionalGenerationr  r  RobertaForMaskedLMr  RobertaPreLayerNormForMaskedLM)r  RoCBertForPreTrainingr  RwkvForCausalLM)r  SplinterForPreTrainingr  SqueezeBertForMaskedLMr  *SwitchTransformersForConditionalGenerationr  T5ForConditionalGenerationr  T5GemmaForConditionalGenerationr  TapasForMaskedLMr  TransfoXLLMHeadModel)r  TvltForPreTraining)r  UniSpeechForPreTraining)r  UniSpeechSatForPreTrainingr  "VideoLlavaForConditionalGeneration)r  VideoMAEForPreTrainingr   VipLlavaForConditionalGeneration)r   VisualBertForPreTraining)r)  ViTMAEForPreTrainingr9  )r>  Wav2Vec2ForPreTraining)rB  Wav2Vec2ConformerForPreTrainingrO  XLMWithLMHeadModelrT  XLMRobertaForMaskedLMrW  XLMRobertaXLForMaskedLMrY  XLNetLMHeadModelr[  xLSTMForCausalLMr]  XmodForMaskedLM)Tr   AlbertForMaskedLMri  r?   BertForMaskedLMrD   BigBirdForMaskedLMrF   &BigBirdPegasusForConditionalGenerationrQ   'BlenderbotSmallForConditionalGenerationrm  ro  r|   CodeGenForCausalLMr   ConvBertForMaskedLMr   CpmAntForCausalLMrv  rx  rz  r|  r   DiaForConditionalGenerationr~  r   ElectraForMaskedLMzencoder-decoderEncoderDecoderModelr   ErnieForMaskedLMr  EsmForMaskedLMr  r  r  r  FNetForMaskedLMr  r"  FunnelForMaskedLMr7  GitForCausalLMr  r  r  rQ  GPTNeoForCausalLMrS  GPTNeoXForCausalLMrU  GPTNeoXJapaneseForCausalLMrY  GPTJForCausalLMr[  r  r  r  LEDForConditionalGenerationr  r  LongT5ForConditionalGenerationr  r  M2M100ForConditionalGenerationr  r  r  MarianMTModelr  r  MegatronBertForCausalLMr  MobileBertForMaskedLMr  !MoonshineForConditionalGenerationr  r  r  r  r"  NezhaForMaskedLMr  r'  NystromformerForMaskedLMr  rG   PegasusXForConditionalGenerationr[  PLBartForConditionalGeneration	pop2piano!Pop2PianoForConditionalGenerationrg  QDQBertForMaskedLMr~  ReformerModelWithLMHeadr  RemBertForMaskedLMr  r  r  RoCBertForMaskedLMr  RoFormerForMaskedLMr  r  #Speech2TextForConditionalGenerationr  r  r  r  r  r  r>  Wav2Vec2ForMaskedLMrF  WhisperForConditionalGenerationr  r  r  r  r  rb  YosoForMaskedLM))r&   ApertusForCausalLM)r(   ArceeForCausalLM)r,   AriaTextForCausalLM)r4   BambaForCausalLM)r9   BartForCausalLM)r?   BertLMHeadModel)rA   BertGenerationDecoder)rD   BigBirdForCausalLM)rF   BigBirdPegasusForCausalLM)rH   BioGptForCausalLM)rM   BitNetForCausalLM)rO   BlenderbotForCausalLM)rQ   BlenderbotSmallForCausalLMrm  )r`   CamembertForCausalLM)rz   LlamaForCausalLMr  )r~   CohereForCausalLM)r   Cohere2ForCausalLMr
  rv  )r   Data2VecTextForCausalLM)r   DbrxForCausalLM)r   DeepseekV2ForCausalLM)r   DeepseekV3ForCausalLM)r   DiffLlamaForCausalLM)r   DogeForCausalLM)r   Dots1ForCausalLM)r   ElectraForCausalLM)r   Emu3ForCausalLM)r   ErnieForCausalLM)r   Ernie4_5ForCausalLM)r   Ernie4_5_MoeForCausalLMr  )r  FalconForCausalLM)r
  FalconH1ForCausalLMr  r%  FuyuForCausalLM)r'  GemmaForCausalLM)r)  Gemma2ForCausalLMr  )r-  Gemma3ForCausalLMr/  Gemma3nForConditionalGeneration)r3  Gemma3nForCausalLMr  )r9  GlmForCausalLM)r;  Glm4ForCausalLM)r=  Glm4MoeForCausalLMrJ  GotOcr2ForConditionalGenerationr  r  r  r  r  r   )rW  GptOssForCausalLMr"  )r]  GraniteForCausalLM)r_  GraniteMoeForCausalLM)ra  GraniteMoeHybridForCausalLM)rc  GraniteMoeSharedForCausalLM)rk  HeliumForCausalLM)ru  HunYuanDenseV1ForCausalLM)rw  HunYuanMoEV1ForCausalLM)r  JambaForCausalLM)r  JetMoeForCausalLM)r  Lfm2ForCausalLM)r  r]  )r  Llama4ForCausalLM)r  r  r  r  )r  MarianForCausalLM)r  MBartForCausalLM)r  MegaForCausalLMr,  )r  MiniMaxForCausalLM)r  MistralForCausalLM)r  MixtralForCausalLM)r  MllamaForCausalLM)r	  ModernBertDecoderForCausalLM)r  MoshiForCausalLMr  )r  MusicgenForCausalLM)r  MusicgenMelodyForCausalLM)r  MvpForCausalLM)r   NemotronForCausalLM)r)  OlmoForCausalLM)r+  Olmo2ForCausalLM)r-  OlmoeForCausalLM)r3  OpenLlamaForCausalLMr  )r7  OPTForCausalLM)rE  PegasusForCausalLM)rO  PersimmonForCausalLM)rQ  PhiForCausalLM)rS  Phi3ForCausalLM)rU  Phi4MultimodalForCausalLM)rW  PhimoeForCausalLM)r[  PLBartForCausalLM)r`  ProphetNetForCausalLM)rg  QDQBertLMHeadModel)ri  Qwen2ForCausalLM)rq  Qwen2MoeForCausalLM)rw  Qwen3ForCausalLM)ry  Qwen3MoeForCausalLM)r{  RecurrentGemmaForCausalLMr?  )r  RemBertForCausalLM)r  RobertaForCausalLM)r  RobertaPreLayerNormForCausalLM)r  RoCBertForCausalLM)r  RoFormerForCausalLMr  )r  SeedOssForCausalLM)r  SmolLM3ForCausalLM)speech_to_text_2Speech2Text2ForCausalLM)r  StableLmForCausalLM)r  Starcoder2ForCausalLMr  )trocrTrOCRForCausalLM)rF  WhisperForCausalLM)rL  XGLMForCausalLMr  )rQ  XLMProphetNetForCausalLM)rT  XLMRobertaForCausalLM)rW  XLMRobertaXLForCausalLMr  r  )r]  XmodForCausalLM)rd  ZambaForCausalLM)rf  Zamba2ForCausalLM);r   r;   rJ   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  rG  rp  r  r  r  )r  Llama4VisionModelr  )r  MllamaVisionModelr  r  r  r  r  r]  rb  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r"  r%  r(  r+  r.  r4  r_  ))r   DeiTForMaskedImageModeling)r  FocalNetForMaskedImageModeling)r  SwinForMaskedImageModeling)r  Swinv2ForMaskedImageModeling)r#  ViTForMaskedImageModeling)r  ImageGPTForCausalImageModeling)-)r<   BeitForImageClassification)rK   BitForImageClassification)rn   CLIPForImageClassification)r   ConvNextForImageClassification)r    ConvNextV2ForImageClassification)r   CvtForImageClassification)r   $Data2VecVisionForImageClassification)r   )DeiTForImageClassification%DeiTForImageClassificationWithTeacher)r   DinatForImageClassification)r   Dinov2ForImageClassification)r   )Dinov2WithRegistersForImageClassification)r   DonutSwinForImageClassification)r   )%EfficientFormerForImageClassification0EfficientFormerForImageClassificationWithTeacher)r   "EfficientNetForImageClassification)r  FocalNetForImageClassification)rn  HGNetV2ForImageClassification)rq  HieraForImageClassification)r  IJepaForImageClassification)r  ImageGPTForImageClassification)r  )LevitForImageClassification&LevitForImageClassificationWithTeacher)r  MetaClip2ForImageClassification)r  !MobileNetV1ForImageClassification)r  !MobileNetV2ForImageClassification)r  MobileViTForImageClassification)r  !MobileViTV2ForImageClassification)r  NatForImageClassification)rI  )&PerceiverForImageClassificationLearned&PerceiverForImageClassificationFourier-PerceiverForImageClassificationConvProcessing)r^   PoolFormerForImageClassification)rc  PvtForImageClassification)re  PvtV2ForImageClassification)r  RegNetForImageClassification)r  ResNetForImageClassification)r  SegformerForImageClassification)shieldgemma2"ShieldGemma2ForImageClassification)r  SiglipForImageClassification)r  Siglip2ForImageClassification)r  !SwiftFormerForImageClassification)r  SwinForImageClassification)r  Swinv2ForImageClassification)r  TextNetForImageClassification)r   !TimmWrapperForImageClassification)r  VanForImageClassification)r#  ViTForImageClassification)r&  ViTHybridForImageClassification)r,  ViTMSNForImageClassificationr   DetrForSegmentation))r<   BeitForSemanticSegmentation)r   %Data2VecVisionForSemanticSegmentation)r   DPTForSemanticSegmentation)r  "MobileNetV2ForSemanticSegmentation)r   MobileViTForSemanticSegmentation)r  "MobileViTV2ForSemanticSegmentation)r   SegformerForSemanticSegmentation)upernetUperNetForSemanticSegmentationr  !MaskFormerForInstanceSegmentation)r  )eomtEomtForUniversalSegmentation)r  #Mask2FormerForUniversalSegmentationr  )r1  !OneFormerForUniversalSegmentation))r  !TimesformerForVideoClassification)r  VideoMAEForVideoClassification)r5  VivitForVideoClassification)r7  VJEPA2ForVideoClassification)rT   BlipForConditionalGenerationrV   Blip2ForConditionalGenerationrd   !ChameleonForConditionalGenerationr  r  r  r  $InstructBlipForConditionalGeneration)r  )InstructBlipVideoForConditionalGenerationr  Kosmos2ForConditionalGenerationr  !Kosmos2_5ForConditionalGenerationr  r  r  r  r  r  r9  Ovis2ForConditionalGenerationr  
pix2struct"Pix2StructForConditionalGenerationrk  "Qwen2_5_VLForConditionalGenerationrs  Qwen2VLForConditionalGenerationr  r  zvision-encoder-decoderVisionEncoderDecoderModelrq  )-)r*   AriaForConditionalGeneration)r2   !AyaVisionForConditionalGenerationr  r  r  )r   %Cohere2VisionForConditionalGeneration)r   "DeepseekVLForConditionalGeneration)r   (DeepseekVLHybridForConditionalGeneration)r   Emu3ForConditionalGenerationr  r  rn  r  rs  r  )r?  Glm4vForConditionalGeneration)rA   Glm4vMoeForConditionalGenerationry  r  r  r  r  )r   InternVLForConditionalGenerationr  r  r  r  r  r  r  r  r  r  r  r  )rM  $PerceptionLMForConditionalGenerationr  )rY  r  r  r   )r  r  )r  SmolVLMForConditionalGeneration)r	  UdopForConditionalGenerationr  r"  ).r  ri  r  r   ro  r  rx  rz  r|  r~  r  r  r  r  r  r  r  r  r  r  r  MBartForConditionalGenerationr  )r  MegatronBertForMaskedLMr.  )r  ModernBertForMaskedLMr  r  r  r2  r4  )rI  PerceiverForMaskedLMr=  )r~  ReformerForMaskedLMrA  r  r  rC  rE  r  r  rI  r  r  r  r  rM  )
)r   !ConditionalDetrForObjectDetection)r   DFineForObjectDetection)r   DabDetrForObjectDetection)r    DeformableDetrForObjectDetection)r   DetaForObjectDetection)r   DetrForObjectDetection)r  RTDetrForObjectDetection)r  RTDetrV2ForObjectDetection)r  "TableTransformerForObjectDetection)r`  YolosForObjectDetection))rg  GroundingDinoForObjectDetection)r  !MMGroundingDinoForObjectDetectionr/  )r;  Owlv2ForObjectDetection)r=  OwlViTForObjectDetection))depth_anythingDepthAnythingForDepthEstimation)r   DepthProForDepthEstimation)r   DPTForDepthEstimation)rH  GLPNForDepthEstimation)prompt_depth_anything%PromptDepthAnythingForDepthEstimation)zoedepthZoeDepthForDepthEstimation)ri  r  )rO   "BlenderbotForConditionalGenerationr  r  r  r[  granite_speech%GraniteSpeechForConditionalGenerationr$  r&  r(  r*  r0  )r  MT5ForConditionalGenerationr  r  )rE  PegasusForConditionalGenerationr6  r8  )r`  "ProphetNetForConditionalGenerationr  )r  SeamlessM4TForTextToText)r  SeamlessM4Tv2ForTextToTextr  r  r  )r  UMT5ForConditionalGenerationr9  )rQ  %XLMProphetNetForConditionalGeneration)r  rN  )r  *KyutaiSpeechToTextForConditionalGenerationr0  r:  )r  SeamlessM4TForSpeechToText)r  SeamlessM4Tv2ForSpeechToText)zspeech-encoder-decoderSpeechEncoderDecoderModelrG  )r  SpeechT5ForSpeechToTextrK  )p)r   AlbertForSequenceClassification)r(   ArceeForSequenceClassification)r9   BartForSequenceClassification)r?   BertForSequenceClassification)rD    BigBirdForSequenceClassification)rF   'BigBirdPegasusForSequenceClassification)rH   BioGptForSequenceClassification)rZ   BloomForSequenceClassification)r`   "CamembertForSequenceClassification)rb   CanineForSequenceClassification)rz   LlamaForSequenceClassification)r   !ConvBertForSequenceClassification)r   CTRLForSequenceClassification)r   %Data2VecTextForSequenceClassification)r    DebertaForSequenceClassification)r   "DebertaV2ForSequenceClassification)r   #DeepseekV2ForSequenceClassification)r   #DeepseekV3ForSequenceClassification)r   "DiffLlamaForSequenceClassification)r   #DistilBertForSequenceClassification)r   DogeForSequenceClassification)r    ElectraForSequenceClassification)r   ErnieForSequenceClassification)r   ErnieMForSequenceClassification)r  EsmForSequenceClassification)r   Exaone4ForSequenceClassification)r  FalconForSequenceClassification)r  !FlaubertForSequenceClassification)r  FNetForSequenceClassification)r"  FunnelForSequenceClassification)r'  GemmaForSequenceClassification)r)  Gemma2ForSequenceClassification)r+  Gemma3ForSequenceClassification)r9  GlmForSequenceClassification)r;  Glm4ForSequenceClassification)rL  GPT2ForSequenceClassification)rN  r  )rO  #GPTBigCodeForSequenceClassification)rQ  GPTNeoForSequenceClassification)rS   GPTNeoXForSequenceClassification)rW  GptOssForSequenceClassification)rY  GPTJForSequenceClassification)rk  HeliumForSequenceClassification)ru  'HunYuanDenseV1ForSequenceClassification)rw  %HunYuanMoEV1ForSequenceClassification)rz  IBertForSequenceClassification)r  JambaForSequenceClassification)r  JetMoeForSequenceClassification)r  !LayoutLMForSequenceClassification)r  #LayoutLMv2ForSequenceClassification)r  #LayoutLMv3ForSequenceClassification)r  LEDForSequenceClassification)r  LiltForSequenceClassification)r  rg  )r  #LongformerForSequenceClassification)r  LukeForSequenceClassification)r  !MarkupLMForSequenceClassification)r  MBartForSequenceClassification)r  MegaForSequenceClassification)r  %MegatronBertForSequenceClassification)r   MiniMaxForSequenceClassification)r   MistralForSequenceClassification)r   MixtralForSequenceClassification)r  #MobileBertForSequenceClassification)r  #ModernBertForSequenceClassification)r	  *ModernBertDecoderForSequenceClassification)r  MPNetForSequenceClassification)r  MptForSequenceClassification)r  MraForSequenceClassification)r  MT5ForSequenceClassification)r  MvpForSequenceClassification)r   !NemotronForSequenceClassification)r"  NezhaForSequenceClassification)r'  &NystromformerForSequenceClassification)r3  "OpenLlamaForSequenceClassification)r5  "OpenAIGPTForSequenceClassification)r7  OPTForSequenceClassification)rI  "PerceiverForSequenceClassification)rO  "PersimmonForSequenceClassification)rQ  PhiForSequenceClassification)rS  Phi3ForSequenceClassification)rW  PhimoeForSequenceClassification)r[  PLBartForSequenceClassification)rg   QDQBertForSequenceClassification)ri  Qwen2ForSequenceClassification)rq  !Qwen2MoeForSequenceClassification)rw  Qwen3ForSequenceClassification)ry  !Qwen3MoeForSequenceClassification)r~  !ReformerForSequenceClassification)r   RemBertForSequenceClassification)r   RobertaForSequenceClassification)r  ,RobertaPreLayerNormForSequenceClassification)r   RoCBertForSequenceClassification)r  !RoFormerForSequenceClassification)r   SeedOssForSequenceClassification)r   SmolLM3ForSequenceClassification)r  $SqueezeBertForSequenceClassification)r  !StableLmForSequenceClassification)r  #Starcoder2ForSequenceClassification)r  T5ForSequenceClassification)r   T5GemmaForSequenceClassification)r  TapasForSequenceClassification)r  "TransfoXLForSequenceClassification)r  UMT5ForSequenceClassification)rO  XLMForSequenceClassification)rT  #XLMRobertaForSequenceClassification)rW  %XLMRobertaXLForSequenceClassification)rY  XLNetForSequenceClassification)r]  XmodForSequenceClassification)rb  YosoForSequenceClassification)rd  ZambaForSequenceClassification)rf  Zamba2ForSequenceClassification)M)r   AlbertForQuestionAnswering)r(   ArceeForQuestionAnswering)r9   BartForQuestionAnswering)r?   BertForQuestionAnswering)rD   BigBirdForQuestionAnswering)rF   "BigBirdPegasusForQuestionAnswering)rZ   BloomForQuestionAnswering)r`   CamembertForQuestionAnswering)rb   CanineForQuestionAnswering)r   ConvBertForQuestionAnswering)r    Data2VecTextForQuestionAnswering)r   DebertaForQuestionAnswering)r   DebertaV2ForQuestionAnswering)r   DiffLlamaForQuestionAnswering)r   DistilBertForQuestionAnswering)r   ElectraForQuestionAnswering)r   ErnieForQuestionAnswering)r   ErnieMForQuestionAnswering)r  Exaone4ForQuestionAnswering)r  FalconForQuestionAnswering)r  "FlaubertForQuestionAnsweringSimple)r  FNetForQuestionAnswering)r"  FunnelForQuestionAnswering)rN  GPT2ForQuestionAnswering)rQ  GPTNeoForQuestionAnswering)rS  GPTNeoXForQuestionAnswering)rY  GPTJForQuestionAnswering)rz  IBertForQuestionAnsweringr  LayoutLMv2ForQuestionAnsweringr  LayoutLMv3ForQuestionAnswering)r  LEDForQuestionAnswering)r  LiltForQuestionAnswering)r  LlamaForQuestionAnswering)r  LongformerForQuestionAnswering)r  LukeForQuestionAnswering)r  LxmertForQuestionAnswering)r  MarkupLMForQuestionAnswering)r  MBartForQuestionAnswering)r  MegaForQuestionAnswering)r   MegatronBertForQuestionAnswering)r  MiniMaxForQuestionAnswering)r  MistralForQuestionAnswering)r  MixtralForQuestionAnswering)r  MobileBertForQuestionAnswering)r  ModernBertForQuestionAnswering)r  MPNetForQuestionAnswering)r  MptForQuestionAnswering)r  MraForQuestionAnswering)r  MT5ForQuestionAnswering)r  MvpForQuestionAnswering)r   NemotronForQuestionAnswering)r"  NezhaForQuestionAnswering)r'  !NystromformerForQuestionAnswering)r7  OPTForQuestionAnswering)rg  QDQBertForQuestionAnswering)ri  Qwen2ForQuestionAnswering)rq  Qwen2MoeForQuestionAnswering)rw  Qwen3ForQuestionAnswering)ry  Qwen3MoeForQuestionAnswering)r~  ReformerForQuestionAnswering)r  RemBertForQuestionAnswering)r  RobertaForQuestionAnswering)r  'RobertaPreLayerNormForQuestionAnswering)r  RoCBertForQuestionAnswering)r  RoFormerForQuestionAnswering)r  SeedOssForQuestionAnswering)r  SmolLM3ForQuestionAnswering)r  SplinterForQuestionAnswering)r  SqueezeBertForQuestionAnswering)r  T5ForQuestionAnswering)r  UMT5ForQuestionAnswering)rO  XLMForQuestionAnsweringSimple)rT  XLMRobertaForQuestionAnswering)rW   XLMRobertaXLForQuestionAnswering)rY  XLNetForQuestionAnsweringSimple)r]  XmodForQuestionAnswering)rb  YosoForQuestionAnswering)r  TapasForQuestionAnswering))rT   BlipForQuestionAnsweringr  )r  ViltForQuestionAnswering))r  LayoutLMForQuestionAnsweringr  r  )V)r   AlbertForTokenClassification)r&   ApertusForTokenClassification)r(   ArceeForTokenClassification)r?   BertForTokenClassification)rD   BigBirdForTokenClassification)rH   BioGptForTokenClassification)rZ   BloomForTokenClassification)r^   BrosForTokenClassification)r`   CamembertForTokenClassification)rb   CanineForTokenClassification)r   ConvBertForTokenClassification)r   "Data2VecTextForTokenClassification)r   DebertaForTokenClassification)r   DebertaV2ForTokenClassification)r   DiffLlamaForTokenClassification)r    DistilBertForTokenClassification)r   ElectraForTokenClassification)r   ErnieForTokenClassification)r   ErnieMForTokenClassification)r  EsmForTokenClassification)r  Exaone4ForTokenClassification)r  FalconForTokenClassification)r  FlaubertForTokenClassification)r  FNetForTokenClassification)r"  FunnelForTokenClassification)r'  GemmaForTokenClassification)r)  Gemma2ForTokenClassification)r9  GlmForTokenClassification)r;  Glm4ForTokenClassification)rL  GPT2ForTokenClassification)rN  r;  )rO   GPTBigCodeForTokenClassification)rQ  GPTNeoForTokenClassification)rS  GPTNeoXForTokenClassification)rW  GptOssForTokenClassification)rk  HeliumForTokenClassification)rz  IBertForTokenClassification)r  LayoutLMForTokenClassification)r   LayoutLMv2ForTokenClassification)r   LayoutLMv3ForTokenClassification)r  LiltForTokenClassification)r  LlamaForTokenClassification)r   LongformerForTokenClassification)r  LukeForTokenClassification)r  MarkupLMForTokenClassification)r  MegaForTokenClassification)r  "MegatronBertForTokenClassification)r  MiniMaxForTokenClassification)r  MistralForTokenClassification)r  MixtralForTokenClassification)r   MobileBertForTokenClassification)r   ModernBertForTokenClassification)r  MPNetForTokenClassification)r  MptForTokenClassification)r  MraForTokenClassification)r  MT5ForTokenClassification)r   NemotronForTokenClassification)r"  NezhaForTokenClassification)r'  #NystromformerForTokenClassification)rO  PersimmonForTokenClassification)rQ  PhiForTokenClassification)rS  Phi3ForTokenClassification)rg  QDQBertForTokenClassification)ri  Qwen2ForTokenClassification)rq  Qwen2MoeForTokenClassification)rw  Qwen3ForTokenClassification)ry  Qwen3MoeForTokenClassification)r  RemBertForTokenClassification)r  RobertaForTokenClassification)r  )RobertaPreLayerNormForTokenClassification)r  RoCBertForTokenClassification)r  RoFormerForTokenClassification)r  SeedOssForTokenClassification)r  SmolLM3ForTokenClassification)r  !SqueezeBertForTokenClassification)r  StableLmForTokenClassification)r   Starcoder2ForTokenClassification)r  T5ForTokenClassification)r  T5GemmaForTokenClassification)r  UMT5ForTokenClassification)rO  XLMForTokenClassification)rT   XLMRobertaForTokenClassification)rW  "XLMRobertaXLForTokenClassification)rY  XLNetForTokenClassification)r]  XmodForTokenClassification)rb  YosoForTokenClassification)')r   AlbertForMultipleChoice)r?   BertForMultipleChoice)rD   BigBirdForMultipleChoice)r`   CamembertForMultipleChoice)rb   CanineForMultipleChoice)r   ConvBertForMultipleChoice)r   Data2VecTextForMultipleChoice)r   DebertaV2ForMultipleChoice)r   DistilBertForMultipleChoice)r   ElectraForMultipleChoice)r   ErnieForMultipleChoice)r   ErnieMForMultipleChoice)r  FlaubertForMultipleChoice)r  FNetForMultipleChoice)r"  FunnelForMultipleChoice)rz  IBertForMultipleChoice)r  LongformerForMultipleChoice)r  LukeForMultipleChoice)r  MegaForMultipleChoice)r  MegatronBertForMultipleChoice)r  MobileBertForMultipleChoice)r  ModernBertForMultipleChoice)r  MPNetForMultipleChoice)r  MraForMultipleChoice)r"  NezhaForMultipleChoice)r'  NystromformerForMultipleChoice)rg  QDQBertForMultipleChoice)r  RemBertForMultipleChoice)r  RobertaForMultipleChoice)r  $RobertaPreLayerNormForMultipleChoice)r  RoCBertForMultipleChoice)r  RoFormerForMultipleChoice)r  SqueezeBertForMultipleChoice)rO  XLMForMultipleChoice)rT  XLMRobertaForMultipleChoice)rW  XLMRobertaXLForMultipleChoice)rY  XLNetForMultipleChoice)r]  XmodForMultipleChoice)rb  YosoForMultipleChoice))r?   BertForNextSentencePrediction)r   ErnieForNextSentencePrediction)r  FNetForNextSentencePrediction)r  %MegatronBertForNextSentencePrediction)r  #MobileBertForNextSentencePrediction)r"  NezhaForNextSentencePrediction)rg   QDQBertForNextSentencePrediction))r.   ASTForAudioClassification)r   &Data2VecAudioForSequenceClassification)rs  HubertForSequenceClassification)r  SEWForSequenceClassification)r  SEWDForSequenceClassification)r  "UniSpeechForSequenceClassification)r  %UniSpeechSatForSequenceClassification)r>  !Wav2Vec2ForSequenceClassification)r@  %Wav2Vec2BertForSequenceClassification)rB  *Wav2Vec2ConformerForSequenceClassification)rD  WavLMForSequenceClassification)rF  WhisperForAudioClassification))r   Data2VecAudioForCTC)rs  HubertForCTC)r  MCTCTForCTC)r  	SEWForCTC)r  
SEWDForCTC)r  UniSpeechForCTC)r  UniSpeechSatForCTC)r>  Wav2Vec2ForCTC)r@  Wav2Vec2BertForCTC)rB  Wav2Vec2ConformerForCTC)rD  WavLMForCTC))r   (Data2VecAudioForAudioFrameClassification)r  'UniSpeechSatForAudioFrameClassification)r>  #Wav2Vec2ForAudioFrameClassification)r@  'Wav2Vec2BertForAudioFrameClassification)rB  ,Wav2Vec2ConformerForAudioFrameClassification)rD   WavLMForAudioFrameClassification))r   Data2VecAudioForXVector)r  UniSpeechSatForXVector)r>  Wav2Vec2ForXVector)r@  Wav2Vec2BertForXVector)rB  Wav2Vec2ConformerForXVector)rD  WavLMForXVectorr  )r  SpeechT5ForTextToSpeech)
r6   r   )r  r  r  )r   MusicgenForConditionalGeneration)r  &MusicgenMelodyForConditionalGeneration)qwen2_5_omni#Qwen2_5OmniForConditionalGeneration)r  SeamlessM4TForTextToSpeech)r  SeamlessM4Tv2ForTextToSpeechr1  )
r    r#   rS   )rV   Blip2ForImageTextRetrievalrf   rm   ru   r  r  r  ))r<   BeitBackbone)rK   BitBackbone)r   ConvNextBackbone)r   ConvNextV2Backbone)r   DinatBackbone)r   Dinov2Backbone)r   Dinov2WithRegistersBackbone)r  FocalNetBackbonerm  )rq  HieraBackbone)r  MaskFormerSwinBackbone)r  NatBackbone)re  PvtV2Backbone)r  ResNetBackbone)rt_detr_resnetRTDetrResNetBackbone)r  SwinBackbone)r  Swinv2Backbone)r  TextNetBackboner  )r/  VitDetBackbone)vitpose_backboneVitPoseBackbone)r  r  )r  r  r  )
superpointSuperPointForKeypointDetection))r   !EfficientLoFTRForKeypointMatchingr  )	superglueSuperGlueForKeypointMatching)r   r>   rC   rp   r   r   r   r   r   )r   Emu3TextModelr  ry  )r  r  r  )r  MllamaTextModelr  )r  MT5EncoderModelr&  r}  r  r  r  r  r  r  )r  T5EncoderModel)r  T5GemmaEncoderModel)r  UMT5EncoderModelrN  rS  rV  )rA  'PatchTSMixerForTimeSeriesClassification)rC  PatchTSTForClassification)rA  PatchTSMixerForRegression)rC  PatchTSTForRegression)r  TimesFmModelForPrediction)r  Swin2SRForImageSuperResolutionr   c                       e Zd ZeZy)AutoModelForMaskGenerationN)r   r   r   !MODEL_FOR_MASK_GENERATION_MAPPING_model_mappingr   r   r   r  r  V      6Nr   r  c                       e Zd ZeZy)AutoModelForKeypointDetectionN)r   r   r   $MODEL_FOR_KEYPOINT_DETECTION_MAPPINGr  r   r   r   r  r  Z      9Nr   r  c                       e Zd ZeZy)AutoModelForKeypointMatchingN)r   r   r   #MODEL_FOR_KEYPOINT_MATCHING_MAPPINGr  r   r   r   r  r  ^  s    8Nr   r  c                       e Zd ZeZy)AutoModelForTextEncodingN)r   r   r   MODEL_FOR_TEXT_ENCODING_MAPPINGr  r   r   r   r  r  b      4Nr   r  c                       e Zd ZeZy)AutoModelForImageToImageN)r   r   r    MODEL_FOR_IMAGE_TO_IMAGE_MAPPINGr  r   r   r   r  r  f  s    5Nr   r  c                       e Zd ZeZy)	AutoModelN)r   r   r   MODEL_MAPPINGr  r   r   r   r  r  j  s    "Nr   r  c                       e Zd ZeZy)AutoModelForPreTrainingN)r   r   r   MODEL_FOR_PRETRAINING_MAPPINGr  r   r   r   r	  r	  q  s    2Nr   r	  pretraining)head_docc                       e Zd ZeZy)_AutoModelWithLMHeadN)r   r   r   MODEL_WITH_LM_HEAD_MAPPINGr  r   r   r   r  r  y      /Nr   r  zlanguage modelingc                   d     e Zd ZeZeded    deee	j                  e   f   ddf fd       Z xZS )AutoModelForCausalLMclspretrained_model_name_or_pathreturnr   c                 *    t        |   |g|i |S Nsuperfrom_pretrainedr  r  
model_argskwargs	__class__s       r   r  z$AutoModelForCausalLM.from_pretrained  !     w&'D\z\U[\\r   )r   r   r   MODEL_FOR_CAUSAL_LM_MAPPINGr  classmethodtyper   strosPathLiker  __classcell__r  s   @r   r  r    sT    0N ]()]',S"++c2B-B'C]
 
"] ]r   r  zcausal language modelingc                       e Zd ZeZy)AutoModelForMaskedLMN)r   r   r   MODEL_FOR_MASKED_LM_MAPPINGr  r   r   r   r)  r)    s    0Nr   r)  zmasked language modelingc                       e Zd ZeZy)AutoModelForSeq2SeqLMN)r   r   r   &MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPINGr  r   r   r   r,  r,        ;Nr   r,  z&sequence-to-sequence language modelingzgoogle-t5/t5-base)r  checkpoint_for_examplec                       e Zd ZeZy)"AutoModelForSequenceClassificationN)r   r   r   )MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPINGr  r   r   r   r1  r1    s    >Nr   r1  zsequence classificationc                       e Zd ZeZy)AutoModelForQuestionAnsweringN)r   r   r   $MODEL_FOR_QUESTION_ANSWERING_MAPPINGr  r   r   r   r4  r4    r  r   r4  zquestion answeringc                       e Zd ZeZy)"AutoModelForTableQuestionAnsweringN)r   r   r   *MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPINGr  r   r   r   r7  r7        ?Nr   r7  ztable question answeringzgoogle/tapas-base-finetuned-wtqc                       e Zd ZeZy)#AutoModelForVisualQuestionAnsweringN)r   r   r   +MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPINGr  r   r   r   r;  r;    s    @Nr   r;  zvisual question answeringzdandelin/vilt-b32-finetuned-vqac                       e Zd ZeZy)%AutoModelForDocumentQuestionAnsweringN)r   r   r   -MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPINGr  r   r   r   r>  r>    s    BNr   r>  zdocument question answeringz/impira/layoutlm-document-qa", revision="52e01b3c                       e Zd ZeZy)AutoModelForTokenClassificationN)r   r   r   &MODEL_FOR_TOKEN_CLASSIFICATION_MAPPINGr  r   r   r   rA  rA    r.  r   rA  ztoken classificationc                       e Zd ZeZy)AutoModelForMultipleChoiceN)r   r   r   !MODEL_FOR_MULTIPLE_CHOICE_MAPPINGr  r   r   r   rD  rD    r  r   rD  zmultiple choicec                       e Zd ZeZy)"AutoModelForNextSentencePredictionN)r   r   r   *MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPINGr  r   r   r   rG  rG    r9  r   rG  znext sentence predictionc                       e Zd ZeZy)AutoModelForImageClassificationN)r   r   r   &MODEL_FOR_IMAGE_CLASSIFICATION_MAPPINGr  r   r   r   rJ  rJ    r.  r   rJ  zimage classificationc                       e Zd ZeZy)'AutoModelForZeroShotImageClassificationN)r   r   r   0MODEL_FOR_ZERO_SHOT_IMAGE_CLASSIFICATION_MAPPINGr  r   r   r   rM  rM    s    ENr   rM  zzero-shot image classificationc                       e Zd ZeZy)AutoModelForImageSegmentationN)r   r   r   $MODEL_FOR_IMAGE_SEGMENTATION_MAPPINGr  r   r   r   rP  rP    r  r   rP  zimage segmentationc                       e Zd ZeZy) AutoModelForSemanticSegmentationN)r   r   r   'MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPINGr  r   r   r   rS  rS        <Nr   rS  zsemantic segmentationc                       e Zd ZeZy) AutoModelForTimeSeriesPredictionN)r   r   r   (MODEL_FOR_TIME_SERIES_PREDICTION_MAPPINGr  r   r   r   rW  rW        =Nr   rW  ztime-series predictionc                       e Zd ZeZy)!AutoModelForUniversalSegmentationN)r   r   r   (MODEL_FOR_UNIVERSAL_SEGMENTATION_MAPPINGr  r   r   r   r[  r[    rY  r   r[  zuniversal image segmentationc                       e Zd ZeZy) AutoModelForInstanceSegmentationN)r   r   r   'MODEL_FOR_INSTANCE_SEGMENTATION_MAPPINGr  r   r   r   r^  r^    rU  r   r^  zinstance segmentationc                       e Zd ZeZy)AutoModelForObjectDetectionN)r   r   r   "MODEL_FOR_OBJECT_DETECTION_MAPPINGr  r   r   r   ra  ra  &      7Nr   ra  zobject detectionc                       e Zd ZeZy)#AutoModelForZeroShotObjectDetectionN)r   r   r   ,MODEL_FOR_ZERO_SHOT_OBJECT_DETECTION_MAPPINGr  r   r   r   re  re  -      ANr   re  zzero-shot object detectionc                       e Zd ZeZy)AutoModelForDepthEstimationN)r   r   r   "MODEL_FOR_DEPTH_ESTIMATION_MAPPINGr  r   r   r   ri  ri  6  rc  r   ri  zdepth estimationc                       e Zd ZeZy)AutoModelForVideoClassificationN)r   r   r   &MODEL_FOR_VIDEO_CLASSIFICATION_MAPPINGr  r   r   r   rl  rl  =  r.  r   rl  zvideo classificationc                       e Zd ZeZy)_AutoModelForVision2SeqN)r   r   r   MODEL_FOR_VISION_2_SEQ_MAPPINGr  r   r   r   ro  ro  E  s    3Nr   ro  zvision-to-text modelingc                   d     e Zd ZeZeded    deee	j                  e   f   ddf fd       Z xZS )AutoModelForImageTextToTextr  r  r  r   c                 *    t        |   |g|i |S r  r  r  s       r   r  z+AutoModelForImageTextToText.from_pretrainedP  r  r   )r   r   r   $MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPINGr  r!  r"  r   r#  r$  r%  r  r&  r'  s   @r   rr  rr  L  sT    9N ]/0]',S"++c2B-B'C]
 
"] ]r   rr  zimage-text-to-text modelingc                       e Zd ZeZy)AutoModelForAudioClassificationN)r   r   r   &MODEL_FOR_AUDIO_CLASSIFICATION_MAPPINGr  r   r   r   rv  rv  ]  r.  r   rv  zaudio classificationc                       e Zd ZeZy)AutoModelForCTCN)r   r   r   MODEL_FOR_CTC_MAPPINGr  r   r   r   ry  ry  d  s    *Nr   ry  z%connectionist temporal classificationc                       e Zd ZeZy)AutoModelForSpeechSeq2SeqN)r   r   r   "MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPINGr  r   r   r   r|  r|  k  rc  r   r|  z,sequence-to-sequence speech-to-text modelingc                       e Zd ZeZy)$AutoModelForAudioFrameClassificationN)r   r   r   ,MODEL_FOR_AUDIO_FRAME_CLASSIFICATION_MAPPINGr  r   r   r   r  r  t  rg  r   r  z"audio frame (token) classificationc                       e Zd ZeZy)AutoModelForAudioXVectorN)r   r   r   MODEL_FOR_AUDIO_XVECTOR_MAPPINGr  r   r   r   r  r  }  r  r   r  c                       e Zd ZeZy)AutoModelForTextToSpectrogramN)r   r   r   %MODEL_FOR_TEXT_TO_SPECTROGRAM_MAPPINGr  r   r   r   r  r    s    :Nr   r  c                       e Zd ZeZy)AutoModelForTextToWaveformN)r   r   r   "MODEL_FOR_TEXT_TO_WAVEFORM_MAPPINGr  r   r   r   r  r    rc  r   r  c                       e Zd ZeZy)AutoBackboneN)r   r   r   MODEL_FOR_BACKBONE_MAPPINGr  r   r   r   r  r    r  r   r  zaudio retrieval via x-vectorc                       e Zd ZeZy)AutoModelForMaskedImageModelingN)r   r   r   'MODEL_FOR_MASKED_IMAGE_MODELING_MAPPINGr  r   r   r   r  r    rU  r   r  zmasked image modelingc                       e Zd ZeZy)AutoModelForAudioTokenizationN)r   r   r   $MODEL_FOR_AUDIO_TOKENIZATION_MAPPINGr  r   r   r   r  r    r  r   r  z$audio tokenization through codebooksc                   <     e Zd Ze fd       Ze fd       Z xZS )AutoModelWithLMHeadc                 V    t        j                  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FutureWarningr  from_configr  configr  s     r   r  zAutoModelWithLMHead.from_config  s,    B 		
 w"6**r   c                 ^    t        j                  dt               t        |   |g|i |S r  r  r  r  r  r  r  s       r   r  z#AutoModelWithLMHead.from_pretrained  s8    B 		
 w&'D\z\U[\\r   r   r   r   r!  r  r  r&  r'  s   @r   r  r    s+    + + ] ]r   r  c                   <     e Zd Ze fd       Ze fd       Z xZS )AutoModelForVision2Seqc                 V    t        j                  dt               t        |   |      S NzThe class `AutoModelForVision2Seq` is deprecated and will be removed in v5.0. Please use `AutoModelForImageTextToText` instead.r  r  s     r   r  z"AutoModelForVision2Seq.from_config  s)    5	

 w"6**r   c                 ^    t        j                  dt               t        |   |g|i |S r  r  r  s       r   r  z&AutoModelForVision2Seq.from_pretrained  s5    5	

 w&'D\z\U[\\r   r  r'  s   @r   r  r    s+    + + ] ]r   r  )Yrw  r  r  r  r  'MODEL_FOR_CAUSAL_IMAGE_MODELING_MAPPINGr   rz  r?  rj  rK  MODEL_FOR_IMAGE_MAPPINGrQ  r  r  r  r_  r  r*  r  rE  rH  rb  r
  r5  rT  r-  r2  r}  r8  r   r  r  rX  rB  r\  rm  rp  MODEL_FOR_RETRIEVAL_MAPPINGrt  r<  r  r  rN  rf  ,MODEL_FOR_TIME_SERIES_CLASSIFICATION_MAPPING(MODEL_FOR_TIME_SERIES_REGRESSION_MAPPINGr  r  rv  r  r  r  r  ry  ri  rJ  rP  r  r^  r  r  r  r  r  r)  rD  rG  ra  r	  r4  rS  r,  r1  r|  r7  r  r  rW  rA  r[  rl  r  r;  r>  r  rM  re  rr  )__doc__r$  r  collectionsr   typingr   r   utilsr   auto_factoryr	   r
   r   r   configuration_autor   
generationr   modeling_utilsr   r   
get_loggerr   loggerMODEL_MAPPING_NAMES#MODEL_FOR_PRETRAINING_MAPPING_NAMES MODEL_WITH_LM_HEAD_MAPPING_NAMES!MODEL_FOR_CAUSAL_LM_MAPPING_NAMESMODEL_FOR_IMAGE_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_RETRIEVAL_MAPPING_NAMES*MODEL_FOR_IMAGE_TEXT_TO_TEXT_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_KEYPOINT_DETECTION_MAPPING_NAMES)MODEL_FOR_KEYPOINT_MATCHING_MAPPING_NAMES%MODEL_FOR_TEXT_ENCODING_MAPPING_NAMES2MODEL_FOR_TIME_SERIES_CLASSIFICATION_MAPPING_NAMES.MODEL_FOR_TIME_SERIES_REGRESSION_MAPPING_NAMES.MODEL_FOR_TIME_SERIES_PREDICTION_MAPPING_NAMES&MODEL_FOR_IMAGE_TO_IMAGE_MAPPING_NAMES"MODEL_FOR_AUDIO_TOKENIZATION_NAMESr  r
  r  r   r  rK  rN  rQ  rT  r_  r\  rm  rp  rt  r  r<  r?  r*  r  r  rb  rf  rj  r-  r2  r5  r8  rB  rE  rH  rw  rz  r}  r  r  r  r  r  r  r  r  r   r  r  rX  r  r  r  r  r  r  r  r  r	  r  r  r)  r,  r1  r4  r7  r;  r>  rA  rD  rG  rJ  rM  rP  rS  rW  r[  r^  ra  re  ri  rl  ro  rr  rv  ry  r|  r  r  r  r  r  r  r  r  r  __all__r   r   r   <module>r     s    	  # '   5 -1/  
		H	%!xz x '2Z\' #| $/VX$  t %0FH% !T !,=?! B 1<1 - 1< 	71 - 0;BD0 ,L .9 	(. * 1<
1 - 1< 	<1 - 2=	2 . 0;0 , (3( $: %0*% ! .9.0. *d %002% !h ,7, (  6A	6 2 ,7
, ( 0;!0 ,F ,7, (  3>rt3 /l .9OQ. *f 4? 	/4 0 5@5 1 7B7 3 0;XZ0 ,x +6)++ 'Z 4?
4 0 0;0 ,$ * " 6A
6 2 )4
) % /: 	?// + ,7, (  :E: 6  $/$  6 +6+ ' .98. * -8- ) )4 ") %H 6AC16 2 2=5-2 . 2=02 . *55* & &1& " !!57JK 01EGj k -.BDde ./CEfg *:G+ ' *:F* & 4DP4 0 (8D( $ +;G+ ' +;G+ ' ,<H, ( *:F* & "22FHl!m '7D( $ //CEfg .>K/ + 1AM1 - //CEfg *+?A^_ *:G+ ' &66JLt%u "/?L0 , &66JLt%u ")9F* & -=I- ) (8D( $ .>J. * *:F* & %55IKr$s !-=J. * *:F* & ))=?Z[ %56JLt%u "/?L0 , #33GIn"o (8E) % &66JLt%u "-.BDde $45IKr$s !'7D( $ '77KMv&w #"23GIn"o /?L0 , ,<H, ( ,<H, ( $44HJp#q  '78LNp'q $7!4 7:$7 :9#6 952 562 6## # i(	31 3 ,,Cm\ 0. 0 ))=H[\ ]. ] ))=Hbc 1. 1 ))=Hbc </ < *5. ?)< ? &7&1J& "
:$7 : !22OZn o @)< @ &7&'<& "A*= A '8'(<' #C,? C ):)*L) %<&9 < #44S^t"u 7!4 7 //ITef @)< @ &7&1K& "
<&9 < #44S^t"u F.A F +<+6V+ '
:$7 : !22OZn o =': = $5$/F$  
>': > $5$/G$  
>(; > %6%0N% !
=': = $5$/F$  
8"5 8 00KVhi B*= B '8'2N' #
8"5 8 00KVhi <&9 < #44S^t"u 41 4 ,,CNgh ]"5 ] 00KVst <&9 < #44S^t"u +) + $O>ef8 3 8 .(V 
B+> B (9(3W( $
52 5;$7 ;8!4 80) 0 --EPno =&9 = #44S^u"v :$7 : !2!,R! 
]. ],]4 ](Zr   