




"""simple docstring"""







from ...configuration_utils import PretrainedConfig


__lowercase    =				{
    """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 						_A  (  _a  ):







    """simple docstring"""




    UpperCAmelCase	:							str     =	"""tapas"""






    def __init__( self    :   Optional[Any]    ,			__UpperCAmelCase    :   Any=30522    ,			__UpperCAmelCase    :   List[str]=768    ,			__UpperCAmelCase    :   Optional[int]=12    ,			__UpperCAmelCase    :   List[str]=12    ,			__UpperCAmelCase    :   List[str]=3072    ,			__UpperCAmelCase    :   Union[str, Any]="gelu"    ,			__UpperCAmelCase    :   Optional[int]=0.1    ,			__UpperCAmelCase    :   Union[str, Any]=0.1    ,			__UpperCAmelCase    :   Optional[int]=1024    ,			__UpperCAmelCase    :   Optional[Any]=[3, 256, 256, 2, 256, 256, 10]    ,			__UpperCAmelCase    :   Any=0.02    ,			__UpperCAmelCase    :   Dict=1e-12    ,			__UpperCAmelCase    :   Dict=0    ,			__UpperCAmelCase    :   Any=10.0    ,			__UpperCAmelCase    :   int=0    ,			__UpperCAmelCase    :   List[str]=1.0    ,			__UpperCAmelCase    :   Optional[Any]=None    ,			__UpperCAmelCase    :   Any=1.0    ,			__UpperCAmelCase    :   Any=False    ,			__UpperCAmelCase    :   Optional[Any]=None    ,			__UpperCAmelCase    :   Union[str, Any]=1.0    ,			__UpperCAmelCase    :   Optional[int]=1.0    ,			__UpperCAmelCase    :   Optional[Any]=False    ,			__UpperCAmelCase    :   List[str]=False    ,			__UpperCAmelCase    :   List[str]="ratio"    ,			__UpperCAmelCase    :   Tuple=None    ,			__UpperCAmelCase    :   Optional[int]=None    ,			__UpperCAmelCase    :   List[str]=64    ,			__UpperCAmelCase    :   Union[str, Any]=32    ,			__UpperCAmelCase    :   str=False    ,			__UpperCAmelCase    :   List[Any]=True    ,			__UpperCAmelCase    :   List[Any]=False    ,			__UpperCAmelCase    :   List[Any]=False    ,			__UpperCAmelCase    :   int=True    ,			__UpperCAmelCase    :   int=False    ,			__UpperCAmelCase    :   List[Any]=None    ,			__UpperCAmelCase    :   Optional[int]=None    ,			**__UpperCAmelCase    :   List[Any]    ,			):
      super().__init__(pad_token_id=__UpperCAmelCase    ,			**__UpperCAmelCase)

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

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

      # Aggregation hyperparameters
      a						:		int											=      aggregation_labels
      a						:		str											=      no_aggregation_label_index

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










"""simple docstring"""







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__lowercase    =				{
    """configuration_instructblip""": [
        """INSTRUCTBLIP_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """InstructBlipConfig""",
        """InstructBlipQFormerConfig""",
        """InstructBlipVisionConfig""",
    ],
    """processing_instructblip""": ["""InstructBlipProcessor"""],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 __lowercase    =				[
     """INSTRUCTBLIP_PRETRAINED_MODEL_ARCHIVE_LIST""",
     """InstructBlipQFormerModel""",
     """InstructBlipPreTrainedModel""",
     """InstructBlipForConditionalGeneration""",
     """InstructBlipVisionModel""",
 ]

if TYPE_CHECKING:
 from .configuration_instructblip import (
     INSTRUCTBLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
     InstructBlipConfig,
     InstructBlipQFormerConfig,
     InstructBlipVisionConfig,
 )
 from .processing_instructblip import InstructBlipProcessor

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_instructblip import (
      INSTRUCTBLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
      InstructBlipForConditionalGeneration,
      InstructBlipPreTrainedModel,
      InstructBlipQFormerModel,
      InstructBlipVisionModel,
  )

else:
 import sys

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






