


from collections import OrderedDict
from typing import Mapping

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


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

snake_case_						:			List[str]													=							{
    '''xlm-mlm-en-2048''': '''https://huggingface.co/xlm-mlm-en-2048/resolve/main/config.json''',
    '''xlm-mlm-ende-1024''': '''https://huggingface.co/xlm-mlm-ende-1024/resolve/main/config.json''',
    '''xlm-mlm-enfr-1024''': '''https://huggingface.co/xlm-mlm-enfr-1024/resolve/main/config.json''',
    '''xlm-mlm-enro-1024''': '''https://huggingface.co/xlm-mlm-enro-1024/resolve/main/config.json''',
    '''xlm-mlm-tlm-xnli15-1024''': '''https://huggingface.co/xlm-mlm-tlm-xnli15-1024/resolve/main/config.json''',
    '''xlm-mlm-xnli15-1024''': '''https://huggingface.co/xlm-mlm-xnli15-1024/resolve/main/config.json''',
    '''xlm-clm-enfr-1024''': '''https://huggingface.co/xlm-clm-enfr-1024/resolve/main/config.json''',
    '''xlm-clm-ende-1024''': '''https://huggingface.co/xlm-clm-ende-1024/resolve/main/config.json''',
    '''xlm-mlm-17-1280''': '''https://huggingface.co/xlm-mlm-17-1280/resolve/main/config.json''',
    '''xlm-mlm-100-1280''': '''https://huggingface.co/xlm-mlm-100-1280/resolve/main/config.json''',
}

class 						A__							(		UpperCamelCase__  ):
						UpperCAmelCase             =						"xlm"
						UpperCAmelCase             =						{
						    "hidden_size": "emb_dim",
						    "num_attention_heads": "n_heads",
						    "num_hidden_layers": "n_layers",
						    "n_words": "vocab_size",  # For backward compatibility
						}




						def __init__(       self					:      List[Any]				,    _a					:      List[Any]=3_0145				,    _a					:      str=2048				,    _a					:      str=12				,    _a					:      List[str]=16				,    _a					:      Dict=0.1				,    _a					:      Union[str, Any]=0.1				,    _a					:      Any=True				,    _a					:      Union[str, Any]=False				,    _a					:      Optional[int]=False				,    _a					:      Optional[Any]=False				,    _a					:      Any=1				,    _a					:      Optional[Any]=True				,    _a					:      Union[str, Any]=512				,    _a					:      Tuple=2048**-0.5				,    _a					:      Optional[int]=1E-12				,    _a					:      Optional[int]=0.02				,    _a					:      Dict=0				,    _a					:      Tuple=1				,    _a					:      Union[str, Any]=2				,    _a					:      Any=3				,    _a					:      Union[str, Any]=5				,    _a					:      List[Any]=True				,    _a					:      Optional[int]="first"				,    _a					:      int=True				,    _a					:      Tuple=None				,    _a					:      List[Any]=True				,    _a					:      Optional[int]=0.1				,    _a					:      Tuple=5				,    _a					:      str=5				,    _a					:      Tuple=0				,    _a					:      Dict=0				,    _a					:      str=2				,    _a					:      Any=0				,    **_a					:      Tuple				,    )							->     Optional[Any]:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =vocab_size
										_SCREAMING_SNAKE_CASE			  =emb_dim
										_SCREAMING_SNAKE_CASE			  =n_layers
										_SCREAMING_SNAKE_CASE			  =n_heads
										_SCREAMING_SNAKE_CASE			  =dropout
										_SCREAMING_SNAKE_CASE			  =attention_dropout
										_SCREAMING_SNAKE_CASE			  =gelu_activation
										_SCREAMING_SNAKE_CASE			  =sinusoidal_embeddings
										_SCREAMING_SNAKE_CASE			  =causal
										_SCREAMING_SNAKE_CASE			  =asm
										_SCREAMING_SNAKE_CASE			  =n_langs
										_SCREAMING_SNAKE_CASE			  =use_lang_emb
										_SCREAMING_SNAKE_CASE			  =layer_norm_eps
										_SCREAMING_SNAKE_CASE			  =bos_index
										_SCREAMING_SNAKE_CASE			  =eos_index
										_SCREAMING_SNAKE_CASE			  =pad_index
										_SCREAMING_SNAKE_CASE			  =unk_index
										_SCREAMING_SNAKE_CASE			  =mask_index
										_SCREAMING_SNAKE_CASE			  =is_encoder
										_SCREAMING_SNAKE_CASE			  =max_position_embeddings
										_SCREAMING_SNAKE_CASE			  =embed_init_std
										_SCREAMING_SNAKE_CASE			  =init_std
										_SCREAMING_SNAKE_CASE			  =summary_type
										_SCREAMING_SNAKE_CASE			  =summary_use_proj
										_SCREAMING_SNAKE_CASE			  =summary_activation
										_SCREAMING_SNAKE_CASE			  =summary_proj_to_labels
										_SCREAMING_SNAKE_CASE			  =summary_first_dropout
										_SCREAMING_SNAKE_CASE			  =start_n_top
										_SCREAMING_SNAKE_CASE			  =end_n_top
										_SCREAMING_SNAKE_CASE			  =mask_token_id
										_SCREAMING_SNAKE_CASE			  =lang_id

										if "n_words" in kwargs:
														_SCREAMING_SNAKE_CASE			  =kwargs['''n_words''']

										super().__init__(pad_token_id=_a				,    bos_token_id=_a				,    **_a  )

class 						A__							(		UpperCamelCase__  ):




						@property
						def 							__UpperCamelCase				(       self					:      Optional[int]  )							->     Mapping[str, Mapping[int, str]]:


										"""simple docstring"""





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



from ...utils import logging
from ..ta.modeling_tf_ta import TFTaEncoderModel, TFTaForConditionalGeneration, TFTaModel
from .configuration_mta import MTaConfig


snake_case_						:			List[Any]													=							logging.get_logger(__name__)

snake_case_						:			Optional[Any]													=							'''T5Config'''

class 						A__							(		UpperCamelCase__  ):
						UpperCAmelCase             =						"mt5"
						UpperCAmelCase             =						MTaConfig

class 						A__							(		UpperCamelCase__  ):
						UpperCAmelCase             =						"mt5"
						UpperCAmelCase             =						MTaConfig

class 						A__							(		UpperCamelCase__  ):
						UpperCAmelCase             =						"mt5"
						UpperCAmelCase             =						MTaConfig