



'''simple docstring'''





from collections import OrderedDict
from typing import Mapping

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


snake_case__					:     int    		=   logging.get_logger(__name__)

snake_case__					:     str    		=   {
    """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   ( SCREAMING_SNAKE_CASE__	):


						'''simple docstring'''





						_snake_case			:     Dict      							=      """big_bird"""



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






							'''simple docstring'''



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

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

							__lowercase		       =			rescale_embeddings
							__lowercase		       =			attention_type
							__lowercase		       =			use_bias
							__lowercase		       =			block_size
							__lowercase		       =			num_random_blocks
							__lowercase		       =			classifier_dropout

class   _A   ( SCREAMING_SNAKE_CASE__	):


						'''simple docstring'''





						@property
						def     _snake_case	(	self	:							Any	):






							'''simple docstring'''



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








# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


snake_case__					:     List[str]    		=   {
    """configuration_mgp_str""": ["""MGP_STR_PRETRAINED_CONFIG_ARCHIVE_MAP""", """MgpstrConfig"""],
    """processing_mgp_str""": ["""MgpstrProcessor"""],
    """tokenization_mgp_str""": ["""MgpstrTokenizer"""],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	snake_case__					:     Dict    		=   [
	    """MGP_STR_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """MgpstrModel""",
	    """MgpstrPreTrainedModel""",
	    """MgpstrForSceneTextRecognition""",
	]

if TYPE_CHECKING:
	from .configuration_mgp_str import MGP_STR_PRETRAINED_CONFIG_ARCHIVE_MAP, MgpstrConfig
	from .processing_mgp_str import MgpstrProcessor
	from .tokenization_mgp_str import MgpstrTokenizer

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_mgp_str import (
		    MGP_STR_PRETRAINED_MODEL_ARCHIVE_LIST,
		    MgpstrForSceneTextRecognition,
		    MgpstrModel,
		    MgpstrPreTrainedModel,
		)
else:
	import sys

	snake_case__					:     Union[str, Any]    		=   _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



