


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        lowerCamelCase__	(							UpperCAmelCase      ):






			"""simple docstring"""






			_UpperCamelCase		:					Optional[Any]    =		'xlm'
			_UpperCamelCase		:					Optional[Any]    =		{
			    'hidden_size': 'emb_dim',
			    'num_attention_heads': 'n_heads',
			    'num_hidden_layers': 'n_layers',
			    'n_words': 'vocab_size',  # For backward compatibility
			}




			def __init__(							self      ,						snake_case=30145      ,						snake_case=2048      ,						snake_case=12      ,						snake_case=16      ,						snake_case=0.1      ,						snake_case=0.1      ,						snake_case=True      ,						snake_case=False      ,						snake_case=False      ,						snake_case=False      ,						snake_case=1      ,						snake_case=True      ,						snake_case=512      ,						snake_case=2048**-0.5      ,						snake_case=1E-1_2      ,						snake_case=0.02      ,						snake_case=0      ,						snake_case=1      ,						snake_case=2      ,						snake_case=3      ,						snake_case=5      ,						snake_case=True      ,						snake_case="first"      ,						snake_case=True      ,						snake_case=None      ,						snake_case=True      ,						snake_case=0.1      ,						snake_case=5      ,						snake_case=5      ,						snake_case=0      ,						snake_case=0      ,						snake_case=2      ,						snake_case=0      ,						**snake_case      ,						):

						'''simple docstring'''


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

						if "n_words" in kwargs:
									UpperCamelCase__					=       kwargs["n_words"]

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







class        lowerCamelCase__	(							UpperCAmelCase      ):






			"""simple docstring"""






			@property
			def 				snake_case__				(							self     ):

						'''simple docstring'''


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






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    		=       {
    'kssteven/ibert-roberta-base': 'https://huggingface.co/kssteven/ibert-roberta-base/resolve/main/config.json',
    'kssteven/ibert-roberta-large': 'https://huggingface.co/kssteven/ibert-roberta-large/resolve/main/config.json',
    'kssteven/ibert-roberta-large-mnli': (
        'https://huggingface.co/kssteven/ibert-roberta-large-mnli/resolve/main/config.json'
    ),
}







class        lowerCamelCase__	(							UpperCAmelCase      ):






			"""simple docstring"""






			_UpperCamelCase		:					Any    =		'ibert'




			def __init__(							self      ,						snake_case=30522      ,						snake_case=768      ,						snake_case=12      ,						snake_case=12      ,						snake_case=3072      ,						snake_case="gelu"      ,						snake_case=0.1      ,						snake_case=0.1      ,						snake_case=512      ,						snake_case=2      ,						snake_case=0.02      ,						snake_case=1E-1_2      ,						snake_case=1      ,						snake_case=0      ,						snake_case=2      ,						snake_case="absolute"      ,						snake_case=False      ,						snake_case="none"      ,						**snake_case      ,						):

						'''simple docstring'''


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

						UpperCamelCase__					=       vocab_size
						UpperCamelCase__					=       hidden_size
						UpperCamelCase__					=       num_hidden_layers
						UpperCamelCase__					=       num_attention_heads
						UpperCamelCase__					=       hidden_act
						UpperCamelCase__					=       intermediate_size
						UpperCamelCase__					=       hidden_dropout_prob
						UpperCamelCase__					=       attention_probs_dropout_prob
						UpperCamelCase__					=       max_position_embeddings
						UpperCamelCase__					=       type_vocab_size
						UpperCamelCase__					=       initializer_range
						UpperCamelCase__					=       layer_norm_eps
						UpperCamelCase__					=       position_embedding_type
						UpperCamelCase__					=       quant_mode
						UpperCamelCase__					=       force_dequant







class        lowerCamelCase__	(							UpperCAmelCase      ):






			"""simple docstring"""






			@property
			def 				snake_case__				(							self     ):

						'''simple docstring'''


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


