

from collections import OrderedDict
from typing import Mapping

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


lowerCAmelCase							:  Any            =						logging.get_logger(__name__)

lowerCAmelCase							:  List[Any]            =						{
    """facebook/xmod-base""": """https://huggingface.co/facebook/xmod-base/resolve/main/config.json""",
    """facebook/xmod-large-prenorm""": """https://huggingface.co/facebook/xmod-large-prenorm/resolve/main/config.json""",
    """facebook/xmod-base-13-125k""": """https://huggingface.co/facebook/xmod-base-13-125k/resolve/main/config.json""",
    """facebook/xmod-base-30-125k""": """https://huggingface.co/facebook/xmod-base-30-125k/resolve/main/config.json""",
    """facebook/xmod-base-30-195k""": """https://huggingface.co/facebook/xmod-base-30-195k/resolve/main/config.json""",
    """facebook/xmod-base-60-125k""": """https://huggingface.co/facebook/xmod-base-60-125k/resolve/main/config.json""",
    """facebook/xmod-base-60-265k""": """https://huggingface.co/facebook/xmod-base-60-265k/resolve/main/config.json""",
    """facebook/xmod-base-75-125k""": """https://huggingface.co/facebook/xmod-base-75-125k/resolve/main/config.json""",
    """facebook/xmod-base-75-269k""": """https://huggingface.co/facebook/xmod-base-75-269k/resolve/main/config.json""",
}



class   __lowercase    (			UpperCAmelCase_     ):




			"""simple docstring"""







			_UpperCAmelCase       :							Dict      							=					'''xmod'''



			def __init__(			self  :					str       ,						lowerCAmelCase__  :					Any=3_0522       ,						lowerCAmelCase__  :					Tuple=768       ,						lowerCAmelCase__  :					Tuple=12       ,						lowerCAmelCase__  :					int=12       ,						lowerCAmelCase__  :					Dict=3072       ,						lowerCAmelCase__  :					List[str]="gelu"       ,						lowerCAmelCase__  :					Any=0.1       ,						lowerCAmelCase__  :					Any=0.1       ,						lowerCAmelCase__  :					Dict=512       ,						lowerCAmelCase__  :					Optional[Any]=2       ,						lowerCAmelCase__  :					str=0.02       ,						lowerCAmelCase__  :					Union[str, Any]=1E-12       ,						lowerCAmelCase__  :					int=1       ,						lowerCAmelCase__  :					List[Any]=0       ,						lowerCAmelCase__  :					Optional[int]=2       ,						lowerCAmelCase__  :					Any="absolute"       ,						lowerCAmelCase__  :					Tuple=True       ,						lowerCAmelCase__  :					List[Any]=None       ,						lowerCAmelCase__  :					Any=False       ,						lowerCAmelCase__  :					Union[str, Any]=2       ,						lowerCAmelCase__  :					Dict=False       ,						lowerCAmelCase__  :					Any=True       ,						lowerCAmelCase__  :					str=True       ,						lowerCAmelCase__  :					Optional[Any]=("en_XX",)       ,						lowerCAmelCase__  :					int=None       ,						**lowerCAmelCase__  :					int       ,						):
									super().__init__(pad_token_id=lowerCAmelCase__       ,						bos_token_id=lowerCAmelCase__       ,						eos_token_id=lowerCAmelCase__       ,						**lowerCAmelCase__)

									SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	vocab_size
									SCREAMING_SNAKE_CASE_:			List[Any]  		=	hidden_size
									SCREAMING_SNAKE_CASE_:			Tuple  		=	num_hidden_layers
									SCREAMING_SNAKE_CASE_:			str  		=	num_attention_heads
									SCREAMING_SNAKE_CASE_:			str  		=	hidden_act
									SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	intermediate_size
									SCREAMING_SNAKE_CASE_:			Any  		=	hidden_dropout_prob
									SCREAMING_SNAKE_CASE_:			Dict  		=	attention_probs_dropout_prob
									SCREAMING_SNAKE_CASE_:			str  		=	max_position_embeddings
									SCREAMING_SNAKE_CASE_:			List[Any]  		=	type_vocab_size
									SCREAMING_SNAKE_CASE_:			Tuple  		=	initializer_range
									SCREAMING_SNAKE_CASE_:			str  		=	layer_norm_eps
									SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	position_embedding_type
									SCREAMING_SNAKE_CASE_:			Tuple  		=	use_cache
									SCREAMING_SNAKE_CASE_:			Optional[int]  		=	classifier_dropout
									SCREAMING_SNAKE_CASE_:			Dict  		=	pre_norm
									SCREAMING_SNAKE_CASE_:			str  		=	adapter_reduction_factor
									SCREAMING_SNAKE_CASE_:			List[str]  		=	adapter_layer_norm
									SCREAMING_SNAKE_CASE_:			int  		=	adapter_reuse_layer_norm
									SCREAMING_SNAKE_CASE_:			str  		=	ln_before_adapter
									SCREAMING_SNAKE_CASE_:			str  		=	list(lowerCAmelCase__)
									SCREAMING_SNAKE_CASE_:			Optional[Any]  		=	default_language







class   __lowercase    (			UpperCAmelCase_     ):




			"""simple docstring"""







			@property
			def 	_SCREAMING_SNAKE_CASE      (			self  :					Union[str, Any]):
									if self.task == "multiple-choice":
															SCREAMING_SNAKE_CASE_:			str  		=	{0: "batch", 1: "choice", 2: "sequence"}
									else:
															SCREAMING_SNAKE_CASE_:			str  		=	{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_torch_available, is_vision_available


lowerCAmelCase							:  Optional[int]            =						{"""configuration_yolos""": ["""YOLOS_PRETRAINED_CONFIG_ARCHIVE_MAP""", """YolosConfig""", """YolosOnnxConfig"""]}

try:
						if not is_vision_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCAmelCase							:  Any            =						["""YolosFeatureExtractor"""]
						lowerCAmelCase							:  Tuple            =						["""YolosImageProcessor"""]

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCAmelCase							:  Any            =						[
						    """YOLOS_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """YolosForObjectDetection""",
						    """YolosModel""",
						    """YolosPreTrainedModel""",
						]


if TYPE_CHECKING:
						from .configuration_yolos import YOLOS_PRETRAINED_CONFIG_ARCHIVE_MAP, YolosConfig, YolosOnnxConfig

						try:
												if not is_vision_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .feature_extraction_yolos import YolosFeatureExtractor
												from .image_processing_yolos import YolosImageProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_yolos import (
												    YOLOS_PRETRAINED_MODEL_ARCHIVE_LIST,
												    YolosForObjectDetection,
												    YolosModel,
												    YolosPreTrainedModel,
												)


else:
						import sys

						lowerCAmelCase							:  int            =						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)






