






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_   (      lowercase  ):






      '''simple docstring'''




      __snake_case	    =    '''big_bird'''







      def __init__( self :		Any					,   __UpperCAmelCase :		str=50_358					,   __UpperCAmelCase :		Union[str, Any]=768					,   __UpperCAmelCase :		List[str]=12					,   __UpperCAmelCase :		str=12					,   __UpperCAmelCase :		Tuple=3_072					,   __UpperCAmelCase :		Optional[int]="gelu_new"					,   __UpperCAmelCase :		Optional[Any]=0.1					,   __UpperCAmelCase :		List[str]=0.1					,   __UpperCAmelCase :		Dict=4_096					,   __UpperCAmelCase :		int=2					,   __UpperCAmelCase :		Tuple=0.02					,   __UpperCAmelCase :		Optional[int]=1e-1_2					,   __UpperCAmelCase :		Dict=True					,   __UpperCAmelCase :		Union[str, Any]=0					,   __UpperCAmelCase :		Union[str, Any]=1					,   __UpperCAmelCase :		Optional[int]=2					,   __UpperCAmelCase :		List[Any]=66					,   __UpperCAmelCase :		Union[str, Any]="block_sparse"					,   __UpperCAmelCase :		List[str]=True					,   __UpperCAmelCase :		int=False					,   __UpperCAmelCase :		str=64					,   __UpperCAmelCase :		Union[str, Any]=3					,   __UpperCAmelCase :		Any=None					,   **__UpperCAmelCase :		List[Any]					,   )       ->Optional[int]:




       """simple docstring"""


       super().__init__(
           pad_token_id=__UpperCAmelCase					,   bos_token_id=__UpperCAmelCase					,   eos_token_id=__UpperCAmelCase					,   sep_token_id=__UpperCAmelCase					,   **__UpperCAmelCase					,   )

       a						    = vocab_size
       a						    = max_position_embeddings
       a						    = hidden_size
       a						    = num_hidden_layers
       a						    = num_attention_heads
       a						    = intermediate_size
       a						    = hidden_act
       a						    = hidden_dropout_prob
       a						    = attention_probs_dropout_prob
       a						    = initializer_range
       a						    = type_vocab_size
       a						    = layer_norm_eps
       a						    = use_cache

       a						    = rescale_embeddings
       a						    = attention_type
       a						    = use_bias
       a						    = block_size
       a						    = num_random_blocks
       a						    = classifier_dropout






class 						lowercase_   (      lowercase  ):






      '''simple docstring'''




      @property
      def  __lowerCAmelCase   ( self :		Union[str, Any]    )       ->Mapping[str, Mapping[int, str]]:




       """simple docstring"""


       if self.task == "multiple-choice":
        a						    = {0: '''batch''', 1: '''choice''', 2: '''sequence'''}
       else:
        a						    = {0: '''batch''', 1: '''sequence'''}
       return OrderedDict(
           [
               ('''input_ids''', dynamic_axis),
               ('''attention_mask''', dynamic_axis),
           ]    )










from typing import TYPE_CHECKING

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


UpperCAmelCase__							  =						{
    "configuration_biogpt": ["BIOGPT_PRETRAINED_CONFIG_ARCHIVE_MAP", "BioGptConfig"],
    "tokenization_biogpt": ["BioGptTokenizer"],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCAmelCase__							  =						[
         "BIOGPT_PRETRAINED_MODEL_ARCHIVE_LIST",
         "BioGptForCausalLM",
         "BioGptForTokenClassification",
         "BioGptForSequenceClassification",
         "BioGptModel",
         "BioGptPreTrainedModel",
     ]


if TYPE_CHECKING:
     from .configuration_biogpt import BIOGPT_PRETRAINED_CONFIG_ARCHIVE_MAP, BioGptConfig
     from .tokenization_biogpt import BioGptTokenizer

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_biogpt import (
              BIOGPT_PRETRAINED_MODEL_ARCHIVE_LIST,
              BioGptForCausalLM,
              BioGptForSequenceClassification,
              BioGptForTokenClassification,
              BioGptModel,
              BioGptPreTrainedModel,
          )


else:
     import sys

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


