




import unittest

from transformers import AlbertConfig, is_torch_available
from transformers.models.auto import get_values
from transformers.testing_utils import require_torch, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
							import torch

							from transformers import (
							    MODEL_FOR_PRETRAINING_MAPPING,
							    AlbertForMaskedLM,
							    AlbertForMultipleChoice,
							    AlbertForPreTraining,
							    AlbertForQuestionAnswering,
							    AlbertForSequenceClassification,
							    AlbertForTokenClassification,
							    AlbertModel,
							)
							from transformers.models.albert.modeling_albert import ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST




class 		__A      :

						def __init__(		self   :Any    , __snake_case   :Union[str, Any]    , __snake_case   :Optional[Any]=13    , __snake_case   :Dict=7    , __snake_case   :int=True    , __snake_case   :List[Any]=True    , __snake_case   :Tuple=True    , __snake_case   :Any=True    , __snake_case   :Optional[Any]=99    , __snake_case   :str=16    , __snake_case   :Dict=36    , __snake_case   :Optional[Any]=6    , __snake_case   :Union[str, Any]=6    , __snake_case   :Tuple=6    , __snake_case   :str=37    , __snake_case   :int="gelu"    , __snake_case   :Dict=0.1    , __snake_case   :List[Any]=0.1    , __snake_case   :Union[str, Any]=5_12    , __snake_case   :int=16    , __snake_case   :Optional[Any]=2    , __snake_case   :int=0.02    , __snake_case   :List[Any]=3    , __snake_case   :Any=4    , __snake_case   :Dict=None    , ):
										'''simple docstring'''

										__magic_name__	:	Optional[int]								=parent
										__magic_name__	:	str								=batch_size
										__magic_name__	:	Dict								=seq_length
										__magic_name__	:	List[Any]								=is_training
										__magic_name__	:	Union[str, Any]								=use_input_mask
										__magic_name__	:	Tuple								=use_token_type_ids
										__magic_name__	:	Any								=use_labels
										__magic_name__	:	List[str]								=vocab_size
										__magic_name__	:	Any								=embedding_size
										__magic_name__	:	int								=hidden_size
										__magic_name__	:	Tuple								=num_hidden_layers
										__magic_name__	:	Optional[int]								=num_hidden_groups
										__magic_name__	:	Dict								=num_attention_heads
										__magic_name__	:	List[Any]								=intermediate_size
										__magic_name__	:	str								=hidden_act
										__magic_name__	:	Any								=hidden_dropout_prob
										__magic_name__	:	List[str]								=attention_probs_dropout_prob
										__magic_name__	:	Optional[Any]								=max_position_embeddings
										__magic_name__	:	Dict								=type_vocab_size
										__magic_name__	:	int								=type_sequence_label_size
										__magic_name__	:	str								=initializer_range
										__magic_name__	:	Optional[int]								=num_labels
										__magic_name__	:	int								=num_choices
										__magic_name__	:	Optional[Any]								=scope

						def     A__						(		self   :Any ):
										'''simple docstring'''

										__magic_name__	:	Tuple								=ids_tensor([self.batch_size, self.seq_length]    , self.vocab_size )

										__magic_name__	:	Any								=None
										if self.use_input_mask:
														__magic_name__	:	Tuple								=random_attention_mask([self.batch_size, self.seq_length] )

										__magic_name__	:	Dict								=None
										if self.use_token_type_ids:
														__magic_name__	:	Any								=ids_tensor([self.batch_size, self.seq_length]    , self.type_vocab_size )

										__magic_name__	:	Dict								=None
										__magic_name__	:	str								=None
										__magic_name__	:	int								=None
										if self.use_labels:
														__magic_name__	:	Optional[int]								=ids_tensor([self.batch_size]    , self.type_sequence_label_size )
														__magic_name__	:	Union[str, Any]								=ids_tensor([self.batch_size, self.seq_length]    , self.num_labels )
														__magic_name__	:	int								=ids_tensor([self.batch_size]    , self.num_choices )

										__magic_name__	:	List[str]								=self.get_config()

										return config, input_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels

						def     A__						(		self   :List[Any] ):
										'''simple docstring'''

										return AlbertConfig(
										    vocab_size=self.vocab_size    , hidden_size=self.hidden_size    , num_hidden_layers=self.num_hidden_layers    , num_attention_heads=self.num_attention_heads    , intermediate_size=self.intermediate_size    , hidden_act=self.hidden_act    , hidden_dropout_prob=self.hidden_dropout_prob    , attention_probs_dropout_prob=self.attention_probs_dropout_prob    , max_position_embeddings=self.max_position_embeddings    , type_vocab_size=self.type_vocab_size    , initializer_range=self.initializer_range    , num_hidden_groups=self.num_hidden_groups    , )

						def     A__						(		self   :Union[str, Any]    , __snake_case   :List[Any]    , __snake_case   :Dict    , __snake_case   :Any    , __snake_case   :str    , __snake_case   :Tuple    , __snake_case   :Union[str, Any]    , __snake_case   :Union[str, Any] ):
										'''simple docstring'''

										__magic_name__	:	int								=AlbertModel(config=__snake_case )
										model.to(__snake_case )
										model.eval()
										__magic_name__	:	Dict								=model(__snake_case    , attention_mask=__snake_case    , token_type_ids=__snake_case )
										__magic_name__	:	str								=model(__snake_case    , token_type_ids=__snake_case )
										__magic_name__	:	int								=model(__snake_case )
										self.parent.assertEqual(result.last_hidden_state.shape    , (self.batch_size, self.seq_length, self.hidden_size) )
										self.parent.assertEqual(result.pooler_output.shape    , (self.batch_size, self.hidden_size) )

						def     A__						(		self   :Any    , __snake_case   :Any    , __snake_case   :List[str]    , __snake_case   :Optional[Any]    , __snake_case   :List[Any]    , __snake_case   :Tuple    , __snake_case   :Tuple    , __snake_case   :Tuple ):
										'''simple docstring'''

										__magic_name__	:	Dict								=AlbertForPreTraining(config=__snake_case )
										model.to(__snake_case )
										model.eval()
										__magic_name__	:	Dict								=model(
										    __snake_case    , attention_mask=__snake_case    , token_type_ids=__snake_case    , labels=__snake_case    , sentence_order_label=__snake_case    , )
										self.parent.assertEqual(result.prediction_logits.shape    , (self.batch_size, self.seq_length, self.vocab_size) )
										self.parent.assertEqual(result.sop_logits.shape    , (self.batch_size, config.num_labels) )

						def     A__						(		self   :List[str]    , __snake_case   :Union[str, Any]    , __snake_case   :Optional[Any]    , __snake_case   :Optional[int]    , __snake_case   :Optional[Any]    , __snake_case   :str    , __snake_case   :Tuple    , __snake_case   :Optional[int] ):
										'''simple docstring'''

										__magic_name__	:	Optional[int]								=AlbertForMaskedLM(config=__snake_case )
										model.to(__snake_case )
										model.eval()
										__magic_name__	:	List[Any]								=model(__snake_case    , attention_mask=__snake_case    , token_type_ids=__snake_case    , labels=__snake_case )
										self.parent.assertEqual(result.logits.shape    , (self.batch_size, self.seq_length, self.vocab_size) )

						def     A__						(		self   :Optional[int]    , __snake_case   :Any    , __snake_case   :Tuple    , __snake_case   :Optional[int]    , __snake_case   :Optional[int]    , __snake_case   :Dict    , __snake_case   :str    , __snake_case   :List[str] ):
										'''simple docstring'''

										__magic_name__	:	Dict								=AlbertForQuestionAnswering(config=__snake_case )
										model.to(__snake_case )
										model.eval()
										__magic_name__	:	Optional[Any]								=model(
										    __snake_case    , attention_mask=__snake_case    , token_type_ids=__snake_case    , start_positions=__snake_case    , end_positions=__snake_case    , )
										self.parent.assertEqual(result.start_logits.shape    , (self.batch_size, self.seq_length) )
										self.parent.assertEqual(result.end_logits.shape    , (self.batch_size, self.seq_length) )

						def     A__						(		self   :Union[str, Any]    , __snake_case   :Optional[Any]    , __snake_case   :int    , __snake_case   :List[Any]    , __snake_case   :List[str]    , __snake_case   :List[Any]    , __snake_case   :Optional[int]    , __snake_case   :Dict ):
										'''simple docstring'''

										__magic_name__	:	Optional[Any]								=self.num_labels
										__magic_name__	:	int								=AlbertForSequenceClassification(__snake_case )
										model.to(__snake_case )
										model.eval()
										__magic_name__	:	Optional[Any]								=model(__snake_case    , attention_mask=__snake_case    , token_type_ids=__snake_case    , labels=__snake_case )
										self.parent.assertEqual(result.logits.shape    , (self.batch_size, self.num_labels) )

						def     A__						(		self   :List[str]    , __snake_case   :Any    , __snake_case   :Any    , __snake_case   :int    , __snake_case   :Any    , __snake_case   :Dict    , __snake_case   :List[str]    , __snake_case   :str ):
										'''simple docstring'''

										__magic_name__	:	Tuple								=self.num_labels
										__magic_name__	:	Tuple								=AlbertForTokenClassification(config=__snake_case )
										model.to(__snake_case )
										model.eval()
										__magic_name__	:	List[Any]								=model(__snake_case    , attention_mask=__snake_case    , token_type_ids=__snake_case    , labels=__snake_case )
										self.parent.assertEqual(result.logits.shape    , (self.batch_size, self.seq_length, self.num_labels) )

						def     A__						(		self   :Optional[int]    , __snake_case   :List[str]    , __snake_case   :Optional[Any]    , __snake_case   :Union[str, Any]    , __snake_case   :Tuple    , __snake_case   :int    , __snake_case   :int    , __snake_case   :Union[str, Any] ):
										'''simple docstring'''

										__magic_name__	:	Union[str, Any]								=self.num_choices
										__magic_name__	:	Optional[int]								=AlbertForMultipleChoice(config=__snake_case )
										model.to(__snake_case )
										model.eval()
										__magic_name__	:	Optional[int]								=input_ids.unsqueeze(1 ).expand(-1    , self.num_choices    , -1 ).contiguous()
										__magic_name__	:	Optional[Any]								=token_type_ids.unsqueeze(1 ).expand(-1    , self.num_choices    , -1 ).contiguous()
										__magic_name__	:	List[Any]								=input_mask.unsqueeze(1 ).expand(-1    , self.num_choices    , -1 ).contiguous()
										__magic_name__	:	Dict								=model(
										    __snake_case    , attention_mask=__snake_case    , token_type_ids=__snake_case    , labels=__snake_case    , )
										self.parent.assertEqual(result.logits.shape    , (self.batch_size, self.num_choices) )


						def     A__						(		self   :int ):
										'''simple docstring'''

										__magic_name__	:	Any								=self.prepare_config_and_inputs()
										(
										    (
										    __magic_name__
										)				, (
										    __magic_name__
										)				, (
										    __magic_name__
										)				, (
										    __magic_name__
										)				, (
										    __magic_name__
										)				, (
										    __magic_name__
										)				, (
										    __magic_name__
										)				, 
										)	:	List[Any]								=config_and_inputs
										__magic_name__	:	Optional[int]								={"""input_ids""": input_ids, """token_type_ids""": token_type_ids, """attention_mask""": input_mask}
										return config, inputs_dict




@require_torch
class 		__A      (			UpperCamelCase__					,						UpperCamelCase__					,						unittest.TestCase			):
						UpperCamelCase     						=					(
						    (
						        AlbertModel,
						        AlbertForPreTraining,
						        AlbertForMaskedLM,
						        AlbertForMultipleChoice,
						        AlbertForSequenceClassification,
						        AlbertForTokenClassification,
						        AlbertForQuestionAnswering,
						    )
						    if is_torch_available()
						    else ()
						)
						UpperCamelCase     						=					(
						    {
						        """feature-extraction""": AlbertModel,
						        """fill-mask""": AlbertForMaskedLM,
						        """question-answering""": AlbertForQuestionAnswering,
						        """text-classification""": AlbertForSequenceClassification,
						        """token-classification""": AlbertForTokenClassification,
						        """zero-shot""": AlbertForSequenceClassification,
						    }
						    if is_torch_available()
						    else {}
						)
						UpperCamelCase     						=					True

						def     A__						(		self   :Union[str, Any]    , __snake_case   :Dict    , __snake_case   :List[Any]    , __snake_case   :List[Any]=False ):
										'''simple docstring'''

										__magic_name__	:	List[Any]								=super()._prepare_for_class(__snake_case    , __snake_case    , return_labels=__snake_case )

										if return_labels:
														if model_class in get_values(__snake_case ):
																		__magic_name__	:	Optional[int]								=torch.zeros(
																		    (self.model_tester.batch_size, self.model_tester.seq_length)    , dtype=torch.long    , device=__snake_case )
																		__magic_name__	:	str								=torch.zeros(
																		    self.model_tester.batch_size    , dtype=torch.long    , device=__snake_case )
										return inputs_dict

						def     A__						(		self   :Optional[int] ):
										'''simple docstring'''

										__magic_name__	:	List[str]								=AlbertModelTester(self )
										__magic_name__	:	Tuple								=ConfigTester(self    , config_class=__snake_case    , hidden_size=37 )

						def     A__						(		self   :int ):
										'''simple docstring'''

										self.config_tester.run_common_tests()

						def     A__						(		self   :Tuple ):
										'''simple docstring'''

										__magic_name__	:	int								=self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_model(*__snake_case )

						def     A__						(		self   :Any ):
										'''simple docstring'''

										__magic_name__	:	List[str]								=self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_for_pretraining(*__snake_case )

						def     A__						(		self   :Dict ):
										'''simple docstring'''

										__magic_name__	:	int								=self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_for_masked_lm(*__snake_case )

						def     A__						(		self   :int ):
										'''simple docstring'''

										__magic_name__	:	Any								=self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_for_multiple_choice(*__snake_case )

						def     A__						(		self   :Tuple ):
										'''simple docstring'''

										__magic_name__	:	List[str]								=self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_for_question_answering(*__snake_case )

						def     A__						(		self   :int ):
										'''simple docstring'''

										__magic_name__	:	List[Any]								=self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_for_sequence_classification(*__snake_case )

						def     A__						(		self   :str ):
										'''simple docstring'''

										__magic_name__	:	Tuple								=self.model_tester.prepare_config_and_inputs()
										for type in ["absolute", "relative_key", "relative_key_query"]:
														__magic_name__	:	List[Any]								=type
														self.model_tester.create_and_check_model(*__snake_case )


						@slow
						def     A__						(		self   :List[str] ):
										'''simple docstring'''

										for model_name in ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
														__magic_name__	:	Tuple								=AlbertModel.from_pretrained(__snake_case )
														self.assertIsNotNone(__snake_case )




@require_torch
class 		__A      (			unittest.TestCase			):

						@slow
						def     A__						(		self   :int ):
										'''simple docstring'''

										__magic_name__	:	List[str]								=AlbertModel.from_pretrained("""albert-base-v2""" )
										__magic_name__	:	Any								=torch.tensor([[0, 3_45, 2_32, 3_28, 7_40, 1_40, 16_95, 69, 60_78, 15_88, 2]] )
										__magic_name__	:	Optional[int]								=torch.tensor([[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]] )
										with torch.no_grad():
														__magic_name__	:	Union[str, Any]								=model(__snake_case    , attention_mask=__snake_case )[0]
										__magic_name__	:	int								=torch.Size((1, 11, 7_68) )
										self.assertEqual(output.shape    , __snake_case )
										__magic_name__	:	List[Any]								=torch.tensor(
										    [[[-0.6513, 1.5035, -0.2766], [-0.6515, 1.5046, -0.2780], [-0.6512, 1.5049, -0.2784]]] )

										self.assertTrue(torch.allclose(output[:, 1:4, 1:4]    , __snake_case    , atol=1E-4 ) )










import copy
import os
from typing import Union

from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase_		:				Union[str, Any]									=     logging.get_logger(__name__)

UpperCAmelCase_		:				Dict									=     {
    "google/pix2struct-textcaps-base": (
        "https://huggingface.co/google/pix2struct-textcaps-base/resolve/main/config.json"
    ),
}




class 		__A      (			UpperCamelCase__			):
						UpperCamelCase     						=					"""pix2struct_text_model"""
						UpperCamelCase     						=					["""past_key_values"""]
						UpperCamelCase     						=					{
						    """hidden_size""": """hidden_size""",
						    """num_attention_heads""": """num_heads""",
						    """num_hidden_layers""": """num_layers""",
						}

						def __init__(		self   :List[Any]    , __snake_case   :Dict=5_02_44    , __snake_case   :Dict=7_68    , __snake_case   :Union[str, Any]=64    , __snake_case   :Union[str, Any]=20_48    , __snake_case   :List[Any]=12    , __snake_case   :Any=12    , __snake_case   :str=32    , __snake_case   :Dict=1_28    , __snake_case   :Optional[int]=0.1    , __snake_case   :Any=1E-6    , __snake_case   :Optional[int]=1.0    , __snake_case   :List[Any]="gelu_new"    , __snake_case   :Any=0    , __snake_case   :Tuple=False    , __snake_case   :Any=0    , __snake_case   :int=1    , __snake_case   :Dict=False    , __snake_case   :Optional[Any]=True    , **__snake_case   :Dict    , ):
										'''simple docstring'''

										__magic_name__	:	List[str]								=vocab_size
										__magic_name__	:	List[str]								=hidden_size
										__magic_name__	:	Optional[int]								=d_kv
										__magic_name__	:	Dict								=d_ff
										__magic_name__	:	Tuple								=num_layers
										__magic_name__	:	str								=num_heads
										__magic_name__	:	Optional[Any]								=relative_attention_num_buckets
										__magic_name__	:	List[Any]								=relative_attention_max_distance
										__magic_name__	:	str								=dropout_rate
										__magic_name__	:	Optional[Any]								=layer_norm_epsilon
										__magic_name__	:	Union[str, Any]								=initializer_factor
										__magic_name__	:	Tuple								=use_cache

										__magic_name__	:	Any								=eos_token_id
										__magic_name__	:	int								=decoder_start_token_id

										# for backwards compatibility
										__magic_name__	:	Union[str, Any]								=dense_act_fn

										super().__init__(
										    pad_token_id=__snake_case    , eos_token_id=__snake_case    , decoder_start_token_id=__snake_case    , tie_word_embeddings=__snake_case    , is_decoder=__snake_case    , **__snake_case    , )


						@classmethod
						def     A__						(		cls   :Union[str, Any]    , __snake_case   :Union[str, os.PathLike]    , **__snake_case   :Any ):
										'''simple docstring'''

										cls._set_token_in_kwargs(__snake_case )

										__magic_name__				, __magic_name__	:	Optional[Any]								=cls.get_config_dict(__snake_case    , **__snake_case )

										# get the text config dict if we are loading from Pix2StructConfig
										if config_dict.get("""model_type""" ) == "pix2struct":
														__magic_name__	:	Tuple								=config_dict["""text_config"""]

										if "model_type" in config_dict and hasattr(cls    , """model_type""" ) and config_dict["model_type"] != cls.model_type:
														logger.warning(
														    f"You are using a model of type {config_dict['model_type']} to instantiate a model of type "
														    f"{cls.model_type}. This is not supported for all configurations of models and can yield errors." )

										return cls.from_dict(__snake_case    , **__snake_case )




class 		__A      (			UpperCamelCase__			):
						UpperCamelCase     						=					"""pix2struct_vision_model"""

						def __init__(		self   :Union[str, Any]    , __snake_case   :Tuple=7_68    , __snake_case   :Any=7_68    , __snake_case   :Tuple=20_48    , __snake_case   :Dict=64    , __snake_case   :List[str]=12    , __snake_case   :str=12    , __snake_case   :str="gelu_new"    , __snake_case   :Optional[int]=1E-6    , __snake_case   :Optional[int]=0.0    , __snake_case   :Any=0.0    , __snake_case   :Any=1E-10    , __snake_case   :List[str]=1.0    , __snake_case   :Tuple=40_96    , __snake_case   :Optional[int]=32    , __snake_case   :Union[str, Any]=1_28    , **__snake_case   :Optional[int]    , ):
										'''simple docstring'''

										super().__init__(**__snake_case )

										__magic_name__	:	Union[str, Any]								=hidden_size
										__magic_name__	:	Dict								=patch_embed_hidden_size
										__magic_name__	:	Tuple								=d_ff
										__magic_name__	:	str								=dropout_rate
										__magic_name__	:	str								=num_hidden_layers
										__magic_name__	:	Dict								=num_attention_heads
										__magic_name__	:	List[str]								=initializer_range
										__magic_name__	:	Optional[int]								=initializer_factor
										__magic_name__	:	str								=attention_dropout
										__magic_name__	:	Union[str, Any]								=layer_norm_eps
										__magic_name__	:	List[str]								=dense_act_fn
										__magic_name__	:	List[str]								=seq_len
										__magic_name__	:	str								=relative_attention_num_buckets
										__magic_name__	:	Optional[int]								=relative_attention_max_distance
										__magic_name__	:	List[str]								=d_kv


						@classmethod
						def     A__						(		cls   :Optional[Any]    , __snake_case   :Union[str, os.PathLike]    , **__snake_case   :Any ):
										'''simple docstring'''

										cls._set_token_in_kwargs(__snake_case )

										__magic_name__				, __magic_name__	:	Optional[int]								=cls.get_config_dict(__snake_case    , **__snake_case )

										# get the vision config dict if we are loading from Pix2StructConfig
										if config_dict.get("""model_type""" ) == "pix2struct":
														__magic_name__	:	int								=config_dict["""vision_config"""]

										if "model_type" in config_dict and hasattr(cls    , """model_type""" ) and config_dict["model_type"] != cls.model_type:
														logger.warning(
														    f"You are using a model of type {config_dict['model_type']} to instantiate a model of type "
														    f"{cls.model_type}. This is not supported for all configurations of models and can yield errors." )

										return cls.from_dict(__snake_case    , **__snake_case )




class 		__A      (			UpperCamelCase__			):
						UpperCamelCase     						=					"""pix2struct"""
						UpperCamelCase     						=					True

						def __init__(		self   :Union[str, Any]    , __snake_case   :Optional[int]=None    , __snake_case   :List[Any]=None    , __snake_case   :Optional[Any]=1.0    , __snake_case   :Tuple=0.02    , __snake_case   :str=False    , __snake_case   :List[str]=False    , __snake_case   :str=True    , **__snake_case   :List[str]    , ):
										'''simple docstring'''

										super().__init__(tie_word_embeddings=__snake_case    , is_encoder_decoder=__snake_case    , **__snake_case )

										if text_config is None:
														__magic_name__	:	int								={}
														logger.info("""text_config is None. Initializing the Pix2StructTextConfig with default values.""" )

										if vision_config is None:
														__magic_name__	:	str								={}
														logger.info("""vision_config is None. Initializing the Pix2StructVisionConfig with default values.""" )

										__magic_name__	:	Union[str, Any]								=PixaStructTextConfig(**__snake_case )
										__magic_name__	:	str								=PixaStructVisionConfig(**__snake_case )

										__magic_name__	:	int								=self.text_config.decoder_start_token_id
										__magic_name__	:	Optional[Any]								=self.text_config.pad_token_id
										__magic_name__	:	str								=self.text_config.eos_token_id

										__magic_name__	:	int								=initializer_factor
										__magic_name__	:	List[Any]								=initializer_range

										__magic_name__	:	Dict								=self.initializer_range
										__magic_name__	:	Union[str, Any]								=self.initializer_range

										__magic_name__	:	Tuple								=is_vqa

						@classmethod
						def     A__						(		cls   :Optional[int]    , __snake_case   :PixaStructTextConfig    , __snake_case   :PixaStructVisionConfig    , **__snake_case   :List[str] ):
										'''simple docstring'''

										return cls(text_config=text_config.to_dict()    , vision_config=vision_config.to_dict()    , **__snake_case )


						def     A__						(		self   :Dict ):
										'''simple docstring'''

										__magic_name__	:	Union[str, Any]								=copy.deepcopy(self.__dict__ )
										__magic_name__	:	Any								=self.text_config.to_dict()
										__magic_name__	:	List[str]								=self.vision_config.to_dict()
										__magic_name__	:	Optional[int]								=self.__class__.model_type
										return output




