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


UpperCAmelCase					      =							logging.get_logger(__name__)

UpperCAmelCase					      =							{
    "unc-nlp/lxmert-base-uncased": "https://huggingface.co/unc-nlp/lxmert-base-uncased/resolve/main/config.json",
}



class        snake_case__							(					lowercase_				):
   _SCREAMING_SNAKE_CASE						:			List[str]         =   "lxmert"
   _SCREAMING_SNAKE_CASE						:			List[Any]         =   {}



   def __init__(					self : List[Any]      ,						A__ : int=3_05_22      ,						A__ : Tuple=7_68      ,						A__ : str=12      ,						A__ : Union[str, Any]=95_00      ,						A__ : List[str]=16_00      ,						A__ : Dict=4_00      ,						A__ : List[Any]=30_72      ,						A__ : str="gelu"      ,						A__ : Optional[Any]=0.1      ,						A__ : Optional[int]=0.1      ,						A__ : Any=5_12      ,						A__ : Union[str, Any]=2      ,						A__ : List[Any]=0.02      ,						A__ : List[str]=1E-12      ,						A__ : Dict=9      ,						A__ : Optional[int]=5      ,						A__ : Optional[int]=5      ,						A__ : Optional[Any]=20_48      ,						A__ : Dict=4      ,						A__ : Dict=6.67      ,						A__ : Optional[Any]=True      ,						A__ : List[Any]=True      ,						A__ : Optional[Any]=True      ,						A__ : List[Any]=True      ,						A__ : Union[str, Any]=True      ,						A__ : List[Any]=True      ,						A__ : Union[str, Any]=True      ,						**A__ : Tuple      ,						)				->  str:




         '''simple docstring'''




         snake_case_  :      int  	=							vocab_size
         snake_case_  :      int  	=							hidden_size
         snake_case_  :      Union[str, Any]  	=							num_attention_heads
         snake_case_  :      Any  	=							hidden_act
         snake_case_  :      List[Any]  	=							intermediate_size
         snake_case_  :      Optional[Any]  	=							hidden_dropout_prob
         snake_case_  :      List[str]  	=							attention_probs_dropout_prob
         snake_case_  :      int  	=							max_position_embeddings
         snake_case_  :      Optional[int]  	=							type_vocab_size
         snake_case_  :      str  	=							initializer_range
         snake_case_  :      List[Any]  	=							layer_norm_eps
         snake_case_  :      Dict  	=							num_qa_labels
         snake_case_  :      Optional[Any]  	=							num_object_labels
         snake_case_  :      Optional[int]  	=							num_attr_labels
         snake_case_  :      Dict  	=							l_layers
         snake_case_  :      int  	=							x_layers
         snake_case_  :      List[str]  	=							r_layers
         snake_case_  :      str  	=							visual_feat_dim
         snake_case_  :      Dict  	=							visual_pos_dim
         snake_case_  :      List[str]  	=							visual_loss_normalizer
         snake_case_  :      Union[str, Any]  	=							task_matched
         snake_case_  :      int  	=							task_mask_lm
         snake_case_  :      Dict  	=							task_obj_predict
         snake_case_  :      Any  	=							task_qa
         snake_case_  :      Union[str, Any]  	=							visual_obj_loss
         snake_case_  :      Dict  	=							visual_attr_loss
         snake_case_  :      List[Any]  	=							visual_feat_loss
         snake_case_  :      Optional[int]  	=							{"""vision""": r_layers, """cross_encoder""": x_layers, """language""": l_layers}
         super().__init__(**a__ )











from ...configuration_utils import PretrainedConfig


lowerCamelCase__       		=  {
    """google/tapas-base-finetuned-sqa""": (
        """https://huggingface.co/google/tapas-base-finetuned-sqa/resolve/main/config.json"""
    ),
    """google/tapas-base-finetuned-wtq""": (
        """https://huggingface.co/google/tapas-base-finetuned-wtq/resolve/main/config.json"""
    ),
    """google/tapas-base-finetuned-wikisql-supervised""": (
        """https://huggingface.co/google/tapas-base-finetuned-wikisql-supervised/resolve/main/config.json"""
    ),
    """google/tapas-base-finetuned-tabfact""": (
        """https://huggingface.co/google/tapas-base-finetuned-tabfact/resolve/main/config.json"""
    ),
}




class       snake_case__ (				lowercase_):

       '''simple docstring'''
       lowerCamelCase				:					Tuple								=			"tapas"



       def __init__(				self      ,    a__=3_05_22      ,    a__=7_68      ,    a__=12      ,    a__=12      ,    a__=30_72      ,    a__="gelu"      ,    a__=0.1      ,    a__=0.1      ,    a__=10_24      ,    a__=[3, 2_56, 2_56, 2, 2_56, 2_56, 10]      ,    a__=0.02      ,    a__=1e-12      ,    a__=0      ,    a__=10.0      ,    a__=0      ,    a__=1.0      ,    a__=None      ,    a__=1.0      ,    a__=False      ,    a__=None      ,    a__=1.0      ,    a__=1.0      ,    a__=False      ,    a__=False      ,    a__="ratio"      ,    a__=None      ,    a__=None      ,    a__=64      ,    a__=32      ,    a__=False      ,    a__=True      ,    a__=False      ,    a__=False      ,    a__=True      ,    a__=False      ,    a__=None      ,    a__=None      ,    **a__      ,    )			->   Any:






            '''simple docstring'''





            super().__init__(pad_token_id=a__      ,    **a__     )

            # BERT hyperparameters (with updated max_position_embeddings and type_vocab_sizes)
            __snake_case      :Optional[Any] 							=    vocab_size
            __snake_case      :Tuple 							=    hidden_size
            __snake_case      :Tuple 							=    num_hidden_layers
            __snake_case      :Any 							=    num_attention_heads
            __snake_case      :List[str] 							=    hidden_act
            __snake_case      :List[str] 							=    intermediate_size
            __snake_case      :int 							=    hidden_dropout_prob
            __snake_case      :List[Any] 							=    attention_probs_dropout_prob
            __snake_case      :Any 							=    max_position_embeddings
            __snake_case      :Optional[int] 							=    type_vocab_sizes
            __snake_case      :Tuple 							=    initializer_range
            __snake_case      :Any 							=    layer_norm_eps

            # Fine-tuning task hyperparameters
            __snake_case      :Optional[int] 							=    positive_label_weight
            __snake_case      :Optional[Any] 							=    num_aggregation_labels
            __snake_case      :Dict 							=    aggregation_loss_weight
            __snake_case      :str 							=    use_answer_as_supervision
            __snake_case      :int 							=    answer_loss_importance
            __snake_case      :List[Any] 							=    use_normalized_answer_loss
            __snake_case      :List[str] 							=    huber_loss_delta
            __snake_case      :Any 							=    temperature
            __snake_case      :Optional[int] 							=    aggregation_temperature
            __snake_case      :List[str] 							=    use_gumbel_for_cells
            __snake_case      :Optional[int] 							=    use_gumbel_for_aggregation
            __snake_case      :Optional[Any] 							=    average_approximation_function
            __snake_case      :Union[str, Any] 							=    cell_selection_preference
            __snake_case      :Tuple 							=    answer_loss_cutoff
            __snake_case      :Union[str, Any] 							=    max_num_rows
            __snake_case      :Optional[int] 							=    max_num_columns
            __snake_case      :str 							=    average_logits_per_cell
            __snake_case      :Union[str, Any] 							=    select_one_column
            __snake_case      :Optional[int] 							=    allow_empty_column_selection
            __snake_case      :Optional[Any] 							=    init_cell_selection_weights_to_zero
            __snake_case      :Tuple 							=    reset_position_index_per_cell
            __snake_case      :Any 							=    disable_per_token_loss

            # Aggregation hyperparameters
            __snake_case      :List[str] 							=    aggregation_labels
            __snake_case      :int 							=    no_aggregation_label_index

            if isinstance(self.aggregation_labels      ,    a__     ):
                 __snake_case      :Any 							=    {int(a__     ): v for k, v in aggregation_labels.items()}


