from collections import OrderedDict
from typing import Mapping

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


__UpperCamelCase	: Optional[Any]    		=  logging.get_logger(__name__)

__UpperCamelCase	: List[str]    		=  {
    '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_):
						UpperCamelCase_  =	"""xmod"""


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





												'''simple docstring'''





												super().__init__(pad_token_id=UpperCamelCase__					,	bos_token_id=UpperCamelCase__					,	eos_token_id=UpperCamelCase__					,	**UpperCamelCase__		)

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






class       lowercase__		(     UpperCamelCase_):


						@property
						def  __A ( self			:       int		):





												'''simple docstring'''





												if self.task == "multiple-choice":
																		SCREAMING_SNAKE_CASE							:					List[Any]           =							{0: '''batch''', 1: '''choice''', 2: '''sequence'''}
												else:
																		SCREAMING_SNAKE_CASE							:					Any           =							{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_tf_available, is_torch_available


__UpperCamelCase	: Tuple    		=  {
    'configuration_ctrl': ['CTRL_PRETRAINED_CONFIG_ARCHIVE_MAP', 'CTRLConfig'],
    'tokenization_ctrl': ['CTRLTokenizer'],
}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					__UpperCamelCase	: Dict    		=  [
					    'CTRL_PRETRAINED_MODEL_ARCHIVE_LIST',
					    'CTRLForSequenceClassification',
					    'CTRLLMHeadModel',
					    'CTRLModel',
					    'CTRLPreTrainedModel',
					]

try:
					if not is_tf_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					__UpperCamelCase	: Any    		=  [
					    'TF_CTRL_PRETRAINED_MODEL_ARCHIVE_LIST',
					    'TFCTRLForSequenceClassification',
					    'TFCTRLLMHeadModel',
					    'TFCTRLModel',
					    'TFCTRLPreTrainedModel',
					]


if TYPE_CHECKING:
					from .configuration_ctrl import CTRL_PRETRAINED_CONFIG_ARCHIVE_MAP, CTRLConfig
					from .tokenization_ctrl import CTRLTokenizer

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_ctrl import (
										    CTRL_PRETRAINED_MODEL_ARCHIVE_LIST,
										    CTRLForSequenceClassification,
										    CTRLLMHeadModel,
										    CTRLModel,
										    CTRLPreTrainedModel,
										)

					try:
										if not is_tf_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_tf_ctrl import (
										    TF_CTRL_PRETRAINED_MODEL_ARCHIVE_LIST,
										    TFCTRLForSequenceClassification,
										    TFCTRLLMHeadModel,
										    TFCTRLModel,
										    TFCTRLPreTrainedModel,
										)

else:
					import sys

					__UpperCamelCase	: Optional[Any]    		=  _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)





