






from ...configuration_utils import PretrainedConfig


__UpperCAmelCase								=						{
    '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   lowerCamelCase      (_snake_case			):







		'''simple docstring'''



		_snake_case    :    List[Any]       						=  '''tapas'''



		def __init__(							self				,		_UpperCamelCase=3_0_5_2_2				,		_UpperCamelCase=7_6_8				,		_UpperCamelCase=1_2				,		_UpperCamelCase=1_2				,		_UpperCamelCase=3_0_7_2				,		_UpperCamelCase="gelu"				,		_UpperCamelCase=0.1				,		_UpperCamelCase=0.1				,		_UpperCamelCase=1_0_2_4				,		_UpperCamelCase=[3, 2_5_6, 2_5_6, 2, 2_5_6, 2_5_6, 1_0]				,		_UpperCamelCase=0.02				,		_UpperCamelCase=1E-12				,		_UpperCamelCase=0				,		_UpperCamelCase=10.0				,		_UpperCamelCase=0				,		_UpperCamelCase=1.0				,		_UpperCamelCase=None				,		_UpperCamelCase=1.0				,		_UpperCamelCase=False				,		_UpperCamelCase=None				,		_UpperCamelCase=1.0				,		_UpperCamelCase=1.0				,		_UpperCamelCase=False				,		_UpperCamelCase=False				,		_UpperCamelCase="ratio"				,		_UpperCamelCase=None				,		_UpperCamelCase=None				,		_UpperCamelCase=6_4				,		_UpperCamelCase=3_2				,		_UpperCamelCase=False				,		_UpperCamelCase=True				,		_UpperCamelCase=False				,		_UpperCamelCase=False				,		_UpperCamelCase=True				,		_UpperCamelCase=False				,		_UpperCamelCase=None				,		_UpperCamelCase=None				,		**_UpperCamelCase				,		)	->							Union[str, Any]:
							super().__init__(pad_token_id=__UpperCAmelCase				,		**__UpperCAmelCase   )

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

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

							# Aggregation hyperparameters
							UpperCAmelCase_    :      Any            =						aggregation_labels
							UpperCAmelCase_    :      Union[str, Any]            =						no_aggregation_label_index

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














from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCAmelCase__				   =		{
    "configuration_nllb_moe": [
        "NLLB_MOE_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "NllbMoeConfig",
    ]
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCAmelCase__				   =		[
         "NLLB_MOE_PRETRAINED_MODEL_ARCHIVE_LIST",
         "NllbMoeForConditionalGeneration",
         "NllbMoeModel",
         "NllbMoePreTrainedModel",
         "NllbMoeTop2Router",
         "NllbMoeSparseMLP",
     ]


if TYPE_CHECKING:
     from .configuration_nllb_moe import (
         NLLB_MOE_PRETRAINED_CONFIG_ARCHIVE_MAP,
         NllbMoeConfig,
     )

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_nllb_moe import (
              NLLB_MOE_PRETRAINED_MODEL_ARCHIVE_LIST,
              NllbMoeForConditionalGeneration,
              NllbMoeModel,
              NllbMoePreTrainedModel,
              NllbMoeSparseMLP,
              NllbMoeTopaRouter,
          )


else:
     import sys

     UpperCAmelCase__				   =		_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


