



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        __lowerCAmelCase   (		SCREAMING_SNAKE_CASE__      ):
 lowerCAmelCase__				    =     """big_bird"""




 def __init__(  self		, __UpperCAmelCase=50358		, __UpperCAmelCase=768		, __UpperCAmelCase=12		, __UpperCAmelCase=12		, __UpperCAmelCase=3072		, __UpperCAmelCase="gelu_new"		, __UpperCAmelCase=0.1		, __UpperCAmelCase=0.1		, __UpperCAmelCase=4096		, __UpperCAmelCase=2		, __UpperCAmelCase=0.02		, __UpperCAmelCase=1E-1_2		, __UpperCAmelCase=True		, __UpperCAmelCase=0		, __UpperCAmelCase=1		, __UpperCAmelCase=2		, __UpperCAmelCase=66		, __UpperCAmelCase="block_sparse"		, __UpperCAmelCase=True		, __UpperCAmelCase=False		, __UpperCAmelCase=64		, __UpperCAmelCase=3		, __UpperCAmelCase=None		, **__UpperCAmelCase		, ):



    '''simple docstring'''
    super().__init__(
        pad_token_id=__lowerCamelCase		, bos_token_id=__lowerCamelCase		, eos_token_id=__lowerCamelCase		, sep_token_id=__lowerCamelCase		, **__lowerCamelCase		, )

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

    __lowerCamelCase  							=			rescale_embeddings
    __lowerCamelCase  							=			attention_type
    __lowerCamelCase  							=			use_bias
    __lowerCamelCase  							=			block_size
    __lowerCamelCase  							=			num_random_blocks
    __lowerCamelCase  							=			classifier_dropout



class        __lowerCAmelCase   (		SCREAMING_SNAKE_CASE__      ):




 @property
 def 				lowerCamelCase					(  self ):



    '''simple docstring'''




    if self.task == "multiple-choice":
       __lowerCamelCase  							=			{0: '''batch''', 1: '''choice''', 2: '''sequence'''}
    else:
       __lowerCamelCase  							=			{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_tokenizers_available,
    is_torch_available,
    is_vision_available,
)


a_ =			{
    """configuration_perceiver""": ["""PERCEIVER_PRETRAINED_CONFIG_ARCHIVE_MAP""", """PerceiverConfig""", """PerceiverOnnxConfig"""],
    """tokenization_perceiver""": ["""PerceiverTokenizer"""],
}

try:
       if not is_vision_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       a_ =			["""PerceiverFeatureExtractor"""]
       a_ =			["""PerceiverImageProcessor"""]

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       a_ =			[
           """PERCEIVER_PRETRAINED_MODEL_ARCHIVE_LIST""",
           """PerceiverForImageClassificationConvProcessing""",
           """PerceiverForImageClassificationFourier""",
           """PerceiverForImageClassificationLearned""",
           """PerceiverForMaskedLM""",
           """PerceiverForMultimodalAutoencoding""",
           """PerceiverForOpticalFlow""",
           """PerceiverForSequenceClassification""",
           """PerceiverLayer""",
           """PerceiverModel""",
           """PerceiverPreTrainedModel""",
       ]


if TYPE_CHECKING:
       from .configuration_perceiver import PERCEIVER_PRETRAINED_CONFIG_ARCHIVE_MAP, PerceiverConfig, PerceiverOnnxConfig
       from .tokenization_perceiver import PerceiverTokenizer

       try:
              if not is_vision_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .feature_extraction_perceiver import PerceiverFeatureExtractor
              from .image_processing_perceiver import PerceiverImageProcessor

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_perceiver import (
                  PERCEIVER_PRETRAINED_MODEL_ARCHIVE_LIST,
                  PerceiverForImageClassificationConvProcessing,
                  PerceiverForImageClassificationFourier,
                  PerceiverForImageClassificationLearned,
                  PerceiverForMaskedLM,
                  PerceiverForMultimodalAutoencoding,
                  PerceiverForOpticalFlow,
                  PerceiverForSequenceClassification,
                  PerceiverLayer,
                  PerceiverModel,
                  PerceiverPreTrainedModel,
              )

else:
       import sys

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




