


"""simple docstring"""
from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


UpperCAmelCase				=						logging.get_logger(__name__)

UpperCAmelCase				=						{
    """google/bigbird-roberta-base""": """https://huggingface.co/google/bigbird-roberta-base/resolve/main/config.json""",
    """google/bigbird-roberta-large""": """https://huggingface.co/google/bigbird-roberta-large/resolve/main/config.json""",
    """google/bigbird-base-trivia-itc""": """https://huggingface.co/google/bigbird-base-trivia-itc/resolve/main/config.json""",
    # See all BigBird models at https://huggingface.co/models?filter=big_bird
}




class 	lowercase__				(					A_				):
   __UpperCAmelCase							       =					'''big_bird'''





   def __init__(							self      ,   SCREAMING_SNAKE_CASE=5_0358      ,   SCREAMING_SNAKE_CASE=768      ,   SCREAMING_SNAKE_CASE=12      ,   SCREAMING_SNAKE_CASE=12      ,   SCREAMING_SNAKE_CASE=3072      ,   SCREAMING_SNAKE_CASE="gelu_new"      ,   SCREAMING_SNAKE_CASE=0.1      ,   SCREAMING_SNAKE_CASE=0.1      ,   SCREAMING_SNAKE_CASE=4096      ,   SCREAMING_SNAKE_CASE=2      ,   SCREAMING_SNAKE_CASE=0.02      ,   SCREAMING_SNAKE_CASE=1e-1_2      ,   SCREAMING_SNAKE_CASE=True      ,   SCREAMING_SNAKE_CASE=0      ,   SCREAMING_SNAKE_CASE=1      ,   SCREAMING_SNAKE_CASE=2      ,   SCREAMING_SNAKE_CASE=66      ,   SCREAMING_SNAKE_CASE="block_sparse"      ,   SCREAMING_SNAKE_CASE=True      ,   SCREAMING_SNAKE_CASE=False      ,   SCREAMING_SNAKE_CASE=64      ,   SCREAMING_SNAKE_CASE=3      ,   SCREAMING_SNAKE_CASE=None      ,   **SCREAMING_SNAKE_CASE      ,   )  ->  Union[str, Any]:
      super().__init__(
          pad_token_id=SCREAMING_SNAKE_CASE      ,   bos_token_id=SCREAMING_SNAKE_CASE      ,   eos_token_id=SCREAMING_SNAKE_CASE      ,   sep_token_id=SCREAMING_SNAKE_CASE      ,   **SCREAMING_SNAKE_CASE      ,   )

      _lowerCamelCase	:					Optional[Any]   =		vocab_size
      _lowerCamelCase	:					Dict   =		max_position_embeddings
      _lowerCamelCase	:					int   =		hidden_size
      _lowerCamelCase	:					Any   =		num_hidden_layers
      _lowerCamelCase	:					Optional[int]   =		num_attention_heads
      _lowerCamelCase	:					int   =		intermediate_size
      _lowerCamelCase	:					int   =		hidden_act
      _lowerCamelCase	:					Union[str, Any]   =		hidden_dropout_prob
      _lowerCamelCase	:					Optional[Any]   =		attention_probs_dropout_prob
      _lowerCamelCase	:					str   =		initializer_range
      _lowerCamelCase	:					Optional[int]   =		type_vocab_size
      _lowerCamelCase	:					Optional[int]   =		layer_norm_eps
      _lowerCamelCase	:					Optional[Any]   =		use_cache

      _lowerCamelCase	:					Any   =		rescale_embeddings
      _lowerCamelCase	:					Optional[int]   =		attention_type
      _lowerCamelCase	:					Optional[int]   =		use_bias
      _lowerCamelCase	:					List[Any]   =		block_size
      _lowerCamelCase	:					str   =		num_random_blocks
      _lowerCamelCase	:					Any   =		classifier_dropout







class 	lowercase__				(					A_				):





   @property
   def 		UpperCamelCase_  (							self)  ->  Mapping[str, Mapping[int, str]]:
      if self.task == "multiple-choice":
         _lowerCamelCase	:					str   =		{0: """batch""", 1: """choice""", 2: """sequence"""}
      else:
         _lowerCamelCase	:					Optional[Any]   =		{0: """batch""", 1: """sequence"""}
      return OrderedDict(
          [
              ("""input_ids""", dynamic_axis),
              ("""attention_mask""", dynamic_axis),
          ])






'''simple docstring'''





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


_UpperCamelCase											=		{
    'configuration_bridgetower': [
        'BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'BridgeTowerConfig',
        'BridgeTowerTextConfig',
        'BridgeTowerVisionConfig',
    ],
    'processing_bridgetower': ['BridgeTowerProcessor'],
}

try:
   if not is_vision_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCamelCase											=		['BridgeTowerImageProcessor']

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCamelCase											=		[
       'BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST',
       'BridgeTowerForContrastiveLearning',
       'BridgeTowerForImageAndTextRetrieval',
       'BridgeTowerForMaskedLM',
       'BridgeTowerModel',
       'BridgeTowerPreTrainedModel',
   ]


if TYPE_CHECKING:
   from .configuration_bridgetower import (
       BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP,
       BridgeTowerConfig,
       BridgeTowerTextConfig,
       BridgeTowerVisionConfig,
   )
   from .processing_bridgetower import BridgeTowerProcessor

   try:
      if not is_vision_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .image_processing_bridgetower import BridgeTowerImageProcessor

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_bridgetower import (
          BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST,
          BridgeTowerForContrastiveLearning,
          BridgeTowerForImageAndTextRetrieval,
          BridgeTowerForMaskedLM,
          BridgeTowerModel,
          BridgeTowerPreTrainedModel,
      )


else:
   import sys

   _UpperCamelCase											=		_LazyModule(__name__, globals()['__file__'], _import_structure)






