





from collections import OrderedDict
from typing import Mapping

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


__A     =    logging.get_logger(__name__)

__A     =    {
    "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        _SCREAMING_SNAKE_CASE						(     __SCREAMING_SNAKE_CASE   ):







 '''simple docstring'''
 lowercase_		=      "big_bird"

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



   '''simple docstring'''



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

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

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



class        _SCREAMING_SNAKE_CASE						(     __SCREAMING_SNAKE_CASE   ):







 '''simple docstring'''

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



   '''simple docstring'''



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








def 					lowerCAmelCase_			(	__a		)					->		str:







  """simple docstring"""





  if isinstance(__a     ,   __a		):
    raise TypeError("'float' object cannot be interpreted as an integer"		)
  if isinstance(__a     ,   __a		):
    raise TypeError("'str' object cannot be interpreted as an integer"		)

  if num == 0:
    return "0b0"

  lowerCamelCase__:				Optional[int]        =False

  if num < 0:
    lowerCamelCase__:				Optional[Any]        =True
    lowerCamelCase__:				List[Any]        =-num

  lowerCamelCase__:				list[int]        =[]
  while num > 0:
    binary.insert(0     ,   num % 2		)
    num >>= 1

  if negative:
    return "-0b" + "".join(str(__a		) for e in binary		)

  return "0b" + "".join(str(__a		) for e in binary		)


if __name__ == "__main__":
     import doctest

     doctest.testmod()

