





'''simple docstring'''






from collections import OrderedDict
from typing import Mapping

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


__UpperCamelCase					    =	logging.get_logger(__name__)

__UpperCamelCase					    =	{
    "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 (					__lowercase		):
		lowercase__:   int				     =   '''xlm'''
		lowercase__:   Dict				     =   {
		    '''hidden_size''': '''emb_dim''',
		    '''num_attention_heads''': '''n_heads''',
		    '''num_hidden_layers''': '''n_layers''',
		    '''n_words''': '''vocab_size''',  # For backward compatibility
		}

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


					"""simple docstring"""

					__snake_case					:      List[Any]							      =     vocab_size
					__snake_case					:      List[Any]							      =     emb_dim
					__snake_case					:      Tuple							      =     n_layers
					__snake_case					:      Union[str, Any]							      =     n_heads
					__snake_case					:      Optional[int]							      =     dropout
					__snake_case					:      Dict							      =     attention_dropout
					__snake_case					:      Tuple							      =     gelu_activation
					__snake_case					:      Any							      =     sinusoidal_embeddings
					__snake_case					:      List[Any]							      =     causal
					__snake_case					:      Dict							      =     asm
					__snake_case					:      Optional[Any]							      =     n_langs
					__snake_case					:      Any							      =     use_lang_emb
					__snake_case					:      int							      =     layer_norm_eps
					__snake_case					:      List[Any]							      =     bos_index
					__snake_case					:      Any							      =     eos_index
					__snake_case					:      Union[str, Any]							      =     pad_index
					__snake_case					:      Optional[Any]							      =     unk_index
					__snake_case					:      List[Any]							      =     mask_index
					__snake_case					:      Union[str, Any]							      =     is_encoder
					__snake_case					:      Optional[int]							      =     max_position_embeddings
					__snake_case					:      int							      =     embed_init_std
					__snake_case					:      Dict							      =     init_std
					__snake_case					:      Any							      =     summary_type
					__snake_case					:      int							      =     summary_use_proj
					__snake_case					:      Any							      =     summary_activation
					__snake_case					:      Any							      =     summary_proj_to_labels
					__snake_case					:      List[str]							      =     summary_first_dropout
					__snake_case					:      List[Any]							      =     start_n_top
					__snake_case					:      List[Any]							      =     end_n_top
					__snake_case					:      str							      =     mask_token_id
					__snake_case					:      List[Any]							      =     lang_id

					if "n_words" in kwargs:
								__snake_case					:      int							      =     kwargs["""n_words"""]

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





class  _A (					__lowercase		):

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


					"""simple docstring"""

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



from ...configuration_utils import PretrainedConfig
from ...utils import logging


SCREAMING_SNAKE_CASE			:						int				  =		logging.get_logger(__name__)

SCREAMING_SNAKE_CASE			:						Dict				  =		{
    """google/canine-s""": """https://huggingface.co/google/canine-s/resolve/main/config.json""",
    # See all CANINE models at https://huggingface.co/models?filter=canine
}
class  A_			(							a_			):
  _SCREAMING_SNAKE_CASE     					=      """canine"""

  def __init__(		self			:   int  ,				__SCREAMING_SNAKE_CASE			:   List[str]=7_68  ,				__SCREAMING_SNAKE_CASE			:   Any=12  ,				__SCREAMING_SNAKE_CASE			:   str=12  ,				__SCREAMING_SNAKE_CASE			:   int=30_72  ,				__SCREAMING_SNAKE_CASE			:   int="gelu"  ,				__SCREAMING_SNAKE_CASE			:   Optional[int]=0.1  ,				__SCREAMING_SNAKE_CASE			:   List[str]=0.1  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=1_63_84  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=16  ,				__SCREAMING_SNAKE_CASE			:   int=0.02  ,				__SCREAMING_SNAKE_CASE			:   Optional[Any]=1E-12  ,				__SCREAMING_SNAKE_CASE			:   Union[str, Any]=0  ,				__SCREAMING_SNAKE_CASE			:   List[str]=0xE000  ,				__SCREAMING_SNAKE_CASE			:   int=0xE001  ,				__SCREAMING_SNAKE_CASE			:   Optional[int]=4  ,				__SCREAMING_SNAKE_CASE			:   Optional[Any]=4  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=8  ,				__SCREAMING_SNAKE_CASE			:   List[str]=1_63_84  ,				__SCREAMING_SNAKE_CASE			:   Optional[Any]=1_28  ,				**__SCREAMING_SNAKE_CASE			:   List[str]  ,				):
   super().__init__(pad_token_id=__SCREAMING_SNAKE_CASE  ,				bos_token_id=__SCREAMING_SNAKE_CASE  ,				eos_token_id=__SCREAMING_SNAKE_CASE  ,				**__SCREAMING_SNAKE_CASE							)

   __a							=	max_position_embeddings
   __a							=	hidden_size
   __a							=	num_hidden_layers
   __a							=	num_attention_heads
   __a							=	intermediate_size
   __a							=	hidden_act
   __a							=	hidden_dropout_prob
   __a							=	attention_probs_dropout_prob
   __a							=	initializer_range
   __a							=	type_vocab_size
   __a							=	layer_norm_eps

   # Character config:
   __a							=	downsampling_rate
   __a							=	upsampling_kernel_size
   __a							=	num_hash_functions
   __a							=	num_hash_buckets
   __a							=	local_transformer_stride


