
    rh~p                        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d5d6g      Z? ed7g      Z@ eg d8      ZA eg d9      ZB ed:d;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 dA dBe      Zw G dC dDe      Zx G dE dFe      Zy G dG dHe      Zz G dI dJe      Z{ G dK dLe      Z| ee|      Z| G dM dNe      Z} ee}dOP      Z} G dQ dRe      Z~ ee~dSP      Z~ G dT dUe      Z eedVP      Z G dW dXe      Z eedYP      Z G dZ d[e      Z eed\d]^      Z G d_ d`e      Z eedaP      Z G db dce      Z eeddP      Z G de dfe      Z eedgdh^      Z G di dje      Z eedkdl^      Z G dm dne      Z eedodp^      Z G dq dre      Z eedsP      Z G dt due      Z eedvP      Z G dw dxe      Z eedyP      Z G dz d{e      Z eed|P      Z G d} d~e      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z G d de      Z G d de      Z G d de      Z eedP      Z G d de      Z eedP      Z G d de      Z eedP      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__     y/var/www/html/ai-insurance-compliance-backend/venv/lib/python3.12/site-packages/transformers/models/auto/modeling_auto.pyr   r   %   s    r   r   (e  )aimv2
Aimv2Modelaimv2_vision_modelAimv2VisionModelalbertAlbertModelalign
AlignModelaltclipAltCLIPModel)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
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)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_textGlm4vTextModelglpn	GLPNModel)got_ocr2GotOcr2Model)gpt-sw3	GPT2Model)gpt2r?  )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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)kyutai_speech_to_textKyutaiSpeechToTextModel)layoutlmLayoutLMModel)
layoutlmv2LayoutLMv2Model)
layoutlmv3LayoutLMv3Model)ledLEDModellevit
LevitModel)lfm2	Lfm2Model	lightglueLightGlueForKeypointMatching)lilt	LiltModel)llamary   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)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)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sam_hq
SamHQModel)sam_hq_vision_modelSamHQVisionModel)sam_vision_modelSamVisionModel)seamless_m4tSeamlessM4TModel)seamless_m4t_v2SeamlessM4Tv2Model	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_wrapperr,  )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)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)W)r   AlbertForPreTrainingr7   BartForConditionalGeneration)r=   BertForPreTraining)rB   BigBirdForPreTrainingrX   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  FNetForPreTrainingr  FSMTForConditionalGeneration)r  FunnelForPreTrainingr!  Gemma3ForConditionalGenerationr>  GPT2LMHeadModelr@  rl  rA  GPTBigCodeForCausalLMrM  )rc  HieraForPreTrainingrh  IBertForMaskedLMrj  IdeficsForVisionText2Textrl   Idefics2ForConditionalGenerationrn   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r  OpenAIGPTLMHeadModelr&  !PaliGemmaForConditionalGenerationqwen2_audio"Qwen2AudioForConditionalGenerationrp  rt  RobertaForMaskedLMrw  RobertaPreLayerNormForMaskedLM)rz  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  ViTMAEForPreTrainingr  )r  Wav2Vec2ForPreTraining)r  Wav2Vec2ConformerForPreTrainingr)  XLMWithLMHeadModelr.  XLMRobertaForMaskedLMr1  XLMRobertaXLForMaskedLMr3  XLNetLMHeadModelr5  xLSTMForCausalLMr7  XmodForMaskedLM)Tr   AlbertForMaskedLMrC  r=   BertForMaskedLMrB   BigBirdForMaskedLMrD   &BigBirdPegasusForConditionalGenerationrO   'BlenderbotSmallForConditionalGenerationrG  rI  rz   CodeGenForCausalLMr   ConvBertForMaskedLMr   CpmAntForCausalLMrP  rR  rT  rV  r   DiaForConditionalGenerationrX  r   ElectraForMaskedLMzencoder-decoderEncoderDecoderModelr   ErnieForMaskedLMr   EsmForMaskedLMr^  r`  rb  r  FNetForMaskedLMrf  r  FunnelForMaskedLMr-  GitForCausalLMrk  rm  rn  rC  GPTNeoForCausalLMrE  GPTNeoXForCausalLMrG  GPTNeoXJapaneseForCausalLMrK  GPTJForCausalLMrM  rq  r{  r  LEDForConditionalGenerationr  r  LongT5ForConditionalGenerationr  r  M2M100ForConditionalGenerationr  r  r  MarianMTModelr  r  MegatronBertForCausalLMr  MobileBertForMaskedLMr  !MoonshineForConditionalGenerationr  r  r  r  r  NezhaForMaskedLMr  r  NystromformerForMaskedLMr  r.   PegasusXForConditionalGenerationrB  PLBartForConditionalGeneration	pop2piano!Pop2PianoForConditionalGenerationrN  QDQBertForMaskedLMre  ReformerModelWithLMHeadrk  RemBertForMaskedLMr  r  rz  RoCBertForMaskedLMr}  RoFormerForMaskedLMr  r  #Speech2TextForConditionalGenerationr  r  r  r  r  r  r  Wav2Vec2ForMaskedLMr"  WhisperForConditionalGenerationr  r  r  r  r  r<  YosoForMaskedLM))r&   ArceeForCausalLM)r*   AriaTextForCausalLM)r2   BambaForCausalLM)r7   BartForCausalLM)r=   BertLMHeadModel)r?   BertGenerationDecoder)rB   BigBirdForCausalLM)rD   BigBirdPegasusForCausalLM)rF   BioGptForCausalLM)rK   BitNetForCausalLM)rM   BlenderbotForCausalLM)rO   BlenderbotSmallForCausalLMrG  )r^   CamembertForCausalLM)rx   LlamaForCausalLMr  )r|   CohereForCausalLM)r~   Cohere2ForCausalLMr  rP  )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  Gemma2ForCausalLMri  )r#  Gemma3ForCausalLMr%  Gemma3nForConditionalGeneration)r)  Gemma3nForCausalLMr  )r/  GlmForCausalLM)r1  Glm4ForCausalLM)r3  Glm4MoeForCausalLMr<  GotOcr2ForConditionalGenerationrk  rm  rn  r  r  r  )rI  GptOssForCausalLMr  )rO  GraniteForCausalLM)rQ  GraniteMoeForCausalLM)rS  GraniteMoeHybridForCausalLM)rU  GraniteMoeSharedForCausalLM)r]  HeliumForCausalLM)r  JambaForCausalLM)r  JetMoeForCausalLM)r  Lfm2ForCausalLM)r  r4  )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)r  OpenLlamaForCausalLMr  )r   OPTForCausalLM)r,  PegasusForCausalLM)r6  PersimmonForCausalLM)r8  PhiForCausalLM)r:  Phi3ForCausalLM)r<  Phi4MultimodalForCausalLM)r>  PhimoeForCausalLM)rB  PLBartForCausalLM)rG  ProphetNetForCausalLM)rN  QDQBertLMHeadModel)rP  Qwen2ForCausalLM)rX  Qwen2MoeForCausalLM)r^  Qwen3ForCausalLM)r`  Qwen3MoeForCausalLM)rb  RecurrentGemmaForCausalLMr  )rk  RemBertForCausalLM)rt  RobertaForCausalLM)rw  RobertaPreLayerNormForCausalLM)rz  RoCBertForCausalLM)r}  RoFormerForCausalLMr  )r  SmolLM3ForCausalLM)speech_to_text_2Speech2Text2ForCausalLM)r  StableLmForCausalLM)r  Starcoder2ForCausalLMr  )trocrTrOCRForCausalLM)r"  WhisperForCausalLM)r&  XGLMForCausalLMr  )r+  XLMProphetNetForCausalLM)r.  XLMRobertaForCausalLM)r1  XLMRobertaXLForCausalLMr  r  )r7  XmodForCausalLM)r>  ZambaForCausalLM)r@  Zamba2ForCausalLM)9r   r9   rH   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r9  rb  rr  ru  r  )r  Llama4VisionModelr  )r  MllamaVisionModelr  r  r  r  r  rD  rI  rg  rm  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r
  r  r9  ))r   DeiTForMaskedImageModeling)r  FocalNetForMaskedImageModeling)r  SwinForMaskedImageModeling)r  Swinv2ForMaskedImageModeling)r  ViTForMaskedImageModeling)rv  ImageGPTForCausalImageModeling),)r:   BeitForImageClassification)rI   BitForImageClassification)rl   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)r`  HGNetV2ForImageClassification)rc  HieraForImageClassification)rs  IJepaForImageClassification)rv  ImageGPTForImageClassification)r  )LevitForImageClassification&LevitForImageClassificationWithTeacher)r  !MobileNetV1ForImageClassification)r  !MobileNetV2ForImageClassification)r  MobileViTForImageClassification)r  !MobileViTV2ForImageClassification)r  NatForImageClassification)r0  )&PerceiverForImageClassificationLearned&PerceiverForImageClassificationFourier-PerceiverForImageClassificationConvProcessing)rE   PoolFormerForImageClassification)rJ  PvtForImageClassification)rL  PvtV2ForImageClassification)rh  RegNetForImageClassification)rn  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  )r  !OneFormerForUniversalSegmentation))r  !TimesformerForVideoClassification)r  VideoMAEForVideoClassification)r  VivitForVideoClassification)r  VJEPA2ForVideoClassification)rR   BlipForConditionalGenerationrT   Blip2ForConditionalGenerationrb   !ChameleonForConditionalGenerationr  ru  rw  rz  $InstructBlipForConditionalGeneration)r|  )InstructBlipVideoForConditionalGenerationr  Kosmos2ForConditionalGenerationr}  r  r  r  r  r  r  
pix2struct"Pix2StructForConditionalGenerationrR  "Qwen2_5_VLForConditionalGenerationrZ  Qwen2VLForConditionalGenerationr  r  zvision-encoder-decoderVisionEncoderDecoderModelrK  )))r(   AriaForConditionalGeneration)r0   !AyaVisionForConditionalGenerationr  r  r  )r   %Cohere2VisionForConditionalGeneration)r   "DeepseekVLForConditionalGeneration)r   (DeepseekVLHybridForConditionalGeneration)r   Emu3ForConditionalGenerationr\  rE  ri  rJ  r  )r5  Glm4vForConditionalGenerationrP  rs  ru  rw  r  )r~   InternVLForConditionalGenerationry  r  r  r}  r  r  r  r  r  r  )r4  $PerceptionLMForConditionalGenerationr  )r@  r~  r  r  )r  rj  )r  SmolVLMForConditionalGeneration)r  UdopForConditionalGenerationr  r  ).r  rC  r  r  rI  r  rR  rT  rV  rX  r  r  r  rb  r  r  rq  r{  r  r  r  MBartForConditionalGenerationr  )r  MegatronBertForMaskedLMr  )r  ModernBertForMaskedLMr  r  r  r
  r  )r0  PerceiverForMaskedLMr  )re  ReformerForMaskedLMr  r  r  r  r  r  r  r!  r  r  r  r  r%  )
)r   !ConditionalDetrForObjectDetection)r   DFineForObjectDetection)r   DabDetrForObjectDetection)r    DeformableDetrForObjectDetection)r   DetaForObjectDetection)r   DetrForObjectDetection)r  RTDetrForObjectDetection)r  RTDetrV2ForObjectDetection)r  "TableTransformerForObjectDetection)r:  YolosForObjectDetection))rY  GroundingDinoForObjectDetection)r  !MMGroundingDinoForObjectDetectionr  )r"  Owlv2ForObjectDetection)r$  OwlViTForObjectDetection))depth_anythingDepthAnythingForDepthEstimation)r   DepthProForDepthEstimation)r   DPTForDepthEstimation)r:  GLPNForDepthEstimation)prompt_depth_anything%PromptDepthAnythingForDepthEstimation)zoedepthZoeDepthForDepthEstimation)rC  r  )rM   "BlenderbotForConditionalGenerationr  r  rf  rM  granite_speech%GraniteSpeechForConditionalGenerationr  r  r   r  r  )r  MT5ForConditionalGenerationr  r  )r,  PegasusForConditionalGenerationr  r  )rG  "ProphetNetForConditionalGenerationr  )r  SeamlessM4TForTextToText)r  SeamlessM4Tv2ForTextToTextr  r  r  )r  UMT5ForConditionalGenerationr  )r+  %XLMProphetNetForConditionalGeneration)r  r  )r  *KyutaiSpeechToTextForConditionalGenerationr  r  )r  SeamlessM4TForSpeechToText)r  SeamlessM4Tv2ForSpeechToText)zspeech-encoder-decoderSpeechEncoderDecoderModelr  )r  SpeechT5ForSpeechToTextr#  )k)r   AlbertForSequenceClassification)r&   ArceeForSequenceClassification)r7   BartForSequenceClassification)r=   BertForSequenceClassification)rB    BigBirdForSequenceClassification)rD   'BigBirdPegasusForSequenceClassification)rF   BioGptForSequenceClassification)rX   BloomForSequenceClassification)r^   "CamembertForSequenceClassification)r`   CanineForSequenceClassification)rx   LlamaForSequenceClassification)r   !ConvBertForSequenceClassification)r   CTRLForSequenceClassification)r   %Data2VecTextForSequenceClassification)r    DebertaForSequenceClassification)r   "DebertaV2ForSequenceClassification)r   #DeepseekV2ForSequenceClassification)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)r/  GlmForSequenceClassification)r1  Glm4ForSequenceClassification)r>  GPT2ForSequenceClassification)r@  rM  )rA  #GPTBigCodeForSequenceClassification)rC  GPTNeoForSequenceClassification)rE   GPTNeoXForSequenceClassification)rK  GPTJForSequenceClassification)r]  HeliumForSequenceClassification)rh  IBertForSequenceClassification)r  JambaForSequenceClassification)r  JetMoeForSequenceClassification)r  !LayoutLMForSequenceClassification)r  #LayoutLMv2ForSequenceClassification)r  #LayoutLMv3ForSequenceClassification)r  LEDForSequenceClassification)r  LiltForSequenceClassification)r  r5  )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)r  "OpenLlamaForSequenceClassification)r  "OpenAIGPTForSequenceClassification)r   OPTForSequenceClassification)r0  "PerceiverForSequenceClassification)r6  "PersimmonForSequenceClassification)r8  PhiForSequenceClassification)r:  Phi3ForSequenceClassification)r>  PhimoeForSequenceClassification)rB  PLBartForSequenceClassification)rN   QDQBertForSequenceClassification)rP  Qwen2ForSequenceClassification)rX  !Qwen2MoeForSequenceClassification)r^  Qwen3ForSequenceClassification)r`  !Qwen3MoeForSequenceClassification)re  !ReformerForSequenceClassification)rk   RemBertForSequenceClassification)rt   RobertaForSequenceClassification)rw  ,RobertaPreLayerNormForSequenceClassification)rz   RoCBertForSequenceClassification)r}  !RoFormerForSequenceClassification)r   SmolLM3ForSequenceClassification)r  $SqueezeBertForSequenceClassification)r  !StableLmForSequenceClassification)r  #Starcoder2ForSequenceClassification)r  T5ForSequenceClassification)r   T5GemmaForSequenceClassification)r  TapasForSequenceClassification)r  "TransfoXLForSequenceClassification)r  UMT5ForSequenceClassification)r)  XLMForSequenceClassification)r.  #XLMRobertaForSequenceClassification)r1  %XLMRobertaXLForSequenceClassification)r3  XLNetForSequenceClassification)r7  XmodForSequenceClassification)r<  YosoForSequenceClassification)r>  ZambaForSequenceClassification)r@  Zamba2ForSequenceClassification)L)r   AlbertForQuestionAnswering)r&   ArceeForQuestionAnswering)r7   BartForQuestionAnswering)r=   BertForQuestionAnswering)rB   BigBirdForQuestionAnswering)rD   "BigBirdPegasusForQuestionAnswering)rX   BloomForQuestionAnswering)r^   CamembertForQuestionAnswering)r`   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)r@  GPT2ForQuestionAnswering)rC  GPTNeoForQuestionAnswering)rE  GPTNeoXForQuestionAnswering)rK  GPTJForQuestionAnswering)rh  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)r   OPTForQuestionAnswering)rN  QDQBertForQuestionAnswering)rP  Qwen2ForQuestionAnswering)rX  Qwen2MoeForQuestionAnswering)r^  Qwen3ForQuestionAnswering)r`  Qwen3MoeForQuestionAnswering)re  ReformerForQuestionAnswering)rk  RemBertForQuestionAnswering)rt  RobertaForQuestionAnswering)rw  'RobertaPreLayerNormForQuestionAnswering)rz  RoCBertForQuestionAnswering)r}  RoFormerForQuestionAnswering)r  SmolLM3ForQuestionAnswering)r  SplinterForQuestionAnswering)r  SqueezeBertForQuestionAnswering)r  T5ForQuestionAnswering)r  UMT5ForQuestionAnswering)r)  XLMForQuestionAnsweringSimple)r.  XLMRobertaForQuestionAnswering)r1   XLMRobertaXLForQuestionAnswering)r3  XLNetForQuestionAnsweringSimple)r7  XmodForQuestionAnswering)r<  YosoForQuestionAnswering)r  TapasForQuestionAnswering))rR   BlipForQuestionAnsweringr  )r  ViltForQuestionAnswering))r  LayoutLMForQuestionAnsweringr  r  )S)r   AlbertForTokenClassification)r&   ArceeForTokenClassification)r=   BertForTokenClassification)rB   BigBirdForTokenClassification)rF   BioGptForTokenClassification)rX   BloomForTokenClassification)r\   BrosForTokenClassification)r^   CamembertForTokenClassification)r`   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)r/  GlmForTokenClassification)r1  Glm4ForTokenClassification)r>  GPT2ForTokenClassification)r@  r  )rA   GPTBigCodeForTokenClassification)rC  GPTNeoForTokenClassification)rE  GPTNeoXForTokenClassification)r]  HeliumForTokenClassification)rh  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)r6  PersimmonForTokenClassification)r8  PhiForTokenClassification)r:  Phi3ForTokenClassification)rN  QDQBertForTokenClassification)rP  Qwen2ForTokenClassification)rX  Qwen2MoeForTokenClassification)r^  Qwen3ForTokenClassification)r`  Qwen3MoeForTokenClassification)rk  RemBertForTokenClassification)rt  RobertaForTokenClassification)rw  )RobertaPreLayerNormForTokenClassification)rz  RoCBertForTokenClassification)r}  RoFormerForTokenClassification)r  SmolLM3ForTokenClassification)r  !SqueezeBertForTokenClassification)r  StableLmForTokenClassification)r   Starcoder2ForTokenClassification)r  T5ForTokenClassification)r  T5GemmaForTokenClassification)r  UMT5ForTokenClassification)r)  XLMForTokenClassification)r.   XLMRobertaForTokenClassification)r1  "XLMRobertaXLForTokenClassification)r3  XLNetForTokenClassification)r7  XmodForTokenClassification)r<  YosoForTokenClassification)')r   AlbertForMultipleChoice)r=   BertForMultipleChoice)rB   BigBirdForMultipleChoice)r^   CamembertForMultipleChoice)r`   CanineForMultipleChoice)r   ConvBertForMultipleChoice)r   Data2VecTextForMultipleChoice)r   DebertaV2ForMultipleChoice)r   DistilBertForMultipleChoice)r   ElectraForMultipleChoice)r   ErnieForMultipleChoice)r   ErnieMForMultipleChoice)r  FlaubertForMultipleChoice)r  FNetForMultipleChoice)r  FunnelForMultipleChoice)rh  IBertForMultipleChoice)r  LongformerForMultipleChoice)r  LukeForMultipleChoice)r  MegaForMultipleChoice)r  MegatronBertForMultipleChoice)r  MobileBertForMultipleChoice)r  ModernBertForMultipleChoice)r  MPNetForMultipleChoice)r  MraForMultipleChoice)r  NezhaForMultipleChoice)r  NystromformerForMultipleChoice)rN  QDQBertForMultipleChoice)rk  RemBertForMultipleChoice)rt  RobertaForMultipleChoice)rw  $RobertaPreLayerNormForMultipleChoice)rz  RoCBertForMultipleChoice)r}  RoFormerForMultipleChoice)r  SqueezeBertForMultipleChoice)r)  XLMForMultipleChoice)r.  XLMRobertaForMultipleChoice)r1  XLMRobertaXLForMultipleChoice)r3  XLNetForMultipleChoice)r7  XmodForMultipleChoice)r<  YosoForMultipleChoice))r=   BertForNextSentencePrediction)r   ErnieForNextSentencePrediction)r  FNetForNextSentencePrediction)r  %MegatronBertForNextSentencePrediction)r  #MobileBertForNextSentencePrediction)r  NezhaForNextSentencePrediction)rN   QDQBertForNextSentencePrediction))r,   ASTForAudioClassification)r   &Data2VecAudioForSequenceClassification)re  HubertForSequenceClassification)r  SEWForSequenceClassification)r  SEWDForSequenceClassification)r  "UniSpeechForSequenceClassification)r  %UniSpeechSatForSequenceClassification)r  !Wav2Vec2ForSequenceClassification)r  %Wav2Vec2BertForSequenceClassification)r  *Wav2Vec2ConformerForSequenceClassification)r   WavLMForSequenceClassification)r"  WhisperForAudioClassification))r   Data2VecAudioForCTC)re  HubertForCTC)r  MCTCTForCTC)r  	SEWForCTC)r  
SEWDForCTC)r  UniSpeechForCTC)r  UniSpeechSatForCTC)r  Wav2Vec2ForCTC)r  Wav2Vec2BertForCTC)r  Wav2Vec2ConformerForCTC)r   WavLMForCTC))r   (Data2VecAudioForAudioFrameClassification)r  'UniSpeechSatForAudioFrameClassification)r  #Wav2Vec2ForAudioFrameClassification)r  'Wav2Vec2BertForAudioFrameClassification)r  ,Wav2Vec2ConformerForAudioFrameClassification)r    WavLMForAudioFrameClassification))r   Data2VecAudioForXVector)r  UniSpeechSatForXVector)r  Wav2Vec2ForXVector)r  Wav2Vec2BertForXVector)r  Wav2Vec2ConformerForXVector)r   WavLMForXVectorr  )r  SpeechT5ForTextToSpeech)
r4   r   )r  r  r	  )r    MusicgenForConditionalGeneration)r  &MusicgenMelodyForConditionalGeneration)qwen2_5_omni#Qwen2_5OmniForConditionalGeneration)r  SeamlessM4TForTextToSpeech)r  SeamlessM4Tv2ForTextToSpeechr  )	r    r#   rQ   )rT   Blip2ForImageTextRetrievalrd   rk   rs   r  r  ))r:   BeitBackbone)rI   BitBackbone)r   ConvNextBackbone)r   ConvNextV2Backbone)r   DinatBackbone)r   Dinov2Backbone)r   Dinov2WithRegistersBackbone)r  FocalNetBackboner_  )rc  HieraBackbone)r  MaskFormerSwinBackbone)r  NatBackbone)rL  PvtV2Backbone)rn  ResNetBackbone)rt_detr_resnetRTDetrResNetBackbone)r  SwinBackbone)r  Swinv2Backbone)r  TextNetBackboner  )r  VitDetBackbone)vitpose_backboneVitPoseBackboner  r  )
superpointSuperPointForKeypointDetection))r   !EfficientLoFTRForKeypointMatchingr  )	superglueSuperGlueForKeypointMatching)r   r<   rA   rn   r   r   r   r   r   )r   Emu3TextModelr  rg  )r  r  r  )r  MllamaTextModelr  )r  MT5EncoderModelr  rd  rj  rs  rv  ry  r|  r  )r  T5EncoderModel)r  T5GemmaEncoderModel)r  UMT5EncoderModelr(  r-  r0  )r(  'PatchTSMixerForTimeSeriesClassification)r*  PatchTSTForClassification)r(  PatchTSMixerForRegression)r*  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  +      6Nr   r  c                       e Zd ZeZy)AutoModelForKeypointDetectionN)r   r   r   $MODEL_FOR_KEYPOINT_DETECTION_MAPPINGr  r   r   r   r  r  /      9Nr   r  c                       e Zd ZeZy)AutoModelForKeypointMatchingN)r   r   r   #MODEL_FOR_KEYPOINT_MATCHING_MAPPINGr  r   r   r   r  r  3  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  7      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  ;  s    5Nr   r  c                       e Zd ZeZy)	AutoModelN)r   r   r   MODEL_MAPPINGr  r   r   r   r  r  ?  s    "Nr   r  c                       e Zd ZeZy)AutoModelForPreTrainingN)r   r   r   MODEL_FOR_PRETRAINING_MAPPINGr  r   r   r   r  r  F  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  N      /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_pretrainedY  !     w&'D\z\U[\\r   )r   r   r   MODEL_FOR_CAUSAL_LM_MAPPINGr  classmethodtyper   strosPathLiker  __classcell__r  s   @r   r  r  U  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  f  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  m      ;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   r  r  x  s    >Nr   r  zsequence classificationc                       e Zd ZeZy)AutoModelForQuestionAnsweringN)r   r   r   $MODEL_FOR_QUESTION_ANSWERING_MAPPINGr  r   r   r   r  r    r  r   r  zquestion answeringc                       e Zd ZeZy)"AutoModelForTableQuestionAnsweringN)r   r   r   *MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPINGr  r   r   r   r  r        ?Nr   r  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   r  r    r  r   r  ztoken classificationc                       e Zd ZeZy)AutoModelForMultipleChoiceN)r   r   r   !MODEL_FOR_MULTIPLE_CHOICE_MAPPINGr  r   r   r   r	  r	    r  r   r	  zmultiple choicec                       e Zd ZeZy)"AutoModelForNextSentencePredictionN)r   r   r   *MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPINGr  r   r   r   r  r    r  r   r  znext sentence predictionc                       e Zd ZeZy)AutoModelForImageClassificationN)r   r   r   &MODEL_FOR_IMAGE_CLASSIFICATION_MAPPINGr  r   r   r   r  r    r  r   r  zimage classificationc                       e Zd ZeZy)'AutoModelForZeroShotImageClassificationN)r   r   r   0MODEL_FOR_ZERO_SHOT_IMAGE_CLASSIFICATION_MAPPINGr  r   r   r   r  r    s    ENr   r  zzero-shot image classificationc                       e Zd ZeZy)AutoModelForImageSegmentationN)r   r   r   $MODEL_FOR_IMAGE_SEGMENTATION_MAPPINGr  r   r   r   r  r    r  r   r  zimage segmentationc                       e Zd ZeZy) AutoModelForSemanticSegmentationN)r   r   r   'MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPINGr  r   r   r   r  r        <Nr   r  zsemantic segmentationc                       e Zd ZeZy) AutoModelForTimeSeriesPredictionN)r   r   r   (MODEL_FOR_TIME_SERIES_PREDICTION_MAPPINGr  r   r   r   r  r        =Nr   r  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     r  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#    r  r   r#  zinstance segmentationc                       e Zd ZeZy)AutoModelForObjectDetectionN)r   r   r   "MODEL_FOR_OBJECT_DETECTION_MAPPINGr  r   r   r   r&  r&        7Nr   r&  zobject detectionc                       e Zd ZeZy)#AutoModelForZeroShotObjectDetectionN)r   r   r   ,MODEL_FOR_ZERO_SHOT_OBJECT_DETECTION_MAPPINGr  r   r   r   r*  r*        ANr   r*  zzero-shot object detectionc                       e Zd ZeZy)AutoModelForDepthEstimationN)r   r   r   "MODEL_FOR_DEPTH_ESTIMATION_MAPPINGr  r   r   r   r.  r.    r(  r   r.  zdepth estimationc                       e Zd ZeZy)AutoModelForVideoClassificationN)r   r   r   &MODEL_FOR_VIDEO_CLASSIFICATION_MAPPINGr  r   r   r   r1  r1    r  r   r1  zvideo classificationc                       e Zd ZeZy)_AutoModelForVision2SeqN)r   r   r   MODEL_FOR_VISION_2_SEQ_MAPPINGr  r   r   r   r4  r4    s    3Nr   r4  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_pretrained%  r  r   )r   r   r   $MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPINGr  r  r  r   r  r  r  r  r  r  s   @r   r7  r7  !  sT    9N ]/0]',S"++c2B-B'C]
 
"] ]r   r7  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   r;  r;  2  r  r   r;  zaudio classificationc                       e Zd ZeZy)AutoModelForCTCN)r   r   r   MODEL_FOR_CTC_MAPPINGr  r   r   r   r>  r>  9  s    *Nr   r>  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   rA  rA  @  r(  r   rA  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   rD  rD  I  r,  r   rD  z"audio frame (token) classificationc                       e Zd ZeZy)AutoModelForAudioXVectorN)r   r   r   MODEL_FOR_AUDIO_XVECTOR_MAPPINGr  r   r   r   rG  rG  R  r  r   rG  c                       e Zd ZeZy)AutoModelForTextToSpectrogramN)r   r   r   %MODEL_FOR_TEXT_TO_SPECTROGRAM_MAPPINGr  r   r   r   rJ  rJ  V  s    :Nr   rJ  c                       e Zd ZeZy)AutoModelForTextToWaveformN)r   r   r   "MODEL_FOR_TEXT_TO_WAVEFORM_MAPPINGr  r   r   r   rM  rM  Z  r(  r   rM  c                       e Zd ZeZy)AutoBackboneN)r   r   r   MODEL_FOR_BACKBONE_MAPPINGr  r   r   r   rP  rP  ^  r  r   rP  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   rS  rS  e  r  r   rS  zmasked image modelingc                       e Zd ZeZy)AutoModelForAudioTokenizationN)r   r   r   $MODEL_FOR_AUDIO_TOKENIZATION_MAPPINGr  r   r   r   rV  rV  l  r  r   rV  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_configv  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   rY  rY  u  s+    + + ] ]r   rY  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\  ra  s     r   r`  z"AutoModelForVision2Seq.from_config  s)    5	

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

 w&'D\z\U[\\r   re  r  s   @r   rg  rg    s+    + + ] ]r   rg  )Yr<  rE  rW  rH  rQ  'MODEL_FOR_CAUSAL_IMAGE_MODELING_MAPPINGr  r?  r  r/  r  MODEL_FOR_IMAGE_MAPPINGr  r  r  r  r$  rT  r  r  r
  r  r'  r  r  r  r  r  rB  r  r  rN  rK  r  r  r!  r2  r5  MODEL_FOR_RETRIEVAL_MAPPINGr9  r  r  r  r  r+  ,MODEL_FOR_TIME_SERIES_CLASSIFICATION_MAPPING(MODEL_FOR_TIME_SERIES_REGRESSION_MAPPINGr  rP  r;  rD  rV  rG  r  r>  r.  r  r  r  r#  r  r  r  r  rS  r  r	  r  r&  r  r  r  r  r  rA  r  rJ  rM  r  r  r   r1  rg  r   r  rY  r  r*  r7  )__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  rk  r  r  r  r  r$  r!  r2  r5  r9  rm  r  r  r  rl  rT  r'  r+  r/  r  r  r  r  r  r
  r  r<  r?  rB  rE  rH  rK  rN  rQ  r  r  r  r  rn  ro  r  r  rW  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  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  rV  rY  rg  __all__r   r   r   <module>r     s    	  # '   5 -1/  
		H	%!gi V '2Y[' #z $/VX$  t %0BD% !L !,;=! ~ 1<1 - 1< 	71 - 0;AC0 ,J .9 	(. * 1<
1 - 1< 	<1 - 2=	2 . 0;0 , (3( $6 %0*% ! .9*,. *\ %002% !h ,7, (  6A	6 2 ,7
, ( 0;!0 ,F ,7, (  3>mo3 /b .9NP. *d 4? 	/4 0 5@5 1 7B7 3 0;UW0 ,r +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   