





from ...configuration_utils import PretrainedConfig


A_												=     {
    "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 SCREAMING_SNAKE_CASE_ (					lowercase_   ):





					"""simple docstring"""


					A__				 =    "tapas"





					def __init__( self	,  _lowerCAmelCase=3_0522	,  _lowerCAmelCase=768	,  _lowerCAmelCase=12	,  _lowerCAmelCase=12	,  _lowerCAmelCase=3072	,  _lowerCAmelCase="gelu"	,  _lowerCAmelCase=0.1	,  _lowerCAmelCase=0.1	,  _lowerCAmelCase=1024	,  _lowerCAmelCase=[3, 256, 256, 2, 256, 256, 10]	,  _lowerCAmelCase=0.02	,  _lowerCAmelCase=1E-12	,  _lowerCAmelCase=0	,  _lowerCAmelCase=10.0	,  _lowerCAmelCase=0	,  _lowerCAmelCase=1.0	,  _lowerCAmelCase=None	,  _lowerCAmelCase=1.0	,  _lowerCAmelCase=False	,  _lowerCAmelCase=None	,  _lowerCAmelCase=1.0	,  _lowerCAmelCase=1.0	,  _lowerCAmelCase=False	,  _lowerCAmelCase=False	,  _lowerCAmelCase="ratio"	,  _lowerCAmelCase=None	,  _lowerCAmelCase=None	,  _lowerCAmelCase=64	,  _lowerCAmelCase=32	,  _lowerCAmelCase=False	,  _lowerCAmelCase=True	,  _lowerCAmelCase=False	,  _lowerCAmelCase=False	,  _lowerCAmelCase=True	,  _lowerCAmelCase=False	,  _lowerCAmelCase=None	,  _lowerCAmelCase=None	,  **_lowerCAmelCase	,  ):
										super().__init__(pad_token_id=_lowerCAmelCase	,  **_lowerCAmelCase	)

										# BERT hyperparameters (with updated max_position_embeddings and type_vocab_sizes)
										lowerCamelCase__       =       vocab_size
										lowerCamelCase__       =       hidden_size
										lowerCamelCase__       =       num_hidden_layers
										lowerCamelCase__       =       num_attention_heads
										lowerCamelCase__       =       hidden_act
										lowerCamelCase__       =       intermediate_size
										lowerCamelCase__       =       hidden_dropout_prob
										lowerCamelCase__       =       attention_probs_dropout_prob
										lowerCamelCase__       =       max_position_embeddings
										lowerCamelCase__       =       type_vocab_sizes
										lowerCamelCase__       =       initializer_range
										lowerCamelCase__       =       layer_norm_eps

										# Fine-tuning task hyperparameters
										lowerCamelCase__       =       positive_label_weight
										lowerCamelCase__       =       num_aggregation_labels
										lowerCamelCase__       =       aggregation_loss_weight
										lowerCamelCase__       =       use_answer_as_supervision
										lowerCamelCase__       =       answer_loss_importance
										lowerCamelCase__       =       use_normalized_answer_loss
										lowerCamelCase__       =       huber_loss_delta
										lowerCamelCase__       =       temperature
										lowerCamelCase__       =       aggregation_temperature
										lowerCamelCase__       =       use_gumbel_for_cells
										lowerCamelCase__       =       use_gumbel_for_aggregation
										lowerCamelCase__       =       average_approximation_function
										lowerCamelCase__       =       cell_selection_preference
										lowerCamelCase__       =       answer_loss_cutoff
										lowerCamelCase__       =       max_num_rows
										lowerCamelCase__       =       max_num_columns
										lowerCamelCase__       =       average_logits_per_cell
										lowerCamelCase__       =       select_one_column
										lowerCamelCase__       =       allow_empty_column_selection
										lowerCamelCase__       =       init_cell_selection_weights_to_zero
										lowerCamelCase__       =       reset_position_index_per_cell
										lowerCamelCase__       =       disable_per_token_loss

										# Aggregation hyperparameters
										lowerCamelCase__       =       aggregation_labels
										lowerCamelCase__       =       no_aggregation_label_index

										if isinstance(self.aggregation_labels	,  _lowerCAmelCase	):
															lowerCamelCase__       =       {int(_lowerCAmelCase	): v for k, v in aggregation_labels.items()}








from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig


A_												=     {
    "albert-base-v1": "https://huggingface.co/albert-base-v1/resolve/main/config.json",
    "albert-large-v1": "https://huggingface.co/albert-large-v1/resolve/main/config.json",
    "albert-xlarge-v1": "https://huggingface.co/albert-xlarge-v1/resolve/main/config.json",
    "albert-xxlarge-v1": "https://huggingface.co/albert-xxlarge-v1/resolve/main/config.json",
    "albert-base-v2": "https://huggingface.co/albert-base-v2/resolve/main/config.json",
    "albert-large-v2": "https://huggingface.co/albert-large-v2/resolve/main/config.json",
    "albert-xlarge-v2": "https://huggingface.co/albert-xlarge-v2/resolve/main/config.json",
    "albert-xxlarge-v2": "https://huggingface.co/albert-xxlarge-v2/resolve/main/config.json",
}

class SCREAMING_SNAKE_CASE_ (					lowercase_   ):





					"""simple docstring"""


					A__				 =    "albert"





					def __init__( self	,  _lowerCAmelCase=3_0000	,  _lowerCAmelCase=128	,  _lowerCAmelCase=4096	,  _lowerCAmelCase=12	,  _lowerCAmelCase=1	,  _lowerCAmelCase=64	,  _lowerCAmelCase=1_6384	,  _lowerCAmelCase=1	,  _lowerCAmelCase="gelu_new"	,  _lowerCAmelCase=0	,  _lowerCAmelCase=0	,  _lowerCAmelCase=512	,  _lowerCAmelCase=2	,  _lowerCAmelCase=0.02	,  _lowerCAmelCase=1E-12	,  _lowerCAmelCase=0.1	,  _lowerCAmelCase="absolute"	,  _lowerCAmelCase=0	,  _lowerCAmelCase=2	,  _lowerCAmelCase=3	,  **_lowerCAmelCase	,  ):
										super().__init__(pad_token_id=_lowerCAmelCase	,  bos_token_id=_lowerCAmelCase	,  eos_token_id=_lowerCAmelCase	,  **_lowerCAmelCase	)

										lowerCamelCase__       =       vocab_size
										lowerCamelCase__       =       embedding_size
										lowerCamelCase__       =       hidden_size
										lowerCamelCase__       =       num_hidden_layers
										lowerCamelCase__       =       num_hidden_groups
										lowerCamelCase__       =       num_attention_heads
										lowerCamelCase__       =       inner_group_num
										lowerCamelCase__       =       hidden_act
										lowerCamelCase__       =       intermediate_size
										lowerCamelCase__       =       hidden_dropout_prob
										lowerCamelCase__       =       attention_probs_dropout_prob
										lowerCamelCase__       =       max_position_embeddings
										lowerCamelCase__       =       type_vocab_size
										lowerCamelCase__       =       initializer_range
										lowerCamelCase__       =       layer_norm_eps
										lowerCamelCase__       =       classifier_dropout_prob
										lowerCamelCase__       =       position_embedding_type

class SCREAMING_SNAKE_CASE_ (					lowercase_   ):





					"""simple docstring"""


					@property
					def 					__magic_name__ ( self	):
										if self.task == "multiple-choice":
															lowerCamelCase__       =       {0: "batch", 1: "choice", 2: "sequence"}
										else:
															lowerCamelCase__       =       {0: "batch", 1: "sequence"}
										return OrderedDict(
										    [
										        ("input_ids", dynamic_axis),
										        ("attention_mask", dynamic_axis),
										        ("token_type_ids", dynamic_axis),
										    ]	)

