
    bCiiv                        S r SSKrSSKJr  SSKJr  SSKJrJrJ	r	  SSK
Jr  \R                  " \5      r\" / S	Q5      r\" / S
Q5      r\" / SQ5      r\" / SQ5      r\" SS/5      r\" / SQ5      r\" SS/5      r\" / SQ5      r\" SS/5      r\" / SQ5      r\" / SQ5      r\" SS/5      r\" / SQ5      r\" / SQ5      r\" S/5      r\" SS/5      r\" S/5      r\" / SQ5      r \" / S Q5      r!\" S!S"/5      r"\" S#/5      r#\" / S$Q5      r$\" \\5      r%\" \\5      r&\" \\5      r'\" \\5      r(\" \\5      r)\" \\5      r*\" \\5      r+\" \\5      r,\" \\5      r-\" \\5      r.\" \\5      r/\" \\5      r0\" \\5      r1\" \\5      r2\" \\5      r3\" \\5      r4\" \\ 5      r5\" \\!5      r6\" \\"5      r7\" \\5      r8\" \\#5      r9\" \\$5      r: " S% S&\5      r; " S' S(\5      r< " S) S*\5      r=\	" \=5      r= " S+ S,\5      r>\	" \>S-S.9r> " S/ S0\5      r?\	" \?S1S.9r? " S2 S3\5      r@\	" \@S4S.9r@ " S5 S6\5      rA\	" \AS7S.9rA " S8 S9\5      rB\	" \BS:S.9rB " S; S<\5      rC\	" \CS=S.9rC " S> S?\5      rD\	" \DS@S.9rD " SA SB\5      rE\	" \ESCS.9rE " SD SE\5      rF\	" \FSFS.9rF " SG SH\5      rG\	" \GSIS.9rG " SJ SK\5      rH\	" \HSLSMSN9rH " SO SP\5      rI\	" \ISQS.9rI " SR SS\5      rJ\	" \JSTS.9rJ " SU SV\5      rK\	" \KSWSXSN9rK " SY SZ\5      rL\	" \LS[S\SN9rL " S] S^\5      rM\	" \MS_S.9rM " S` Sa\5      rN\	" \NSbS.9rN " Sc Sd\5      rO\	" \OSeS.9rO " Sf Sg\5      rP\	" \PShS.9rP " Si Sj\@5      rQ/ SkQrRg)lzAuto Model class.    N)OrderedDict   )logging   )_BaseAutoModelClass_LazyAutoMappingauto_class_update)CONFIG_MAPPING_NAMES)EalbertTFAlbertModel)bartTFBartModelbertTFBertModel)
blenderbotTFBlenderbotModel)blenderbot-smallTFBlenderbotSmallModelblipTFBlipModel)	camembertTFCamembertModelclipTFCLIPModelconvbertTFConvBertModel)convnextTFConvNextModel)
convnextv2TFConvNextV2Model)ctrlTFCTRLModel)cvt
TFCvtModel)data2vec-visionTFData2VecVisionModeldebertaTFDebertaModel
deberta-v2TFDebertaV2Model)deitTFDeiTModel
distilbertTFDistilBertModel)dprTFDPRQuestionEncoder)efficientformerTFEfficientFormerModelelectraTFElectraModel)esm
TFEsmModelflaubertTFFlaubertModel)funnel)TFFunnelModelTFFunnelBaseModel)gpt-sw3TFGPT2Model)gpt2rG   )gptjTFGPTJModel)groupvitTFGroupViTModel)hubertTFHubertModel)ideficsTFIdeficsModel)layoutlmTFLayoutLMModel)
layoutlmv3TFLayoutLMv3Model)led
TFLEDModel
longformerTFLongformerModel)lxmertTFLxmertModel)marianTFMarianModel)mbartTFMBartModel)mistralTFMistralModel
mobilebertTFMobileBertModel)	mobilevitTFMobileViTModel)mpnetTFMPNetModel)mt5
TFMT5Model)
openai-gptTFOpenAIGPTModel)opt
TFOPTModel)pegasusTFPegasusModel)regnetTFRegNetModelrembertTFRemBertModel)resnetTFResNetModelrobertaTFRobertaModelroberta-prelayernormTFRobertaPreLayerNormModelroformerTFRoFormerModelsam
TFSamModel)sam_vision_modelTFSamVisionModel)	segformerTFSegformerModel)speech_to_textTFSpeech2TextModel)swiftformerTFSwiftFormerModel)swinTFSwinModel)t5	TFT5Model)tapasTFTapasModel)
transfo-xlTFTransfoXLModel)zvision-text-dual-encoderTFVisionTextDualEncoderModel)vit
TFViTModel)vit_maeTFViTMAEModel)wav2vec2TFWav2Vec2Model)whisperTFWhisperModel)xglmTFXGLMModelxlm
TFXLMModelxlm-robertaTFXLMRobertaModel)xlnetTFXLNetModel))r   TFAlbertForPreTrainingr   TFBartForConditionalGeneration)r   TFBertForPreTrainingr   TFCamembertForMaskedLMr&   TFCTRLLMHeadModelr5   TFDistilBertForMaskedLM)r<   TFElectraForPreTrainingrA   TFFlaubertWithLMHeadModel)rC   TFFunnelForPreTrainingrF   TFGPT2LMHeadModelrH   r   )rO   TFIdeficsForVisionText2TextrQ   TFLayoutLMForMaskedLM)rZ   TFLxmertForPreTraining)rc   TFMobileBertForPreTrainingrg   TFMPNetForMaskedLMrk   TFOpenAIGPTLMHeadModelry   TFRobertaForMaskedLMr|    TFRobertaPreLayerNormForMaskedLMr   TFT5ForConditionalGenerationr   TFTapasForMaskedLMr   TFTransfoXLLMHeadModel)r   TFViTMAEForPreTrainingr   TFXLMWithLMHeadModelr   TFXLMRobertaForMaskedLMr   TFXLNetLMHeadModel)!r   TFAlbertForMaskedLMr   r   TFBertForMaskedLMr   r    TFConvBertForMaskedLMr   r   r<   TFElectraForMaskedLMr>   TFEsmForMaskedLMr   rC   TFFunnelForMaskedLMr   r   rI   TFGPTJForCausalLMr   rU   TFLEDForConditionalGenerationrX   TFLongformerForMaskedLMr\   TFMarianMTModelrc   TFMobileBertForMaskedLMr   r   rt   TFRemBertForMaskedLMr   r   r   TFRoFormerForMaskedLMr   %TFSpeech2TextForConditionalGenerationr   r   r   r   !TFWhisperForConditionalGenerationr   r   r   ))r   TFBertLMHeadModel)r   TFCamembertForCausalLMr   r   r   r   )r`   TFMistralForCausalLMr   )rm   TFOPTForCausalLM)rt   TFRemBertForCausalLM)ry   TFRobertaForCausalLM)r|    TFRobertaPreLayerNormForCausalLM)r   TFRoFormerForCausalLMr   )r   TFXGLMForCausalLMr   )r   TFXLMRobertaForCausalLMr   )r2   TFDeiTForMaskedImageModeling)r   TFSwinForMaskedImageModeling))r"    TFConvNextForImageClassification)r$   "TFConvNextV2ForImageClassification)r(   TFCvtForImageClassification)r*   &TFData2VecVisionForImageClassification)r2   )TFDeiTForImageClassification'TFDeiTForImageClassificationWithTeacher)r9   )'TFEfficientFormerForImageClassification2TFEfficientFormerForImageClassificationWithTeacher)re   !TFMobileViTForImageClassification)rq   TFRegNetForImageClassification)rv   TFResNetForImageClassification)r   !TFSegformerForImageClassification)r   #TFSwiftFormerForImageClassification)r   TFSwinForImageClassification)r   TFViTForImageClassificationr   r   ))r*   'TFData2VecVisionForSemanticSegmentation)re   "TFMobileViTForSemanticSegmentation)r   "TFSegformerForSemanticSegmentation)r   TFBlipForConditionalGeneration)zvision-encoder-decoderTFVisionEncoderDecoderModel)r   r   r   r   )r-   TFDebertaForMaskedLM)r0   TFDebertaV2ForMaskedLMr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )
r   )r   $TFBlenderbotForConditionalGeneration)r   )TFBlenderbotSmallForConditionalGeneration)zencoder-decoderTFEncoderDecoderModelr   r   )r^   TFMBartForConditionalGeneration)ri   TFMT5ForConditionalGeneration)ro   !TFPegasusForConditionalGenerationr   r   r   ) )r   !TFAlbertForSequenceClassification)r   TFBartForSequenceClassification)r   TFBertForSequenceClassification)r   $TFCamembertForSequenceClassification)r    #TFConvBertForSequenceClassification)r&   TFCTRLForSequenceClassification)r-   "TFDebertaForSequenceClassification)r0   $TFDebertaV2ForSequenceClassification)r5   %TFDistilBertForSequenceClassification)r<   "TFElectraForSequenceClassification)r>   TFEsmForSequenceClassification)rA   #TFFlaubertForSequenceClassification)rC   !TFFunnelForSequenceClassification)rF   TFGPT2ForSequenceClassification)rH   r%  )rI   TFGPTJForSequenceClassification)rQ   #TFLayoutLMForSequenceClassification)rS   %TFLayoutLMv3ForSequenceClassification)rX   %TFLongformerForSequenceClassification)r`   "TFMistralForSequenceClassification)rc   %TFMobileBertForSequenceClassification)rg    TFMPNetForSequenceClassification)rk   $TFOpenAIGPTForSequenceClassification)rt   "TFRemBertForSequenceClassification)ry   "TFRobertaForSequenceClassification)r|   .TFRobertaPreLayerNormForSequenceClassification)r   #TFRoFormerForSequenceClassification)r    TFTapasForSequenceClassification)r   $TFTransfoXLForSequenceClassification)r   TFXLMForSequenceClassification)r   %TFXLMRobertaForSequenceClassification)r    TFXLNetForSequenceClassification))r   TFAlbertForQuestionAnswering)r   TFBertForQuestionAnswering)r   TFCamembertForQuestionAnswering)r    TFConvBertForQuestionAnswering)r-   TFDebertaForQuestionAnswering)r0   TFDebertaV2ForQuestionAnswering)r5    TFDistilBertForQuestionAnswering)r<   TFElectraForQuestionAnswering)rA   $TFFlaubertForQuestionAnsweringSimple)rC   TFFunnelForQuestionAnswering)rI   TFGPTJForQuestionAnsweringrS    TFLayoutLMv3ForQuestionAnswering)rX    TFLongformerForQuestionAnswering)rc    TFMobileBertForQuestionAnswering)rg   TFMPNetForQuestionAnswering)rt   TFRemBertForQuestionAnswering)ry   TFRobertaForQuestionAnswering)r|   )TFRobertaPreLayerNormForQuestionAnswering)r   TFRoFormerForQuestionAnswering)r   TFXLMForQuestionAnsweringSimple)r    TFXLMRobertaForQuestionAnswering)r   !TFXLNetForQuestionAnsweringSimple)r   #TFWav2Vec2ForSequenceClassification)rQ   TFLayoutLMForQuestionAnsweringrB  )r   TFTapasForQuestionAnswering))r   TFAlbertForTokenClassification)r   TFBertForTokenClassification)r   !TFCamembertForTokenClassification)r     TFConvBertForTokenClassification)r-   TFDebertaForTokenClassification)r0   !TFDebertaV2ForTokenClassification)r5   "TFDistilBertForTokenClassification)r<   TFElectraForTokenClassification)r>   TFEsmForTokenClassification)rA    TFFlaubertForTokenClassification)rC   TFFunnelForTokenClassification)rQ    TFLayoutLMForTokenClassification)rS   "TFLayoutLMv3ForTokenClassification)rX   "TFLongformerForTokenClassification)rc   "TFMobileBertForTokenClassification)rg   TFMPNetForTokenClassification)rt   TFRemBertForTokenClassification)ry   TFRobertaForTokenClassification)r|   +TFRobertaPreLayerNormForTokenClassification)r    TFRoFormerForTokenClassification)r   TFXLMForTokenClassification)r   "TFXLMRobertaForTokenClassification)r   TFXLNetForTokenClassification))r   TFAlbertForMultipleChoice)r   TFBertForMultipleChoice)r   TFCamembertForMultipleChoice)r    TFConvBertForMultipleChoice)r0   TFDebertaV2ForMultipleChoice)r5   TFDistilBertForMultipleChoice)r<   TFElectraForMultipleChoice)rA   TFFlaubertForMultipleChoice)rC   TFFunnelForMultipleChoice)rX   TFLongformerForMultipleChoice)rc   TFMobileBertForMultipleChoice)rg   TFMPNetForMultipleChoice)rt   TFRemBertForMultipleChoice)ry   TFRobertaForMultipleChoice)r|   &TFRobertaPreLayerNormForMultipleChoice)r   TFRoFormerForMultipleChoice)r   TFXLMForMultipleChoice)r   TFXLMRobertaForMultipleChoice)r   TFXLNetForMultipleChoice)r   TFBertForNextSentencePrediction)rc   %TFMobileBertForNextSentencePredictionr   )r   r   r   r,   r/   r4   r;   r@   rW   rb   )ri   TFMT5EncoderModelrs   rx   r{   r~   )r   TFT5EncoderModelr   r   c                       \ rS rSr\rSrg)TFAutoModelForMaskGenerationi   N)__name__
__module____qualname____firstlineno__$TF_MODEL_FOR_MASK_GENERATION_MAPPING_model_mapping__static_attributes__r      c/home/james-whalen/.local/lib/python3.13/site-packages/transformers/models/auto/modeling_tf_auto.pyr  r        9Nr  r  c                       \ rS rSr\rSrg)TFAutoModelForTextEncodingi  r  N)r  r  r  r  "TF_MODEL_FOR_TEXT_ENCODING_MAPPINGr  r  r  r  r  r  r    s    7Nr  r  c                       \ rS rSr\rSrg)TFAutoModeli  r  N)r  r  r  r  TF_MODEL_MAPPINGr  r  r  r  r  r  r    s    %Nr  r  c                       \ rS rSr\rSrg)!TFAutoModelForAudioClassificationi!  r  N)r  r  r  r  )TF_MODEL_FOR_AUDIO_CLASSIFICATION_MAPPINGr  r  r  r  r  r  r  !      >Nr  r  zaudio classification)head_docc                       \ rS rSr\rSrg)TFAutoModelForPreTrainingi*  r  N)r  r  r  r   TF_MODEL_FOR_PRETRAINING_MAPPINGr  r  r  r  r  r  r  *  s    5Nr  r  pretrainingc                       \ rS rSr\rSrg)_TFAutoModelWithLMHeadi2  r  N)r  r  r  r  TF_MODEL_WITH_LM_HEAD_MAPPINGr  r  r  r  r  r  r  2  s    2Nr  r  zlanguage modelingc                       \ rS rSr\rSrg)TFAutoModelForCausalLMi9  r  N)r  r  r  r  TF_MODEL_FOR_CAUSAL_LM_MAPPINGr  r  r  r  r  r  r  9      3Nr  r  zcausal language modelingc                       \ rS rSr\rSrg)!TFAutoModelForMaskedImageModelingi@  r  N)r  r  r  r  *TF_MODEL_FOR_MASKED_IMAGE_MODELING_MAPPINGr  r  r  r  r  r  r  @      ?Nr  r  zmasked image modelingc                       \ rS rSr\rSrg)!TFAutoModelForImageClassificationiI  r  N)r  r  r  r  )TF_MODEL_FOR_IMAGE_CLASSIFICATION_MAPPINGr  r  r  r  r  r  r  I  r  r  r  zimage classificationc                       \ rS rSr\rSrg))TFAutoModelForZeroShotImageClassificationiR  r  N)r  r  r  r  3TF_MODEL_FOR_ZERO_SHOT_IMAGE_CLASSIFICATION_MAPPINGr  r  r  r  r  r  r  R  s    HNr  r  zzero-shot image classificationc                       \ rS rSr\rSrg)"TFAutoModelForSemanticSegmentationi[  r  N)r  r  r  r  *TF_MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPINGr  r  r  r  r  r  r  [  r  r  r  zsemantic segmentationc                       \ rS rSr\rSrg)TFAutoModelForVision2Seqid  r  N)r  r  r  r  !TF_MODEL_FOR_VISION_2_SEQ_MAPPINGr  r  r  r  r  r  r  d  s    6Nr  r  zvision-to-text modelingc                       \ rS rSr\rSrg)TFAutoModelForMaskedLMik  r  N)r  r  r  r  TF_MODEL_FOR_MASKED_LM_MAPPINGr  r  r  r  r  r  r  k  r  r  r  zmasked language modelingc                       \ rS rSr\rSrg)TFAutoModelForSeq2SeqLMir  r  N)r  r  r  r  )TF_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPINGr  r  r  r  r  r  r  r  r  r  r  z&sequence-to-sequence language modelingzgoogle-t5/t5-base)r  checkpoint_for_examplec                       \ rS rSr\rSrg)$TFAutoModelForSequenceClassificationi}  r  N)r  r  r  r  ,TF_MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPINGr  r  r  r  r  r  r  }  s    ANr  r  zsequence classificationc                       \ rS rSr\rSrg)TFAutoModelForQuestionAnsweringi  r  N)r  r  r  r  'TF_MODEL_FOR_QUESTION_ANSWERING_MAPPINGr  r  r  r  r  r  r    s    <Nr  r  zquestion answeringc                       \ rS rSr\rSrg)'TFAutoModelForDocumentQuestionAnsweringi  r  N)r  r  r  r  0TF_MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPINGr  r  r  r  r  r  r    s    ENr  r  zdocument question answeringz/impira/layoutlm-document-qa", revision="52e01b3c                       \ rS rSr\rSrg)$TFAutoModelForTableQuestionAnsweringi  r  N)r  r  r  r  -TF_MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPINGr  r  r  r  r  r  r        BNr  r  ztable question answeringzgoogle/tapas-base-finetuned-wtqc                       \ rS rSr\rSrg)!TFAutoModelForTokenClassificationi  r  N)r  r  r  r  )TF_MODEL_FOR_TOKEN_CLASSIFICATION_MAPPINGr  r  r  r  r  r  r    r  r  r  ztoken classificationc                       \ rS rSr\rSrg)TFAutoModelForMultipleChoicei  r  N)r  r  r  r  $TF_MODEL_FOR_MULTIPLE_CHOICE_MAPPINGr  r  r  r  r  r  r    r  r  r  zmultiple choicec                       \ rS rSr\rSrg)$TFAutoModelForNextSentencePredictioni  r  N)r  r  r  r  -TF_MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPINGr  r  r  r  r  r  r    r  r  r  znext sentence predictionc                       \ rS rSr\rSrg)TFAutoModelForSpeechSeq2Seqi  r  N)r  r  r  r  %TF_MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPINGr  r  r  r  r  r  r    s    :Nr  r  z,sequence-to-sequence speech-to-text modelingc                   H   ^  \ rS rSr\U 4S j5       r\U 4S j5       rSrU =r$ )TFAutoModelWithLMHeadi  c                 X   > [         R                  " S[        5        [        TU ]  U5      $ Na  The class `TFAutoModelWithLMHead` is deprecated and will be removed in a future version. Please use `TFAutoModelForCausalLM` for causal language models, `TFAutoModelForMaskedLM` for masked language models and `TFAutoModelForSeq2SeqLM` for encoder-decoder models.)warningswarnFutureWarningsuperfrom_config)clsconfig	__class__s     r  r  !TFAutoModelWithLMHead.from_config  s,    I 		
 w"6**r  c                 b   > [         R                  " S[        5        [        TU ]  " U/UQ70 UD6$ r  )r  r  r  r  from_pretrained)r  pretrained_model_name_or_path
model_argskwargsr  s       r  r  %TFAutoModelWithLMHead.from_pretrained  s8    I 		
 w&'D\z\U[\\r  r  )	r  r  r  r  classmethodr  r  r  __classcell__)r  s   @r  r  r    s+    + + ] ]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  r  r  r  r  r  r  r  r  r  )S__doc__r  collectionsr   utilsr   auto_factoryr   r   r	   configuration_autor
   
get_loggerr  loggerTF_MODEL_MAPPING_NAMES&TF_MODEL_FOR_PRETRAINING_MAPPING_NAMES#TF_MODEL_WITH_LM_HEAD_MAPPING_NAMES$TF_MODEL_FOR_CAUSAL_LM_MAPPING_NAMES0TF_MODEL_FOR_MASKED_IMAGE_MODELING_MAPPING_NAMES/TF_MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING_NAMES9TF_MODEL_FOR_ZERO_SHOT_IMAGE_CLASSIFICATION_MAPPING_NAMES0TF_MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING_NAMES'TF_MODEL_FOR_VISION_2_SEQ_MAPPING_NAMES$TF_MODEL_FOR_MASKED_LM_MAPPING_NAMES/TF_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMES+TF_MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMES2TF_MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING_NAMES-TF_MODEL_FOR_QUESTION_ANSWERING_MAPPING_NAMES/TF_MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING_NAMES6TF_MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPING_NAMES3TF_MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPING_NAMES/TF_MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING_NAMES*TF_MODEL_FOR_MULTIPLE_CHOICE_MAPPING_NAMES3TF_MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPING_NAMES*TF_MODEL_FOR_MASK_GENERATION_MAPPING_NAMES(TF_MODEL_FOR_TEXT_ENCODING_MAPPING_NAMESr  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  r  r  r  r  r  r  r  __all__r  r  r  <module>r     s.     #  R R 4 
		H	% %GI V *5* &@ '2#%' #N (3( $0 4?004 0 3>3 /. =H 	 = 9 4?4 0 +62A+ ' (3( $8 3>3 /  /:C8/ + 6A"$6 2L 1<1 -6 3>?r>s2t /9D6:: 6 7B 	17 3 3>3 /: .9. *2 7B3?7 3 .9. *
 ,7, (. $$8:PQ #34HJp#q   01EGj k !12FHl!m -=J. * -=I- ) 7GS7 3 .>J. * %55IKr$s !!12FHl!m ,<I- ) 0@L0 , )9E) % +;G+ ' 4DP4 0 1AM1 - -=I- ) (8D( $ 1AM1 - -=I- ) (8D( $ &66JLt%u ":#6 :8!4 8&% &  ,?(; ? %6%0F% !
6 3 6 ..GR_` 30 3 ++AL_` 40 4 ++ALfg @(; @ %6%0G% !
?(; ? %6%0F% !
I0C I ->-8X- )
@)< @ &7&1H& "
72 7 --EPij 40 4 ++ALfg ?1 ? ,5. B+> B (9(3L( $
=&9 = #44S^r"s F.A F +<+*L+ 'C+> C (9('<( $?(; ? %6%0F% !
:#6 :  11MXij C+> C (9(3M( $
;"5 ; 0*X 
]2 ],-r  