U
    4Af                    @   s|  d Z ddlZddlmZ ddlmZ ddlmZmZm	Z	m
Z
 ddlmZ eeZed	d
dddddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddgZeddddddddd ddddddddd	d
ddd]dddddddddddddddddddd d!d"d#d$dd%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=gHZed>dd?d@dAdBdddCdDdEddd dddFdGdHdIddJddKdLd
dddMdNdOdPd]dddQddRddSdddTddUdVdddd dWd"dXd#dYdZd[d\d]d^d%d&d_d`d(dad*d+d,d-d.dbdcd9d:d;d<d=ddgOZededfdgdhdidjdkdlddmdndCdodEddpdqdrdsdtdudvdwdLd
dddMdNdOdPdxdydzddd{d|d}dUd~ddddddddd#dddddddddddd]dddddd(dddd.dddd9dddd<dgQZeddd+d-d.d4d9d:d;d<d=d>dBdCdDdOdUdadfdpdddddddddddddddddddddddddddg/ZedddddgZedgZeddddddddddddddddddddddddddddddÐdĐdŐdƐdǐdȐdg$ZedgZedːd̐d͐dΐdϐdАdѐdgZedgZedʐdԐdӐdgZed֐dאdgZedِdڐdېdLddܐdݐdސdddd$dߐd2d4dgZed>dd?d@ddDdd dddFdHdIddJdKddddddddVddd dWdXdd\dd^d%d&d_d`d*d-dbd9d:d;d=ddg-ZedddddddgZedddgZ eddddgZ!eddAddBdGdd]dQdRdSdTddd d"ddYdZdddd+d,ddgZ"ed[ddddaddcgZ#edd ddddddddd	d
dddddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVgXZ$edWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~ddddddddddddddddddddddddg@Z%edgZ&eddڐdgZ'eddpdqgZ(edddddddddddddddddddddddddddddddddddddddddÐdĐdŐdƐdǐdȐdɐdʐdːd̐d͐dΐdϐdАdѐdҐdӐdԐdՐd֐dאdؐdِdڐdېdܐdݐdސdߐddgGZ)eddddddddddddddddddddddddddddddd dddddddg&Z*edd	d
ddddgZ+eddddddddddddgZ,edddddd d!d"d#d$d%gZ-ed&d'd(d)d*d+gZ.ed,d-d.d/d0d1gZ/edKd2gZ0edd3d4d5d6d7dgZ1ed
ddd!d$d&dgZ2ed8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdӐdGgZ3edgZ4edHgZ5ed	ddd3d6d7d?dEdLdcdsddIddddddddƐdJdKdddgZ6edLdMgZ7edNdOgZ8edPgZ9e	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e2Z@e	eeZAe	eeZBe	eeZCe	eeZDe	eeZEe	eeZFe	ee'ZGe	ee(ZHe	eeZIe	eeZJe	eeZKe	eeZLe	ee ZMe	ee!ZNe	ee"ZOe	ee$ZPe	ee%ZQe	ee&ZRe	ee)ZSe	ee*ZTe	ee+ZUe	ee,ZVe	ee-ZWe	ee#ZXe	ee.ZYe	ee/ZZe	ee0Z[e	ee1Z\e	ee3Z]e	ee4Z^e	ee5Z_e	ee6Z`e	ee7Zae	ee8Zbe	ee9ZcG dQdR dReZdG dSdT dTeZeG dUdV dVeZfG dWdX dXeZgG dYdZ dZeZhe
ehZhG d[d\ d\eZie
eid]d^ZiG d_d` d`eZje
ejdad^ZjG dbdc dceZke
ekddd^ZkG dedf dfeZle
eldgd^ZlG dhdi dieZme
emdjdkdlZmG dmdn dneZne
endod^ZnG dpdq dqeZoe
eodrd^ZoG dsdt dteZpe
epdudvdlZpG dwdx dxeZqe
eqdydzdlZqG d{d| d|eZre
erd}d~dlZrG dd deZse
esdd^ZsG dd deZte
etdd^ZtG dd deZue
eudd^ZuG dd deZve
evdd^ZvG dd deZwe
ewdd^ZwG dd deZxe
exdd^ZxG dd deZye
eydd^ZyG dd deZze
ezdd^ZzG dd deZ{e
e{dd^Z{G dd deZ|e
e|dd^Z|G dd deZ}e
e}dd^Z}G dd deZ~e
e~dd^Z~G dd deZe
edd^ZG dd deZe
edd^ZG dd deZe
edd^ZG dd deZe
edd^ZG dd deZe
edd^ZG dd deZe
edd^ZG dd deZG dd deZG dd deZG dd deZe
edd^ZG dd deZe
edd^ZG dd dejZdS (  zAuto Model class.    N)OrderedDict   )logging   )_BaseAutoBackboneClass_BaseAutoModelClass_LazyAutoMappingauto_class_update)CONFIG_MAPPING_NAMES)albertZAlbertModel)ZalignZ
AlignModel)ZaltclipZAltCLIPModel)audio-spectrogram-transformerZASTModel)Z
autoformerZAutoformerModel)ZbarkZ	BarkModel)bartZ	BartModel)beitZ	BeitModel)bertZ	BertModel)bert-generationZBertGenerationEncoder)big_birdZBigBirdModel)bigbird_pegasusZBigBirdPegasusModel)biogptZBioGptModel)bitZBitModel)
blenderbotZBlenderbotModel)blenderbot-smallZBlenderbotSmallModel)blipZ	BlipModel)blip-2Z
Blip2Model)bloomZ
BloomModel)ZbridgetowerZBridgeTowerModel)brosZ	BrosModel)	camembertZCamembertModel)canineZCanineModel)	chameleonZChameleonModel)Zchinese_clipZChineseCLIPModel)Zchinese_clip_vision_modelZChineseCLIPVisionModel)ZclapZ	ClapModel)clipZ	CLIPModel)Zclip_vision_modelZCLIPVisionModel)ZclipsegZCLIPSegModel)ZclvpZ!ClvpModelForConditionalGeneration)
code_llama
LlamaModel)codegenZCodeGenModel)cohereZCohereModel)conditional_detrZConditionalDetrModel)convbertZConvBertModel)convnextZConvNextModel)
convnextv2ZConvNextV2Model)cpmantZCpmAntModel)ctrlZ	CTRLModel)cvtZCvtModel)data2vec-audioZData2VecAudioModel)data2vec-textZData2VecTextModel)data2vec-visionZData2VecVisionModel)dbrxZ	DbrxModel)debertaZDebertaModel)
deberta-v2ZDebertaV2Model)Zdecision_transformerZDecisionTransformerModel)deformable_detrZDeformableDetrModel)deitZ	DeiTModel)detaZ	DetaModel)detrZ	DetrModel)dinatZ
DinatModel)dinov2ZDinov2Model)
distilbertZDistilBertModel)z
donut-swinZDonutSwinModel)ZdprZDPRQuestionEncoder)dptZDPTModel)efficientformerZEfficientFormerModel)efficientnetZEfficientNetModel)electraZElectraModel)ZencodecZEncodecModel)ernieZ
ErnieModel)ernie_mZErnieMModel)esmZEsmModel)falconZFalconModel)fastspeech2_conformerZFastSpeech2ConformerModel)flaubertZFlaubertModel)flavaZ
FlavaModel)fnetZ	FNetModel)focalnetZFocalNetModel)fsmtZ	FSMTModel)funnel)ZFunnelModelZFunnelBaseModel)gemmaZ
GemmaModel)gemma2ZGemma2Model)gitZGitModel)glpnZ	GLPNModel)gpt-sw3	GPT2Model)gpt2rK   )gpt_bigcodeZGPTBigCodeModel)gpt_neoZGPTNeoModel)gpt_neoxZGPTNeoXModel)gpt_neox_japaneseZGPTNeoXJapaneseModel)gptjZ	GPTJModel)zgptsan-japaneseZ&GPTSanJapaneseForConditionalGeneration)Z
graphormerZGraphormerModel)grounding-dinoZGroundingDinoModel)ZgroupvitZGroupViTModel)hieraZ
HieraModel)hubertZHubertModel)ibertZ
IBertModel)ideficsZIdeficsModel)idefics2ZIdefics2Model)imagegptZImageGPTModel)ZinformerZInformerModel)jambaZ
JambaModel)jetmoeZJetMoeModel)ZjukeboxZJukeboxModel)kosmos-2ZKosmos2Model)layoutlmZLayoutLMModel)
layoutlmv2ZLayoutLMv2Model)
layoutlmv3ZLayoutLMv3Model)ledZLEDModel)levitZ
LevitModel)liltZ	LiltModel)llamar    )
longformerZLongformerModel)longt5ZLongT5Model)lukeZ	LukeModel)lxmertZLxmertModel)m2m_100ZM2M100Model)mambaZ
MambaModel)mamba2ZMamba2Model)marianZMarianModel)markuplmZMarkupLMModel)mask2formerZMask2FormerModel)
maskformerZMaskFormerModel)maskformer-swinZMaskFormerSwinModel)mbartZ
MBartModel)mctctZ
MCTCTModel)megaZ	MegaModel)megatron-bertZMegatronBertModel)zmgp-strZMgpstrForSceneTextRecognition)mistralZMistralModel)mixtralZMixtralModel)
mobilebertZMobileBertModel)mobilenet_v1ZMobileNetV1Model)mobilenet_v2ZMobileNetV2Model)	mobilevitZMobileViTModel)mobilevitv2ZMobileViTV2Model)mpnetZ
MPNetModel)mptZMptModel)mraZMraModel)mt5ZMT5Model)musicgenZMusicgenModel)musicgen_melodyZMusicgenMelodyModel)mvpZMvpModel)natZNatModel)nemotronZNemotronModel)nezhaZ
NezhaModel)nllb-moeZNllbMoeModel)nystromformerZNystromformerModel)olmoZ	OlmoModel)	oneformerZOneFormerModel)
open-llamaZOpenLlamaModel)
openai-gptZOpenAIGPTModel)optZOPTModel)owlv2Z
Owlv2Model)owlvitZOwlViTModel)patchtsmixerZPatchTSMixerModel)patchtstZPatchTSTModel)pegasusZPegasusModel)	pegasus_xZPegasusXModel)	perceiverZPerceiverModel)	persimmonZPersimmonModel)phiZPhiModel)phi3Z	Phi3Model)plbartZPLBartModel)
poolformerZPoolFormerModel)
prophetnetZProphetNetModel)pvtZPvtModel)pvt_v2Z
PvtV2Model)qdqbertZQDQBertModel)qwen2Z
Qwen2Model)	qwen2_moeZQwen2MoeModel)recurrent_gemmaZRecurrentGemmaModel)reformerZReformerModel)regnetZRegNetModel)rembertZRemBertModel)resnetZResNetModel)Z	retribertZRetriBertModel)robertaZRobertaModel)roberta-prelayernormZRobertaPreLayerNormModel)roc_bertZRoCBertModel)roformerZRoFormerModel)rt_detrZRTDetrModel)rwkvZ	RwkvModel)ZsamZSamModel)seamless_m4tZSeamlessM4TModel)seamless_m4t_v2ZSeamlessM4Tv2Model)	segformerZSegformerModel)ZseggptZSegGptModel)sewZSEWModel)sew-dZ	SEWDModel)siglipZSiglipModel)Zsiglip_vision_modelZSiglipVisionModel)speech_to_textZSpeech2TextModel)speecht5ZSpeechT5Model)splinterZSplinterModel)squeezebertZSqueezeBertModel)stablelmZStableLmModel)
starcoder2ZStarcoder2Model)swiftformerZSwiftFormerModel)swinZ	SwinModel)swin2srZSwin2SRModel)swinv2ZSwinv2Model)switch_transformersZSwitchTransformersModel)t5ZT5Model)table-transformerZTableTransformerModel)tapasZ
TapasModel)Ztime_series_transformerZTimeSeriesTransformerModel)timesformerZTimesformerModel)Ztimm_backboneZTimmBackbone)Ztrajectory_transformerZTrajectoryTransformerModel)
transfo-xlZTransfoXLModel)tvltZ	TvltModel)ZtvpZTvpModel)ZudopZ	UdopModel)umt5Z	UMT5Model)	unispeechZUniSpeechModel)unispeech-satZUniSpeechSatModel)ZunivnetZUnivNetModel)vanZVanModel)videomaeZVideoMAEModel)viltZ	ViltModel)zvision-text-dual-encoderZVisionTextDualEncoderModel)visual_bertZVisualBertModel)vitZViTModel)
vit_hybridZViTHybridModel)vit_maeZViTMAEModel)vit_msnZViTMSNModel)vitdetZVitDetModel)ZvitsZ	VitsModel)vivitZ
VivitModel)wav2vec2ZWav2Vec2Model)wav2vec2-bertZWav2Vec2BertModel)wav2vec2-conformerZWav2Vec2ConformerModel)wavlmZ
WavLMModel)whisperZWhisperModel)ZxclipZ
XCLIPModel)xglmZ	XGLMModel)xlmZXLMModel)xlm-prophetnetZXLMProphetNetModel)xlm-robertaZXLMRobertaModel)xlm-roberta-xlZXLMRobertaXLModel)xlnetZ
XLNetModel)xmodZ	XmodModel)yolosZ
YolosModel)yosoZ	YosoModel)r   ZAlbertForPreTraining)r   ZBartForConditionalGeneration)r   ZBertForPreTraining)r   ZBigBirdForPreTraining)r   ZBloomForCausalLM)r   ZCamembertForMaskedLM)r(   ZCTRLLMHeadModel)r+   ZData2VecTextForMaskedLM)r.   ZDebertaForMaskedLM)r/   ZDebertaV2ForMaskedLM)r6   ZDistilBertForMaskedLM)r:   ZElectraForPreTraining)r;   ZErnieForPreTraining)r@   ZFlaubertWithLMHeadModel)rA   ZFlavaForPreTraining)rB   ZFNetForPreTraining)rD   ZFSMTForConditionalGeneration)rE   ZFunnelForPreTraining)rJ   GPT2LMHeadModel)rL   r   )rM   ZGPTBigCodeForCausalLM)rS   ZHieraForPreTraining)rU   ZIBertForMaskedLM)rV   ZIdeficsForVisionText2Text)rW   Z Idefics2ForConditionalGeneration)r\   ZLayoutLMForMaskedLM)ZllavaZLlavaForConditionalGeneration)zllava-next-videoZ&LlavaNextVideoForConditionalGeneration)Z
llava_nextZ!LlavaNextForConditionalGeneration)rc   ZLongformerForMaskedLM)re   ZLukeForMaskedLM)rf   ZLxmertForPreTraining)rh   ZMambaForCausalLM)ri   ZMamba2ForCausalLM)rq   ZMegaForMaskedLM)rr   ZMegatronBertForPreTraining)ru   ZMobileBertForPreTraining)rz   ZMPNetForMaskedLM)r{   ZMptForCausalLM)r|   ZMraForMaskedLM)r   ZMvpForConditionalGeneration)r   ZNezhaForPreTraining)r   ZNllbMoeForConditionalGeneration)r   ZOpenAIGPTLMHeadModel)Z	paligemmaZ!PaliGemmaForConditionalGeneration)r   ZRobertaForMaskedLM)r   ZRobertaPreLayerNormForMaskedLM)r   ZRoCBertForPreTraining)r   ZRwkvForCausalLM)r   ZSplinterForPreTraining)r   ZSqueezeBertForMaskedLM)r   Z*SwitchTransformersForConditionalGeneration)r   ZT5ForConditionalGeneration)r   ZTapasForMaskedLM)r   ZTransfoXLLMHeadModel)r   ZTvltForPreTraining)r   ZUniSpeechForPreTraining)r   ZUniSpeechSatForPreTraining)Zvideo_llavaZ"VideoLlavaForConditionalGeneration)r   ZVideoMAEForPreTraining)ZvipllavaZ VipLlavaForConditionalGeneration)r   ZVisualBertForPreTraining)r   ZViTMAEForPreTraining)r   ZWav2Vec2ForPreTraining)r   ZWav2Vec2ConformerForPreTraining)r   ZXLMWithLMHeadModel)r   ZXLMRobertaForMaskedLM)r   ZXLMRobertaXLForMaskedLM)r   ZXLNetLMHeadModel)r   ZXmodForMaskedLM)r   ZAlbertForMaskedLM)r   ZBertForMaskedLM)r   ZBigBirdForMaskedLM)r   Z&BigBirdPegasusForConditionalGeneration)r   Z'BlenderbotSmallForConditionalGeneration)r!   ZCodeGenForCausalLM)r$   ZConvBertForMaskedLM)r'   ZCpmAntForCausalLM)r:   ZElectraForMaskedLM)zencoder-decoderZEncoderDecoderModel)r;   ZErnieForMaskedLM)r=   ZEsmForMaskedLM)rB   ZFNetForMaskedLM)rE   ZFunnelForMaskedLM)rH   ZGitForCausalLM)rN   ZGPTNeoForCausalLM)rO   ZGPTNeoXForCausalLM)rP   ZGPTNeoXJapaneseForCausalLM)rQ   ZGPTJForCausalLM)r_   ZLEDForConditionalGeneration)rd   ZLongT5ForConditionalGeneration)rg   ZM2M100ForConditionalGeneration)rj   ZMarianMTModel)rr   ZMegatronBertForCausalLM)ru   ZMobileBertForMaskedLM)r   ZNezhaForMaskedLM)r   ZNystromformerForMaskedLM)r   Z PegasusXForConditionalGeneration)r   ZPLBartForConditionalGeneration)Z	pop2pianoZ!Pop2PianoForConditionalGeneration)r   ZQDQBertForMaskedLM)r   ZReformerModelWithLMHead)r   ZRemBertForMaskedLM)r   ZRoCBertForMaskedLM)r   ZRoFormerForMaskedLM)r   Z#Speech2TextForConditionalGeneration)r   ZWav2Vec2ForMaskedLM)r   ZWhisperForConditionalGeneration)r   ZYosoForMaskedLM)r   ZBartForCausalLM)r   ZBertLMHeadModel)r   ZBertGenerationDecoder)r   ZBigBirdForCausalLM)r   ZBigBirdPegasusForCausalLM)r   ZBioGptForCausalLM)r   ZBlenderbotForCausalLM)r   ZBlenderbotSmallForCausalLM)r   ZCamembertForCausalLM)r   LlamaForCausalLM)r"   ZCohereForCausalLM)r+   ZData2VecTextForCausalLM)r-   ZDbrxForCausalLM)r:   ZElectraForCausalLM)r;   ZErnieForCausalLM)r>   ZFalconForCausalLM)ZfuyuZFuyuForCausalLM)rF   ZGemmaForCausalLM)rG   ZGemma2ForCausalLM)rY   ZJambaForCausalLM)rZ   ZJetMoeForCausalLM)rb   r   )rj   ZMarianForCausalLM)ro   ZMBartForCausalLM)rq   ZMegaForCausalLM)rs   ZMistralForCausalLM)rt   ZMixtralForCausalLM)r~   ZMusicgenForCausalLM)r   ZMusicgenMelodyForCausalLM)r   ZMvpForCausalLM)r   ZNemotronForCausalLM)r   ZOlmoForCausalLM)r   ZOpenLlamaForCausalLM)r   ZOPTForCausalLM)r   ZPegasusForCausalLM)r   ZPersimmonForCausalLM)r   ZPhiForCausalLM)r   ZPhi3ForCausalLM)r   ZPLBartForCausalLM)r   ZProphetNetForCausalLM)r   ZQDQBertLMHeadModel)r   ZQwen2ForCausalLM)r   ZQwen2MoeForCausalLM)r   ZRecurrentGemmaForCausalLM)r   ZRemBertForCausalLM)r   ZRobertaForCausalLM)r   ZRobertaPreLayerNormForCausalLM)r   ZRoCBertForCausalLM)r   ZRoFormerForCausalLM)Zspeech_to_text_2ZSpeech2Text2ForCausalLM)r   ZStableLmForCausalLM)r   ZStarcoder2ForCausalLM)ZtrocrZTrOCRForCausalLM)r   ZWhisperForCausalLM)r   ZXGLMForCausalLM)r   ZXLMProphetNetForCausalLM)r   ZXLMRobertaForCausalLM)r   ZXLMRobertaXLForCausalLM)r   ZXmodForCausalLM)r1   ZDeiTForMaskedImageModeling)rC   ZFocalNetForMaskedImageModeling)r   ZSwinForMaskedImageModeling)r   ZSwinv2ForMaskedImageModeling)r   ZViTForMaskedImageModeling)rX   ZImageGPTForCausalImageModeling)r   ZBeitForImageClassification)r   ZBitForImageClassification)r   ZCLIPForImageClassification)r%   ZConvNextForImageClassification)r&   Z ConvNextV2ForImageClassification)r)   ZCvtForImageClassification)r,   Z$Data2VecVisionForImageClassification)r1   )ZDeiTForImageClassificationZ%DeiTForImageClassificationWithTeacher)r4   ZDinatForImageClassification)r5   ZDinov2ForImageClassification)r8   )Z%EfficientFormerForImageClassificationZ0EfficientFormerForImageClassificationWithTeacher)r9   Z"EfficientNetForImageClassification)rC   ZFocalNetForImageClassification)rS   ZHieraForImageClassification)rX   ZImageGPTForImageClassification)r`   )ZLevitForImageClassificationZ&LevitForImageClassificationWithTeacher)rv   Z!MobileNetV1ForImageClassification)rw   Z!MobileNetV2ForImageClassification)rx   ZMobileViTForImageClassification)ry   Z!MobileViTV2ForImageClassification)r   ZNatForImageClassification)r   )Z&PerceiverForImageClassificationLearnedZ&PerceiverForImageClassificationFourierZ-PerceiverForImageClassificationConvProcessing)r   Z PoolFormerForImageClassification)r   ZPvtForImageClassification)r   ZPvtV2ForImageClassification)r   ZRegNetForImageClassification)r   ZResNetForImageClassification)r   ZSegformerForImageClassification)r   ZSiglipForImageClassification)r   Z!SwiftFormerForImageClassification)r   ZSwinForImageClassification)r   ZSwinv2ForImageClassification)r   ZVanForImageClassification)r   ZViTForImageClassification)r   ZViTHybridForImageClassification)r   ZViTMSNForImageClassification)r3   ZDetrForSegmentation)r   ZBeitForSemanticSegmentation)r,   Z%Data2VecVisionForSemanticSegmentation)r7   ZDPTForSemanticSegmentation)rw   Z"MobileNetV2ForSemanticSegmentation)rx   Z MobileViTForSemanticSegmentation)ry   Z"MobileViTV2ForSemanticSegmentation)r   Z SegformerForSemanticSegmentation)ZupernetZUperNetForSemanticSegmentation)rm   Z!MaskFormerForInstanceSegmentation)rl   Z#Mask2FormerForUniversalSegmentation)r   Z!OneFormerForUniversalSegmentation)r   Z!TimesformerForVideoClassification)r   ZVideoMAEForVideoClassification)r   ZVivitForVideoClassification)r   ZBlipForConditionalGeneration)r   ZBlip2ForConditionalGeneration)r   Z!ChameleonForConditionalGeneration)ZinstructblipZ$InstructBlipForConditionalGeneration)ZinstructblipvideoZ)InstructBlipVideoForConditionalGeneration)r[   ZKosmos2ForConditionalGeneration)Z
pix2structZ"Pix2StructForConditionalGeneration)zvision-encoder-decoderZVisionEncoderDecoderModel)ro   ZMBartForConditionalGeneration)rr   ZMegatronBertForMaskedLM)r   ZPerceiverForMaskedLM)r   ZReformerForMaskedLM)r#   Z!ConditionalDetrForObjectDetection)r0   Z DeformableDetrForObjectDetection)r2   ZDetaForObjectDetection)r3   ZDetrForObjectDetection)r   ZRTDetrForObjectDetection)r   Z"TableTransformerForObjectDetection)r   ZYolosForObjectDetection)rR   ZGroundingDinoForObjectDetection)r   ZOwlv2ForObjectDetection)r   ZOwlViTForObjectDetection)Zdepth_anythingZDepthAnythingForDepthEstimation)r7   ZDPTForDepthEstimation)rI   ZGLPNForDepthEstimation)ZzoedepthZZoeDepthForDepthEstimation)r   Z"BlenderbotForConditionalGeneration)r}   ZMT5ForConditionalGeneration)r   ZPegasusForConditionalGeneration)r   Z"ProphetNetForConditionalGeneration)r   ZSeamlessM4TForTextToText)r   ZSeamlessM4Tv2ForTextToText)r   ZUMT5ForConditionalGeneration)r   Z%XLMProphetNetForConditionalGeneration)r   ZSeamlessM4TForSpeechToText)r   ZSeamlessM4Tv2ForSpeechToText)zspeech-encoder-decoderZSpeechEncoderDecoderModel)r   ZSpeechT5ForSpeechToText)r   ZAlbertForSequenceClassification)r   ZBartForSequenceClassification)r   ZBertForSequenceClassification)r   Z BigBirdForSequenceClassification)r   Z'BigBirdPegasusForSequenceClassification)r   ZBioGptForSequenceClassification)r   ZBloomForSequenceClassification)r   Z"CamembertForSequenceClassification)r   ZCanineForSequenceClassification)r   LlamaForSequenceClassification)r$   Z!ConvBertForSequenceClassification)r(   ZCTRLForSequenceClassification)r+   Z%Data2VecTextForSequenceClassification)r.   Z DebertaForSequenceClassification)r/   Z"DebertaV2ForSequenceClassification)r6   Z#DistilBertForSequenceClassification)r:   Z ElectraForSequenceClassification)r;   ZErnieForSequenceClassification)r<   ZErnieMForSequenceClassification)r=   ZEsmForSequenceClassification)r>   ZFalconForSequenceClassification)r@   Z!FlaubertForSequenceClassification)rB   ZFNetForSequenceClassification)rE   ZFunnelForSequenceClassification)rF   ZGemmaForSequenceClassification)rG   ZGemma2ForSequenceClassification)rJ   GPT2ForSequenceClassification)rL   r   )rM   Z#GPTBigCodeForSequenceClassification)rN   ZGPTNeoForSequenceClassification)rO   Z GPTNeoXForSequenceClassification)rQ   ZGPTJForSequenceClassification)rU   ZIBertForSequenceClassification)rY   ZJambaForSequenceClassification)rZ   ZJetMoeForSequenceClassification)r\   Z!LayoutLMForSequenceClassification)r]   Z#LayoutLMv2ForSequenceClassification)r^   Z#LayoutLMv3ForSequenceClassification)r_   ZLEDForSequenceClassification)ra   ZLiltForSequenceClassification)rb   r   )rc   Z#LongformerForSequenceClassification)re   ZLukeForSequenceClassification)rk   Z!MarkupLMForSequenceClassification)ro   ZMBartForSequenceClassification)rq   ZMegaForSequenceClassification)rr   Z%MegatronBertForSequenceClassification)rs   Z MistralForSequenceClassification)rt   Z MixtralForSequenceClassification)ru   Z#MobileBertForSequenceClassification)rz   ZMPNetForSequenceClassification)r{   ZMptForSequenceClassification)r|   ZMraForSequenceClassification)r}   ZMT5ForSequenceClassification)r   ZMvpForSequenceClassification)r   Z!NemotronForSequenceClassification)r   ZNezhaForSequenceClassification)r   Z&NystromformerForSequenceClassification)r   Z"OpenLlamaForSequenceClassification)r   Z"OpenAIGPTForSequenceClassification)r   ZOPTForSequenceClassification)r   Z"PerceiverForSequenceClassification)r   Z"PersimmonForSequenceClassification)r   ZPhiForSequenceClassification)r   ZPhi3ForSequenceClassification)r   ZPLBartForSequenceClassification)r   Z QDQBertForSequenceClassification)r   ZQwen2ForSequenceClassification)r   Z!Qwen2MoeForSequenceClassification)r   Z!ReformerForSequenceClassification)r   Z RemBertForSequenceClassification)r   Z RobertaForSequenceClassification)r   Z,RobertaPreLayerNormForSequenceClassification)r   Z RoCBertForSequenceClassification)r   Z!RoFormerForSequenceClassification)r   Z$SqueezeBertForSequenceClassification)r   Z!StableLmForSequenceClassification)r   Z#Starcoder2ForSequenceClassification)r   ZT5ForSequenceClassification)r   ZTapasForSequenceClassification)r   Z"TransfoXLForSequenceClassification)r   ZUMT5ForSequenceClassification)r   ZXLMForSequenceClassification)r   Z#XLMRobertaForSequenceClassification)r   Z%XLMRobertaXLForSequenceClassification)r   ZXLNetForSequenceClassification)r   ZXmodForSequenceClassification)r   ZYosoForSequenceClassification)r   ZAlbertForQuestionAnswering)r   ZBartForQuestionAnswering)r   ZBertForQuestionAnswering)r   ZBigBirdForQuestionAnswering)r   Z"BigBirdPegasusForQuestionAnswering)r   ZBloomForQuestionAnswering)r   ZCamembertForQuestionAnswering)r   ZCanineForQuestionAnswering)r$   ZConvBertForQuestionAnswering)r+   Z Data2VecTextForQuestionAnswering)r.   ZDebertaForQuestionAnswering)r/   ZDebertaV2ForQuestionAnswering)r6   ZDistilBertForQuestionAnswering)r:   ZElectraForQuestionAnswering)r;   ZErnieForQuestionAnswering)r<   ZErnieMForQuestionAnswering)r>   ZFalconForQuestionAnswering)r@   Z"FlaubertForQuestionAnsweringSimple)rB   ZFNetForQuestionAnswering)rE   ZFunnelForQuestionAnswering)rL   ZGPT2ForQuestionAnswering)rN   ZGPTNeoForQuestionAnswering)rO   ZGPTNeoXForQuestionAnswering)rQ   ZGPTJForQuestionAnswering)rU   ZIBertForQuestionAnswering)r]   ZLayoutLMv2ForQuestionAnswering)r^   ZLayoutLMv3ForQuestionAnswering)r_   ZLEDForQuestionAnswering)ra   ZLiltForQuestionAnswering)rb   ZLlamaForQuestionAnswering)rc   ZLongformerForQuestionAnswering)re   ZLukeForQuestionAnswering)rf   ZLxmertForQuestionAnswering)rk   ZMarkupLMForQuestionAnswering)ro   ZMBartForQuestionAnswering)rq   ZMegaForQuestionAnswering)rr   Z MegatronBertForQuestionAnswering)ru   ZMobileBertForQuestionAnswering)rz   ZMPNetForQuestionAnswering)r{   ZMptForQuestionAnswering)r|   ZMraForQuestionAnswering)r}   ZMT5ForQuestionAnswering)r   ZMvpForQuestionAnswering)r   ZNemotronForQuestionAnswering)r   ZNezhaForQuestionAnswering)r   Z!NystromformerForQuestionAnswering)r   ZOPTForQuestionAnswering)r   ZQDQBertForQuestionAnswering)r   ZReformerForQuestionAnswering)r   ZRemBertForQuestionAnswering)r   ZRobertaForQuestionAnswering)r   Z'RobertaPreLayerNormForQuestionAnswering)r   ZRoCBertForQuestionAnswering)r   ZRoFormerForQuestionAnswering)r   ZSplinterForQuestionAnswering)r   ZSqueezeBertForQuestionAnswering)r   ZT5ForQuestionAnswering)r   ZUMT5ForQuestionAnswering)r   ZXLMForQuestionAnsweringSimple)r   ZXLMRobertaForQuestionAnswering)r   Z XLMRobertaXLForQuestionAnswering)r   ZXLNetForQuestionAnsweringSimple)r   ZXmodForQuestionAnswering)r   ZYosoForQuestionAnswering)r   ZTapasForQuestionAnswering)r   ZBlipForQuestionAnswering)r   ZViltForQuestionAnswering)r\   ZLayoutLMForQuestionAnswering)r   ZAlbertForTokenClassification)r   ZBertForTokenClassification)r   ZBigBirdForTokenClassification)r   ZBioGptForTokenClassification)r   ZBloomForTokenClassification)r   ZBrosForTokenClassification)r   ZCamembertForTokenClassification)r   ZCanineForTokenClassification)r$   ZConvBertForTokenClassification)r+   Z"Data2VecTextForTokenClassification)r.   ZDebertaForTokenClassification)r/   ZDebertaV2ForTokenClassification)r6   Z DistilBertForTokenClassification)r:   ZElectraForTokenClassification)r;   ZErnieForTokenClassification)r<   ZErnieMForTokenClassification)r=   ZEsmForTokenClassification)r>   ZFalconForTokenClassification)r@   ZFlaubertForTokenClassification)rB   ZFNetForTokenClassification)rE   ZFunnelForTokenClassification)rF   ZGemmaForTokenClassification)rG   ZGemma2ForTokenClassification)rJ   GPT2ForTokenClassification)rL   r   )rM   Z GPTBigCodeForTokenClassification)rN   ZGPTNeoForTokenClassification)rO   ZGPTNeoXForTokenClassification)rU   ZIBertForTokenClassification)r\   ZLayoutLMForTokenClassification)r]   Z LayoutLMv2ForTokenClassification)r^   Z LayoutLMv3ForTokenClassification)ra   ZLiltForTokenClassification)rb   ZLlamaForTokenClassification)rc   Z LongformerForTokenClassification)re   ZLukeForTokenClassification)rk   ZMarkupLMForTokenClassification)rq   ZMegaForTokenClassification)rr   Z"MegatronBertForTokenClassification)rs   ZMistralForTokenClassification)rt   ZMixtralForTokenClassification)ru   Z MobileBertForTokenClassification)rz   ZMPNetForTokenClassification)r{   ZMptForTokenClassification)r|   ZMraForTokenClassification)r}   ZMT5ForTokenClassification)r   ZNemotronForTokenClassification)r   ZNezhaForTokenClassification)r   Z#NystromformerForTokenClassification)r   ZPersimmonForTokenClassification)r   ZPhiForTokenClassification)r   ZPhi3ForTokenClassification)r   ZQDQBertForTokenClassification)r   ZQwen2ForTokenClassification)r   ZQwen2MoeForTokenClassification)r   ZRemBertForTokenClassification)r   ZRobertaForTokenClassification)r   Z)RobertaPreLayerNormForTokenClassification)r   ZRoCBertForTokenClassification)r   ZRoFormerForTokenClassification)r   Z!SqueezeBertForTokenClassification)r   ZStableLmForTokenClassification)r   Z Starcoder2ForTokenClassification)r   ZT5ForTokenClassification)r   ZUMT5ForTokenClassification)r   ZXLMForTokenClassification)r   Z XLMRobertaForTokenClassification)r   Z"XLMRobertaXLForTokenClassification)r   ZXLNetForTokenClassification)r   ZXmodForTokenClassification)r   ZYosoForTokenClassification)r   ZAlbertForMultipleChoice)r   ZBertForMultipleChoice)r   ZBigBirdForMultipleChoice)r   ZCamembertForMultipleChoice)r   ZCanineForMultipleChoice)r$   ZConvBertForMultipleChoice)r+   ZData2VecTextForMultipleChoice)r/   ZDebertaV2ForMultipleChoice)r6   ZDistilBertForMultipleChoice)r:   ZElectraForMultipleChoice)r;   ZErnieForMultipleChoice)r<   ZErnieMForMultipleChoice)r@   ZFlaubertForMultipleChoice)rB   ZFNetForMultipleChoice)rE   ZFunnelForMultipleChoice)rU   ZIBertForMultipleChoice)rc   ZLongformerForMultipleChoice)re   ZLukeForMultipleChoice)rq   ZMegaForMultipleChoice)rr   ZMegatronBertForMultipleChoice)ru   ZMobileBertForMultipleChoice)rz   ZMPNetForMultipleChoice)r|   ZMraForMultipleChoice)r   ZNezhaForMultipleChoice)r   ZNystromformerForMultipleChoice)r   ZQDQBertForMultipleChoice)r   ZRemBertForMultipleChoice)r   ZRobertaForMultipleChoice)r   Z$RobertaPreLayerNormForMultipleChoice)r   ZRoCBertForMultipleChoice)r   ZRoFormerForMultipleChoice)r   ZSqueezeBertForMultipleChoice)r   ZXLMForMultipleChoice)r   ZXLMRobertaForMultipleChoice)r   ZXLMRobertaXLForMultipleChoice)r   ZXLNetForMultipleChoice)r   ZXmodForMultipleChoice)r   ZYosoForMultipleChoice)r   ZBertForNextSentencePrediction)r;   ZErnieForNextSentencePrediction)rB   ZFNetForNextSentencePrediction)rr   Z%MegatronBertForNextSentencePrediction)ru   Z#MobileBertForNextSentencePrediction)r   ZNezhaForNextSentencePrediction)r   Z QDQBertForNextSentencePrediction)r   ZASTForAudioClassification)r*   Z&Data2VecAudioForSequenceClassification)rT   ZHubertForSequenceClassification)r   ZSEWForSequenceClassification)r   ZSEWDForSequenceClassification)r   Z"UniSpeechForSequenceClassification)r   Z%UniSpeechSatForSequenceClassification)r   Z!Wav2Vec2ForSequenceClassification)r   Z%Wav2Vec2BertForSequenceClassification)r   Z*Wav2Vec2ConformerForSequenceClassification)r   ZWavLMForSequenceClassification)r   ZWhisperForAudioClassification)r*   ZData2VecAudioForCTC)rT   ZHubertForCTC)rp   ZMCTCTForCTC)r   Z	SEWForCTC)r   Z
SEWDForCTC)r   ZUniSpeechForCTC)r   ZUniSpeechSatForCTC)r   ZWav2Vec2ForCTC)r   ZWav2Vec2BertForCTC)r   ZWav2Vec2ConformerForCTC)r   ZWavLMForCTC)r*   Z(Data2VecAudioForAudioFrameClassification)r   Z'UniSpeechSatForAudioFrameClassification)r   Z#Wav2Vec2ForAudioFrameClassification)r   Z'Wav2Vec2BertForAudioFrameClassification)r   Z,Wav2Vec2ConformerForAudioFrameClassification)r   Z WavLMForAudioFrameClassification)r*   ZData2VecAudioForXVector)r   ZUniSpeechSatForXVector)r   ZWav2Vec2ForXVector)r   ZWav2Vec2BertForXVector)r   ZWav2Vec2ConformerForXVector)r   ZWavLMForXVector)r   ZSpeechT5ForTextToSpeech)r?   ZFastSpeech2ConformerWithHifiGan)r~   Z MusicgenForConditionalGeneration)r   Z&MusicgenMelodyForConditionalGeneration)r   ZSeamlessM4TForTextToSpeech)r   ZSeamlessM4Tv2ForTextToSpeech)r   ZBeitBackbone)r   ZBitBackbone)r%   ZConvNextBackbone)r&   ZConvNextV2Backbone)r4   ZDinatBackbone)r5   ZDinov2Backbone)rC   ZFocalNetBackbone)rS   ZHieraBackbone)rn   ZMaskFormerSwinBackbone)r   ZNatBackbone)r   ZPvtV2Backbone)r   ZResNetBackbone)Zrt_detr_resnetZRTDetrResNetBackbone)r   ZSwinBackbone)r   ZSwinv2Backbone)r   ZVitDetBackbone)Z
superpointZSuperPointForKeypointDetection)r}   ZMT5EncoderModel)r   ZT5EncoderModel)r   ZUMT5EncoderModel)r   Z'PatchTSMixerForTimeSeriesClassification)r   ZPatchTSTForClassification)r   ZPatchTSMixerForRegression)r   ZPatchTSTForRegression)r   ZSwin2SRForImageSuperResolutionc                   @   s   e Zd ZeZdS )AutoModelForMaskGenerationN)__name__
__module____qualname__!MODEL_FOR_MASK_GENERATION_MAPPING_model_mapping r   r   J/tmp/pip-unpacked-wheel-zw5xktn0/transformers/models/auto/modeling_auto.pyr     s   r   c                   @   s   e Zd ZeZdS )AutoModelForKeypointDetectionN)r   r   r   $MODEL_FOR_KEYPOINT_DETECTION_MAPPINGr   r   r   r   r   r     s   r   c                   @   s   e Zd ZeZdS )AutoModelForTextEncodingN)r   r   r   MODEL_FOR_TEXT_ENCODING_MAPPINGr   r   r   r   r   r     s   r   c                   @   s   e Zd ZeZdS )AutoModelForImageToImageN)r   r   r    MODEL_FOR_IMAGE_TO_IMAGE_MAPPINGr   r   r   r   r   r     s   r   c                   @   s   e Zd ZeZdS )	AutoModelN)r   r   r   MODEL_MAPPINGr   r   r   r   r   r     s   r   c                   @   s   e Zd ZeZdS )AutoModelForPreTrainingN)r   r   r   MODEL_FOR_PRETRAINING_MAPPINGr   r   r   r   r   r     s   r   Zpretraining)head_docc                   @   s   e Zd ZeZdS )_AutoModelWithLMHeadN)r   r   r   MODEL_WITH_LM_HEAD_MAPPINGr   r   r   r   r   r     s   r   zlanguage modelingc                   @   s   e Zd ZeZdS )AutoModelForCausalLMN)r   r   r   MODEL_FOR_CAUSAL_LM_MAPPINGr   r   r   r   r   r     s   r   zcausal language modelingc                   @   s   e Zd ZeZdS )AutoModelForMaskedLMN)r   r   r   MODEL_FOR_MASKED_LM_MAPPINGr   r   r   r   r   r     s   r   zmasked language modelingc                   @   s   e Zd ZeZdS )AutoModelForSeq2SeqLMN)r   r   r   &MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPINGr   r   r   r   r   r     s   r   z&sequence-to-sequence language modelingzgoogle-t5/t5-base)r   Zcheckpoint_for_examplec                   @   s   e Zd ZeZdS )"AutoModelForSequenceClassificationN)r   r   r   )MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPINGr   r   r   r   r   r     s   r   zsequence classificationc                   @   s   e Zd ZeZdS )AutoModelForQuestionAnsweringN)r   r   r   $MODEL_FOR_QUESTION_ANSWERING_MAPPINGr   r   r   r   r   r     s   r   zquestion answeringc                   @   s   e Zd ZeZdS )"AutoModelForTableQuestionAnsweringN)r   r   r   *MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPINGr   r   r   r   r   r     s   r   ztable question answeringzgoogle/tapas-base-finetuned-wtqc                   @   s   e Zd ZeZdS )#AutoModelForVisualQuestionAnsweringN)r   r   r   +MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPINGr   r   r   r   r   r   	  s   r   zvisual question answeringzdandelin/vilt-b32-finetuned-vqac                   @   s   e Zd ZeZdS )%AutoModelForDocumentQuestionAnsweringN)r   r   r   -MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPINGr   r   r   r   r   r    s   r  zdocument question answeringz/impira/layoutlm-document-qa", revision="52e01b3c                   @   s   e Zd ZeZdS )AutoModelForTokenClassificationN)r   r   r   &MODEL_FOR_TOKEN_CLASSIFICATION_MAPPINGr   r   r   r   r   r    s   r  ztoken classificationc                   @   s   e Zd ZeZdS )AutoModelForMultipleChoiceN)r   r   r   !MODEL_FOR_MULTIPLE_CHOICE_MAPPINGr   r   r   r   r   r  &  s   r  zmultiple choicec                   @   s   e Zd ZeZdS )"AutoModelForNextSentencePredictionN)r   r   r   *MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPINGr   r   r   r   r   r  -  s   r  znext sentence predictionc                   @   s   e Zd ZeZdS )AutoModelForImageClassificationN)r   r   r   &MODEL_FOR_IMAGE_CLASSIFICATION_MAPPINGr   r   r   r   r   r
  6  s   r
  zimage classificationc                   @   s   e Zd ZeZdS )'AutoModelForZeroShotImageClassificationN)r   r   r   0MODEL_FOR_ZERO_SHOT_IMAGE_CLASSIFICATION_MAPPINGr   r   r   r   r   r  =  s   r  zzero-shot image classificationc                   @   s   e Zd ZeZdS )AutoModelForImageSegmentationN)r   r   r   $MODEL_FOR_IMAGE_SEGMENTATION_MAPPINGr   r   r   r   r   r  F  s   r  zimage segmentationc                   @   s   e Zd ZeZdS ) AutoModelForSemanticSegmentationN)r   r   r   'MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPINGr   r   r   r   r   r  M  s   r  zsemantic segmentationc                   @   s   e Zd ZeZdS )!AutoModelForUniversalSegmentationN)r   r   r   (MODEL_FOR_UNIVERSAL_SEGMENTATION_MAPPINGr   r   r   r   r   r  V  s   r  zuniversal image segmentationc                   @   s   e Zd ZeZdS ) AutoModelForInstanceSegmentationN)r   r   r   'MODEL_FOR_INSTANCE_SEGMENTATION_MAPPINGr   r   r   r   r   r  _  s   r  zinstance segmentationc                   @   s   e Zd ZeZdS )AutoModelForObjectDetectionN)r   r   r   "MODEL_FOR_OBJECT_DETECTION_MAPPINGr   r   r   r   r   r  h  s   r  zobject detectionc                   @   s   e Zd ZeZdS )#AutoModelForZeroShotObjectDetectionN)r   r   r   ,MODEL_FOR_ZERO_SHOT_OBJECT_DETECTION_MAPPINGr   r   r   r   r   r  o  s   r  zzero-shot object detectionc                   @   s   e Zd ZeZdS )AutoModelForDepthEstimationN)r   r   r   "MODEL_FOR_DEPTH_ESTIMATION_MAPPINGr   r   r   r   r   r  x  s   r  zdepth estimationc                   @   s   e Zd ZeZdS )AutoModelForVideoClassificationN)r   r   r   &MODEL_FOR_VIDEO_CLASSIFICATION_MAPPINGr   r   r   r   r   r    s   r  zvideo classificationc                   @   s   e Zd ZeZdS )AutoModelForVision2SeqN)r   r   r   MODEL_FOR_VISION_2_SEQ_MAPPINGr   r   r   r   r   r    s   r  zvision-to-text modelingc                   @   s   e Zd ZeZdS )AutoModelForAudioClassificationN)r   r   r   &MODEL_FOR_AUDIO_CLASSIFICATION_MAPPINGr   r   r   r   r   r     s   r   zaudio classificationc                   @   s   e Zd ZeZdS )AutoModelForCTCN)r   r   r   MODEL_FOR_CTC_MAPPINGr   r   r   r   r   r"    s   r"  z%connectionist temporal classificationc                   @   s   e Zd ZeZdS )AutoModelForSpeechSeq2SeqN)r   r   r   "MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPINGr   r   r   r   r   r$    s   r$  z,sequence-to-sequence speech-to-text modelingc                   @   s   e Zd ZeZdS )$AutoModelForAudioFrameClassificationN)r   r   r   ,MODEL_FOR_AUDIO_FRAME_CLASSIFICATION_MAPPINGr   r   r   r   r   r&    s   r&  z"audio frame (token) classificationc                   @   s   e Zd ZeZdS )AutoModelForAudioXVectorN)r   r   r   MODEL_FOR_AUDIO_XVECTOR_MAPPINGr   r   r   r   r   r(    s   r(  c                   @   s   e Zd ZeZdS )AutoModelForTextToSpectrogramN)r   r   r   %MODEL_FOR_TEXT_TO_SPECTROGRAM_MAPPINGr   r   r   r   r   r*    s   r*  c                   @   s   e Zd ZeZdS )AutoModelForTextToWaveformN)r   r   r   "MODEL_FOR_TEXT_TO_WAVEFORM_MAPPINGr   r   r   r   r   r,    s   r,  c                   @   s   e Zd ZeZdS )AutoBackboneN)r   r   r   MODEL_FOR_BACKBONE_MAPPINGr   r   r   r   r   r.    s   r.  zaudio retrieval via x-vectorc                   @   s   e Zd ZeZdS )AutoModelForMaskedImageModelingN)r   r   r   'MODEL_FOR_MASKED_IMAGE_MODELING_MAPPINGr   r   r   r   r   r0    s   r0  zmasked image modelingc                       s0   e Zd Ze fddZe fddZ  ZS )AutoModelWithLMHeadc                    s   t dt t |S NzThe class `AutoModelWithLMHead` is deprecated and will be removed in a future version. Please use `AutoModelForCausalLM` for causal language models, `AutoModelForMaskedLM` for masked language models and `AutoModelForSeq2SeqLM` for encoder-decoder models.)warningswarnFutureWarningsuperfrom_config)clsconfig	__class__r   r   r8    s
    zAutoModelWithLMHead.from_configc                    s    t dt t j|f||S r3  )r4  r5  r6  r7  from_pretrained)r9  Zpretrained_model_name_or_pathZ
model_argskwargsr;  r   r   r=    s
    z#AutoModelWithLMHead.from_pretrained)r   r   r   classmethodr8  r=  __classcell__r   r   r;  r   r2    s   	r2  )__doc__r4  collectionsr   utilsr   Zauto_factoryr   r   r   r	   Zconfiguration_autor
   Z
get_loggerr   loggerZMODEL_MAPPING_NAMESZ#MODEL_FOR_PRETRAINING_MAPPING_NAMESZ MODEL_WITH_LM_HEAD_MAPPING_NAMESZ!MODEL_FOR_CAUSAL_LM_MAPPING_NAMESZMODEL_FOR_IMAGE_MAPPING_NAMESZ-MODEL_FOR_MASKED_IMAGE_MODELING_MAPPING_NAMESZ-MODEL_FOR_CAUSAL_IMAGE_MODELING_MAPPING_NAMESZ,MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING_NAMESZ*MODEL_FOR_IMAGE_SEGMENTATION_MAPPING_NAMESZ-MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING_NAMESZ-MODEL_FOR_INSTANCE_SEGMENTATION_MAPPING_NAMESZ.MODEL_FOR_UNIVERSAL_SEGMENTATION_MAPPING_NAMESZ,MODEL_FOR_VIDEO_CLASSIFICATION_MAPPING_NAMESZ$MODEL_FOR_VISION_2_SEQ_MAPPING_NAMESZ!MODEL_FOR_MASKED_LM_MAPPING_NAMESZ(MODEL_FOR_OBJECT_DETECTION_MAPPING_NAMESZ2MODEL_FOR_ZERO_SHOT_OBJECT_DETECTION_MAPPING_NAMESZ(MODEL_FOR_DEPTH_ESTIMATION_MAPPING_NAMESZ,MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMESZ(MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMESZ/MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING_NAMESZ*MODEL_FOR_QUESTION_ANSWERING_MAPPING_NAMESZ0MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPING_NAMESZ1MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPING_NAMESZ3MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPING_NAMESZ,MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING_NAMESZ'MODEL_FOR_MULTIPLE_CHOICE_MAPPING_NAMESZ0MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPING_NAMESZ,MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING_NAMESZMODEL_FOR_CTC_MAPPING_NAMESZ2MODEL_FOR_AUDIO_FRAME_CLASSIFICATION_MAPPING_NAMESZ%MODEL_FOR_AUDIO_XVECTOR_MAPPING_NAMESZ+MODEL_FOR_TEXT_TO_SPECTROGRAM_MAPPING_NAMESZ(MODEL_FOR_TEXT_TO_WAVEFORM_MAPPING_NAMESZ6MODEL_FOR_ZERO_SHOT_IMAGE_CLASSIFICATION_MAPPING_NAMESZ MODEL_FOR_BACKBONE_MAPPING_NAMESZ'MODEL_FOR_MASK_GENERATION_MAPPING_NAMESZ*MODEL_FOR_KEYPOINT_DETECTION_MAPPING_NAMESZ%MODEL_FOR_TEXT_ENCODING_MAPPING_NAMESZ2MODEL_FOR_TIME_SERIES_CLASSIFICATION_MAPPING_NAMESZ.MODEL_FOR_TIME_SERIES_REGRESSION_MAPPING_NAMESZ&MODEL_FOR_IMAGE_TO_IMAGE_MAPPING_NAMESr   r   r   r   Z'MODEL_FOR_CAUSAL_IMAGE_MODELING_MAPPINGr  r  r  r  r  r  r  r  r  r  r   ZMODEL_FOR_IMAGE_MAPPINGr1  r  r  r  r   r   r   r   r  r  r	  r!  r#  r%  r'  r)  r+  r-  r/  r   r   r   Z,MODEL_FOR_TIME_SERIES_CLASSIFICATION_MAPPINGZ(MODEL_FOR_TIME_SERIES_REGRESSION_MAPPINGr   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  r   r"  r$  r&  r(  r*  r,  r.  r0  r2  r   r   r   r   <module>   s  
  vNUW5=
3		^FM,



        
  

 
 
     
  

 
 


 
  
         