
    sg8                        d Z ddlmZ ddlmZ ddlmZmZmZ ddl	m
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dg      Z eg d      Z eg d      Z eg d      Z eg d      Z eg d      Z edg      Z eddg      Z edg      Z 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
e      Z" 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
e      Z) G d de      Z* ee*      Z* G d de      Z+ ee+d      Z+ G d de      Z, ee,d      Z, G d  d!e      Z- ee-d"      Z- G d# d$e      Z. ee.d%d&'      Z. G d( d)e      Z/ ee/d*      Z/ G d+ d,e      Z0 ee0d-      Z0 G d. d/e      Z1 ee1d0      Z1 G d1 d2e      Z2 ee2d3      Z2 G d4 d5e      Z3 ee3d6      Z3 G d7 d8e      Z4 ee4d9      Z4 G d: d;e      Z5 ee5d<      Z5 G d= d>e      Z6 ee6d?      Z6y@)AzAuto Model class.    )OrderedDict   )logging   )_BaseAutoModelClass_LazyAutoMappingauto_class_update)CONFIG_MAPPING_NAMES)%)albertFlaxAlbertModel)bartFlaxBartModel)beitFlaxBeitModel)bertFlaxBertModel)big_birdFlaxBigBirdModel)
blenderbotFlaxBlenderbotModel)blenderbot-smallFlaxBlenderbotSmallModel)bloomFlaxBloomModel)clipFlaxCLIPModel)dinov2FlaxDinov2Model)
distilbertFlaxDistilBertModel)electraFlaxElectraModel)gemmaFlaxGemmaModel)gpt-sw3FlaxGPT2Model)gpt2r&   )gpt_neoFlaxGPTNeoModel)gptjFlaxGPTJModel)llamaFlaxLlamaModel)longt5FlaxLongT5Model)marianFlaxMarianModel)mbartFlaxMBartModel)mistralFlaxMistralModel)mt5FlaxMT5Model)optFlaxOPTModel)pegasusFlaxPegasusModel)regnetFlaxRegNetModel)resnetFlaxResNetModel)robertaFlaxRobertaModel)roberta-prelayernormFlaxRobertaPreLayerNormModel)roformerFlaxRoFormerModel)t5FlaxT5Model)zvision-text-dual-encoderFlaxVisionTextDualEncoderModel)vitFlaxViTModel)wav2vec2FlaxWav2Vec2Model)whisperFlaxWhisperModel)xglmFlaxXGLMModel)xlm-robertaFlaxXLMRobertaModel))r   FlaxAlbertForPreTrainingr    FlaxBartForConditionalGeneration)r   FlaxBertForPreTraining)r   FlaxBigBirdForPreTraining)r!   FlaxElectraForPreTrainingr.   "FlaxLongT5ForConditionalGenerationr2   !FlaxMBartForConditionalGenerationr6   FlaxMT5ForConditionalGenerationr@   FlaxRobertaForMaskedLMrB   "FlaxRobertaPreLayerNormForMaskedLMrD   FlaxRoFormerForMaskedLMrF   FlaxT5ForConditionalGeneration)rK   FlaxWav2Vec2ForPreTrainingrM   #FlaxWhisperForConditionalGenerationrQ   FlaxXLMRobertaForMaskedLM))r   FlaxAlbertForMaskedLMrT   )r   FlaxBertForMaskedLM)r   FlaxBigBirdForMaskedLM)r   FlaxDistilBertForMaskedLM)r!   FlaxElectraForMaskedLMr[   r_   ra   rc   rj   )
rT   )r   &FlaxBlenderbotForConditionalGeneration)r   +FlaxBlenderbotSmallForConditionalGeneration)zencoder-decoderFlaxEncoderDecoderModelrY   )r0   FlaxMarianMTModelr[   r]   )r:   #FlaxPegasusForConditionalGenerationre   ))r   FlaxBeitForImageClassification)r    FlaxDinov2ForImageClassification)r<    FlaxRegNetForImageClassification)r>    FlaxResNetForImageClassification)rI   FlaxViTForImageClassification)zvision-encoder-decoderFlaxVisionEncoderDecoderModel))r   FlaxBartForCausalLM)r   FlaxBertForCausalLM)r   FlaxBigBirdForCausalLM)r   FlaxBloomForCausalLM)r!   FlaxElectraForCausalLM)r#   FlaxGemmaForCausalLM)r%   FlaxGPT2LMHeadModel)r'   r   )r(   FlaxGPTNeoForCausalLM)r*   FlaxGPTJForCausalLM)r,   FlaxLlamaForCausalLM)r4   FlaxMistralForCausalLM)r8   FlaxOPTForCausalLM)r@   FlaxRobertaForCausalLM)rB   "FlaxRobertaPreLayerNormForCausalLM)rO   FlaxXGLMForCausalLM)rQ   FlaxXLMRobertaForCausalLM))r   #FlaxAlbertForSequenceClassification)r   !FlaxBartForSequenceClassification)r   !FlaxBertForSequenceClassification)r   $FlaxBigBirdForSequenceClassification)r   'FlaxDistilBertForSequenceClassification)r!   $FlaxElectraForSequenceClassification)r2   "FlaxMBartForSequenceClassification)r@   $FlaxRobertaForSequenceClassification)rB   0FlaxRobertaPreLayerNormForSequenceClassification)rD   %FlaxRoFormerForSequenceClassification)rQ   'FlaxXLMRobertaForSequenceClassification))r   FlaxAlbertForQuestionAnswering)r   FlaxBartForQuestionAnswering)r   FlaxBertForQuestionAnswering)r   FlaxBigBirdForQuestionAnswering)r   "FlaxDistilBertForQuestionAnswering)r!   FlaxElectraForQuestionAnswering)r2   FlaxMBartForQuestionAnswering)r@   FlaxRobertaForQuestionAnswering)rB   +FlaxRobertaPreLayerNormForQuestionAnswering)rD    FlaxRoFormerForQuestionAnswering)rQ   "FlaxXLMRobertaForQuestionAnswering)	)r    FlaxAlbertForTokenClassification)r   FlaxBertForTokenClassification)r   !FlaxBigBirdForTokenClassification)r   $FlaxDistilBertForTokenClassification)r!   !FlaxElectraForTokenClassification)r@   !FlaxRobertaForTokenClassification)rB   -FlaxRobertaPreLayerNormForTokenClassification)rD   "FlaxRoFormerForTokenClassification)rQ   $FlaxXLMRobertaForTokenClassification)	)r   FlaxAlbertForMultipleChoice)r   FlaxBertForMultipleChoice)r   FlaxBigBirdForMultipleChoice)r   FlaxDistilBertForMultipleChoice)r!   FlaxElectraForMultipleChoice)r@   FlaxRobertaForMultipleChoice)rB   (FlaxRobertaPreLayerNormForMultipleChoice)rD   FlaxRoFormerForMultipleChoice)rQ   FlaxXLMRobertaForMultipleChoice)r   !FlaxBertForNextSentencePrediction)zspeech-encoder-decoderFlaxSpeechEncoderDecoderModelrh   )rM   !FlaxWhisperForAudioClassificationc                       e Zd ZeZy)FlaxAutoModelN)__name__
__module____qualname__FLAX_MODEL_MAPPING_model_mapping     ^/var/www/html/venv/lib/python3.12/site-packages/transformers/models/auto/modeling_flax_auto.pyr   r     s    'Nr   r   c                       e Zd ZeZy)FlaxAutoModelForPreTrainingN)r   r   r   "FLAX_MODEL_FOR_PRETRAINING_MAPPINGr   r   r   r   r   r      s    7Nr   r   pretraining)head_docc                       e Zd ZeZy)FlaxAutoModelForCausalLMN)r   r   r    FLAX_MODEL_FOR_CAUSAL_LM_MAPPINGr   r   r   r   r   r   '      5Nr   r   zcausal language modelingc                       e Zd ZeZy)FlaxAutoModelForMaskedLMN)r   r   r    FLAX_MODEL_FOR_MASKED_LM_MAPPINGr   r   r   r   r   r   .  r   r   r   zmasked language modelingc                       e Zd ZeZy)FlaxAutoModelForSeq2SeqLMN)r   r   r   +FLAX_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPINGr   r   r   r   r   r   5      @Nr   r   z&sequence-to-sequence language modelingzgoogle-t5/t5-base)r   checkpoint_for_examplec                       e Zd ZeZy)&FlaxAutoModelForSequenceClassificationN)r   r   r   .FLAX_MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPINGr   r   r   r   r   r   @  s    CNr   r   zsequence classificationc                       e Zd ZeZy)!FlaxAutoModelForQuestionAnsweringN)r   r   r   )FLAX_MODEL_FOR_QUESTION_ANSWERING_MAPPINGr   r   r   r   r   r   I  s    >Nr   r   zquestion answeringc                       e Zd ZeZy)#FlaxAutoModelForTokenClassificationN)r   r   r   +FLAX_MODEL_FOR_TOKEN_CLASSIFICATION_MAPPINGr   r   r   r   r   r   P  r   r   r   ztoken classificationc                       e Zd ZeZy)FlaxAutoModelForMultipleChoiceN)r   r   r   &FLAX_MODEL_FOR_MULTIPLE_CHOICE_MAPPINGr   r   r   r   r   r   Y  s    ;Nr   r   zmultiple choicec                       e Zd ZeZy)&FlaxAutoModelForNextSentencePredictionN)r   r   r   /FLAX_MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPINGr   r   r   r   r   r   `  s    DNr   r   znext sentence predictionc                       e Zd ZeZy)#FlaxAutoModelForImageClassificationN)r   r   r   +FLAX_MODEL_FOR_IMAGE_CLASSIFICATION_MAPPINGr   r   r   r   r   r   i  r   r   r   zimage classificationc                       e Zd ZeZy)FlaxAutoModelForVision2SeqN)r   r   r   #FLAX_MODEL_FOR_VISION_2_SEQ_MAPPINGr   r   r   r   r   r   r  s    8Nr   r   zvision-to-text modelingc                       e Zd ZeZy)FlaxAutoModelForSpeechSeq2SeqN)r   r   r   'FLAX_MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPINGr   r   r   r   r   r   y  s    <Nr   r   z,sequence-to-sequence speech-to-text modelingN)7__doc__collectionsr   utilsr   auto_factoryr   r   r	   configuration_autor
   
get_loggerr   loggerFLAX_MODEL_MAPPING_NAMES(FLAX_MODEL_FOR_PRETRAINING_MAPPING_NAMES&FLAX_MODEL_FOR_MASKED_LM_MAPPING_NAMES1FLAX_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMES1FLAX_MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING_NAMES)FLAX_MODEL_FOR_VISION_2_SEQ_MAPPING_NAMES&FLAX_MODEL_FOR_CAUSAL_LM_MAPPING_NAMES4FLAX_MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING_NAMES/FLAX_MODEL_FOR_QUESTION_ANSWERING_MAPPING_NAMES1FLAX_MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING_NAMES,FLAX_MODEL_FOR_MULTIPLE_CHOICE_MAPPING_NAMES5FLAX_MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPING_NAMES-FLAX_MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMES1FLAX_MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING_NAMESr   r   r   r   r   r   r   r   r   r   r   r   r   +FLAX_MODEL_FOR_AUDIO_CLASSIFICATION_MAPPINGr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   <module>r      s    #  R R 4 
		H	% '') V ,7, (* *5* &" 5@5 1  5@	5 1 -8C- ) *5* &. 8C8 4" 3>3 /" 5@5 1 0;0 , 9D59 5 1<C:1 - 5@85 1 &&:<TU %56JLt%u "#34HJp#q  .>K/ + /?K/ + '77KMv&w ##34HJp#q  1AN2 . -=I- ) /?K/ + *:F* & 3CO3 / +;G+ ' /?K/ +
(' ( "-08"5 8 00KVcd 62 6 --EPjk 62 6 --EPjk A 3 A .5. D-@ D *;*5N* &
?(; ? %66Wbv$w !A*= A '8'2H' #
<%8 < "33Q\m!n E-@ E *;*5O* &
A*= A '8'2H' #
9!4 9 //ITmn =$7 = !2!,Z! r   