
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   (      __a			):
				_lowercase     						='''big_bird'''




				def __init__(   self							,							_UpperCamelCase=50_358							,							_UpperCamelCase=768							,							_UpperCamelCase=12							,							_UpperCamelCase=12							,							_UpperCamelCase=3_072							,							_UpperCamelCase="gelu_new"							,							_UpperCamelCase=0.1							,							_UpperCamelCase=0.1							,							_UpperCamelCase=4_096							,							_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							,							)							-> Any:
							super().__init__(
							    pad_token_id=_UpperCamelCase							,							bos_token_id=_UpperCamelCase							,							eos_token_id=_UpperCamelCase							,							sep_token_id=_UpperCamelCase							,							**_UpperCamelCase							,							)

							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   (      __a			):




				@property
				def 	__a		(   self	)							-> Mapping[str, Mapping[int, str]]:
							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),
							    ]	)





from dataclasses import dataclass
from enum import Enum
from typing import List, Optional, Union

import numpy as np
import PIL
from PIL import Image

from ...utils import BaseOutput, is_torch_available, is_transformers_available





@dataclass
class       _lowerCAmelCase   (      __a			):
				_lowercase     						=42
				_lowercase     						=42


if is_transformers_available() and is_torch_available():
			from .pipeline_semantic_stable_diffusion import SemanticStableDiffusionPipeline



