






'''simple docstring'''



from ...configuration_utils import PretrainedConfig


__UpperCamelCase      :       Optional[Any]      			=      {
    """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       (							_lowerCAmelCase     ):
      __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 ,   )							->Dict:



         '''simple docstring'''
         super().__init__(pad_token_id=lowerCamelCase ,   **lowerCamelCase      )

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

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

         # Aggregation hyperparameters
         __a				     =    aggregation_labels
         __a				     =    no_aggregation_label_index

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







'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__UpperCamelCase      :       Tuple      			=      {
    """configuration_blip_2""": [
        """BLIP_2_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """Blip2Config""",
        """Blip2QFormerConfig""",
        """Blip2VisionConfig""",
    ],
    """processing_blip_2""": ["""Blip2Processor"""],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 __UpperCamelCase      :       Optional[int]      			=      [
     """BLIP_2_PRETRAINED_MODEL_ARCHIVE_LIST""",
     """Blip2Model""",
     """Blip2QFormerModel""",
     """Blip2PreTrainedModel""",
     """Blip2ForConditionalGeneration""",
     """Blip2VisionModel""",
 ]

if TYPE_CHECKING:
 from .configuration_blip_a import (
     BLIP_2_PRETRAINED_CONFIG_ARCHIVE_MAP,
     BlipaConfig,
     BlipaQFormerConfig,
     BlipaVisionConfig,
 )
 from .processing_blip_a import BlipaProcessor

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_blip_a import (
      BLIP_2_PRETRAINED_MODEL_ARCHIVE_LIST,
      BlipaForConditionalGeneration,
      BlipaModel,
      BlipaPreTrainedModel,
      BlipaQFormerModel,
      BlipaVisionModel,
  )

else:
 import sys

 __UpperCamelCase      :       Dict      			=      _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)