

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							:  Dict            =						{
    """xlm-roberta-base""": """https://huggingface.co/xlm-roberta-base/resolve/main/config.json""",
    """xlm-roberta-large""": """https://huggingface.co/xlm-roberta-large/resolve/main/config.json""",
    """xlm-roberta-large-finetuned-conll02-dutch""": (
        """https://huggingface.co/xlm-roberta-large-finetuned-conll02-dutch/resolve/main/config.json"""
    ),
    """xlm-roberta-large-finetuned-conll02-spanish""": (
        """https://huggingface.co/xlm-roberta-large-finetuned-conll02-spanish/resolve/main/config.json"""
    ),
    """xlm-roberta-large-finetuned-conll03-english""": (
        """https://huggingface.co/xlm-roberta-large-finetuned-conll03-english/resolve/main/config.json"""
    ),
    """xlm-roberta-large-finetuned-conll03-german""": (
        """https://huggingface.co/xlm-roberta-large-finetuned-conll03-german/resolve/main/config.json"""
    ),
}



class   __lowercase    (			snake_case_     ):




			"""simple docstring"""







			_UpperCAmelCase       :							Union[str, Any]      							=					'''xlm-roberta'''




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

									SCREAMING_SNAKE_CASE_:			Optional[int]  		=	vocab_size
									SCREAMING_SNAKE_CASE_:			Optional[int]  		=	hidden_size
									SCREAMING_SNAKE_CASE_:			Dict  		=	num_hidden_layers
									SCREAMING_SNAKE_CASE_:			str  		=	num_attention_heads
									SCREAMING_SNAKE_CASE_:			Tuple  		=	hidden_act
									SCREAMING_SNAKE_CASE_:			Optional[int]  		=	intermediate_size
									SCREAMING_SNAKE_CASE_:			int  		=	hidden_dropout_prob
									SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	attention_probs_dropout_prob
									SCREAMING_SNAKE_CASE_:			List[str]  		=	max_position_embeddings
									SCREAMING_SNAKE_CASE_:			Optional[int]  		=	type_vocab_size
									SCREAMING_SNAKE_CASE_:			str  		=	initializer_range
									SCREAMING_SNAKE_CASE_:			Dict  		=	layer_norm_eps
									SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	position_embedding_type
									SCREAMING_SNAKE_CASE_:			int  		=	use_cache
									SCREAMING_SNAKE_CASE_:			List[str]  		=	classifier_dropout







class   __lowercase    (			snake_case_     ):




			"""simple docstring"""







			@property
			def 	_SCREAMING_SNAKE_CASE      (			self  :					Any):
									if self.task == "multiple-choice":
															SCREAMING_SNAKE_CASE_:			List[str]  		=	{0: "batch", 1: "choice", 2: "sequence"}
									else:
															SCREAMING_SNAKE_CASE_:			Dict  		=	{0: "batch", 1: "sequence"}
									return OrderedDict(
									    [
									        ("input_ids", dynamic_axis),
									        ("attention_mask", dynamic_axis),
									    ])









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


lowerCAmelCase							:  Optional[int]            =						logging.get_logger(__name__)

lowerCAmelCase							:  int            =						{
    """google/fnet-base""": """https://huggingface.co/google/fnet-base/resolve/main/config.json""",
    """google/fnet-large""": """https://huggingface.co/google/fnet-large/resolve/main/config.json"""
    # See all FNet models at https://huggingface.co/models?filter=fnet
}



class   __lowercase    (			UpperCAmelCase_     ):




			"""simple docstring"""







			_UpperCAmelCase       :							int      							=					'''fnet'''



			def __init__(			self  :					Optional[Any]       ,						lowerCAmelCase__  :					List[str]=3_2000       ,						lowerCAmelCase__  :					Union[str, Any]=768       ,						lowerCAmelCase__  :					Optional[Any]=12       ,						lowerCAmelCase__  :					Tuple=3072       ,						lowerCAmelCase__  :					Any="gelu_new"       ,						lowerCAmelCase__  :					Union[str, Any]=0.1       ,						lowerCAmelCase__  :					Optional[Any]=512       ,						lowerCAmelCase__  :					int=4       ,						lowerCAmelCase__  :					List[Any]=0.02       ,						lowerCAmelCase__  :					Union[str, Any]=1E-12       ,						lowerCAmelCase__  :					Optional[int]=False       ,						lowerCAmelCase__  :					Any=512       ,						lowerCAmelCase__  :					Optional[int]=3       ,						lowerCAmelCase__  :					int=1       ,						lowerCAmelCase__  :					List[Any]=2       ,						**lowerCAmelCase__  :					Optional[int]       ,						):
									super().__init__(pad_token_id=lowerCAmelCase__       ,						bos_token_id=lowerCAmelCase__       ,						eos_token_id=lowerCAmelCase__       ,						**lowerCAmelCase__)

									SCREAMING_SNAKE_CASE_:			str  		=	vocab_size
									SCREAMING_SNAKE_CASE_:			Optional[Any]  		=	max_position_embeddings
									SCREAMING_SNAKE_CASE_:			Tuple  		=	hidden_size
									SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	num_hidden_layers
									SCREAMING_SNAKE_CASE_:			Optional[int]  		=	intermediate_size
									SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	hidden_act
									SCREAMING_SNAKE_CASE_:			Any  		=	hidden_dropout_prob
									SCREAMING_SNAKE_CASE_:			int  		=	initializer_range
									SCREAMING_SNAKE_CASE_:			Optional[int]  		=	type_vocab_size
									SCREAMING_SNAKE_CASE_:			int  		=	layer_norm_eps
									SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	use_tpu_fourier_optimizations
									SCREAMING_SNAKE_CASE_:			int  		=	tpu_short_seq_length






