


from collections import OrderedDict
from typing import Mapping

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


_A		:				List[str]									=       logging.get_logger(__name__)

_A		:				Tuple									=       {
    """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        a					(			snake_case_   ):
       UpperCAmelCase__ :  Any						      =	"""big_bird"""





       def __init__(    self					:				List[str]    ,	SCREAMING_SNAKE_CASE_					:				int=50358    ,	SCREAMING_SNAKE_CASE_					:				List[str]=768    ,	SCREAMING_SNAKE_CASE_					:				int=12    ,	SCREAMING_SNAKE_CASE_					:				Any=12    ,	SCREAMING_SNAKE_CASE_					:				Tuple=3072    ,	SCREAMING_SNAKE_CASE_					:				Tuple="gelu_new"    ,	SCREAMING_SNAKE_CASE_					:				Any=0.1    ,	SCREAMING_SNAKE_CASE_					:				int=0.1    ,	SCREAMING_SNAKE_CASE_					:				Any=4096    ,	SCREAMING_SNAKE_CASE_					:				Tuple=2    ,	SCREAMING_SNAKE_CASE_					:				Any=0.02    ,	SCREAMING_SNAKE_CASE_					:				Optional[int]=1E-1_2    ,	SCREAMING_SNAKE_CASE_					:				Any=True    ,	SCREAMING_SNAKE_CASE_					:				str=0    ,	SCREAMING_SNAKE_CASE_					:				List[str]=1    ,	SCREAMING_SNAKE_CASE_					:				Optional[Any]=2    ,	SCREAMING_SNAKE_CASE_					:				Dict=66    ,	SCREAMING_SNAKE_CASE_					:				Optional[int]="block_sparse"    ,	SCREAMING_SNAKE_CASE_					:				Union[str, Any]=True    ,	SCREAMING_SNAKE_CASE_					:				int=False    ,	SCREAMING_SNAKE_CASE_					:				List[Any]=64    ,	SCREAMING_SNAKE_CASE_					:				Tuple=3    ,	SCREAMING_SNAKE_CASE_					:				List[str]=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:				Dict     =	vocab_size
          __lowerCamelCase:				List[Any]     =	max_position_embeddings
          __lowerCamelCase:				List[Any]     =	hidden_size
          __lowerCamelCase:				Optional[Any]     =	num_hidden_layers
          __lowerCamelCase:				List[str]     =	num_attention_heads
          __lowerCamelCase:				int     =	intermediate_size
          __lowerCamelCase:				str     =	hidden_act
          __lowerCamelCase:				Any     =	hidden_dropout_prob
          __lowerCamelCase:				Union[str, Any]     =	attention_probs_dropout_prob
          __lowerCamelCase:				List[str]     =	initializer_range
          __lowerCamelCase:				Any     =	type_vocab_size
          __lowerCamelCase:				str     =	layer_norm_eps
          __lowerCamelCase:				List[Any]     =	use_cache

          __lowerCamelCase:				List[str]     =	rescale_embeddings
          __lowerCamelCase:				str     =	attention_type
          __lowerCamelCase:				Optional[Any]     =	use_bias
          __lowerCamelCase:				str     =	block_size
          __lowerCamelCase:				Tuple     =	num_random_blocks
          __lowerCamelCase:				List[str]     =	classifier_dropout



class        a					(			snake_case_   ):





       @property
       def  SCREAMING_SNAKE_CASE__       (    self					:				str							):
          if self.task == "multiple-choice":
             __lowerCamelCase:				Tuple     =	{0: """batch""", 1: """choice""", 2: """sequence"""}
          else:
             __lowerCamelCase:				Union[str, Any]     =	{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_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


_A		:				List[Any]									=       {
    '''configuration_convbert''': ['''CONVBERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ConvBertConfig''', '''ConvBertOnnxConfig'''],
    '''tokenization_convbert''': ['''ConvBertTokenizer'''],
}

try:
   if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _A		:				int									=       ['''ConvBertTokenizerFast''']

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _A		:				List[Any]									=       [
       '''CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''ConvBertForMaskedLM''',
       '''ConvBertForMultipleChoice''',
       '''ConvBertForQuestionAnswering''',
       '''ConvBertForSequenceClassification''',
       '''ConvBertForTokenClassification''',
       '''ConvBertLayer''',
       '''ConvBertModel''',
       '''ConvBertPreTrainedModel''',
       '''load_tf_weights_in_convbert''',
   ]


try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _A		:				List[Any]									=       [
       '''TF_CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''TFConvBertForMaskedLM''',
       '''TFConvBertForMultipleChoice''',
       '''TFConvBertForQuestionAnswering''',
       '''TFConvBertForSequenceClassification''',
       '''TFConvBertForTokenClassification''',
       '''TFConvBertLayer''',
       '''TFConvBertModel''',
       '''TFConvBertPreTrainedModel''',
   ]


if TYPE_CHECKING:
   from .configuration_convbert import CONVBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, ConvBertConfig, ConvBertOnnxConfig
   from .tokenization_convbert import ConvBertTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_convbert_fast import ConvBertTokenizerFast

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_convbert import (
          CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          ConvBertForMaskedLM,
          ConvBertForMultipleChoice,
          ConvBertForQuestionAnswering,
          ConvBertForSequenceClassification,
          ConvBertForTokenClassification,
          ConvBertLayer,
          ConvBertModel,
          ConvBertPreTrainedModel,
          load_tf_weights_in_convbert,
      )

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_convbert import (
          TF_CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFConvBertForMaskedLM,
          TFConvBertForMultipleChoice,
          TFConvBertForQuestionAnswering,
          TFConvBertForSequenceClassification,
          TFConvBertForTokenClassification,
          TFConvBertLayer,
          TFConvBertModel,
          TFConvBertPreTrainedModel,
      )


else:
   import sys

   _A		:				int									=       _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


