

from collections import OrderedDict
from typing import Mapping

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


a_         =      logging.get_logger(__name__)

a_         =      {
    'flaubert/flaubert_small_cased': 'https://huggingface.co/flaubert/flaubert_small_cased/resolve/main/config.json',
    'flaubert/flaubert_base_uncased': 'https://huggingface.co/flaubert/flaubert_base_uncased/resolve/main/config.json',
    'flaubert/flaubert_base_cased': 'https://huggingface.co/flaubert/flaubert_base_cased/resolve/main/config.json',
    'flaubert/flaubert_large_cased': 'https://huggingface.co/flaubert/flaubert_large_cased/resolve/main/config.json',
}






class _UpperCamelCase							(							lowerCAmelCase__				):
			'''simple docstring'''







			lowerCamelCase__          ='''flaubert'''
			lowerCamelCase__          ={
			    '''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 , a							:	Dict=False , a							:	str=0.0 , a							:	List[str]=3_0145 , a							:	Optional[Any]=2048 , a							:	Optional[int]=12 , a							:	Dict=16 , a							:	Tuple=0.1 , a							:	int=0.1 , a							:	Optional[Any]=True , a							:	int=False , a							:	Tuple=False , a							:	Dict=False , a							:	Dict=1 , a							:	int=True , a							:	List[Any]=512 , a							:	Optional[Any]=2048**-0.5 , a							:	str=1e-12 , a							:	Tuple=0.02 , a							:	Union[str, Any]=0 , a							:	Tuple=1 , a							:	Dict=2 , a							:	Union[str, Any]=3 , a							:	Any=5 , a							:	List[str]=True , a							:	List[Any]="first" , a							:	Any=True , a							:	int=None , a							:	str=True , a							:	Union[str, Any]=0.1 , a							:	Dict=5 , a							:	Optional[Any]=5 , a							:	List[str]=0 , a							:	Optional[Any]=0 , a							:	Optional[int]=2 , a							:	List[Any]=0 , **a							:	Tuple , )							->    Dict:

				"""simple docstring"""

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

				if "n_words" in kwargs:
					SCREAMING_SNAKE_CASE				: List[Any]			       =    kwargs["n_words"]

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






class _UpperCamelCase							(							lowerCAmelCase__				):
			'''simple docstring'''







			@property
			def 							__UpperCamelCase	(     self							:	int		)							->    int:

				"""simple docstring"""

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


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


a_         =      logging.get_logger(__name__)

a_         =      {
    'microsoft/mpnet-base': 'https://huggingface.co/microsoft/mpnet-base/resolve/main/config.json',
}






class _UpperCamelCase							(							__A				):
			'''simple docstring'''







			lowerCamelCase__          ='mpnet'
			def __init__(     self							:	Optional[int] , a							:	Dict=3_0527 , a							:	Optional[int]=768 , a							:	List[str]=12 , a							:	List[str]=12 , a							:	str=3072 , a							:	Optional[int]="gelu" , a							:	Tuple=0.1 , a							:	Optional[int]=0.1 , a							:	Optional[Any]=512 , a							:	List[Any]=0.02 , a							:	str=1e-12 , a							:	Optional[Any]=32 , a							:	int=1 , a							:	Union[str, Any]=0 , a							:	List[str]=2 , **a							:	Optional[int] , )							->    Union[str, Any]:

				"""simple docstring"""

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

				SCREAMING_SNAKE_CASE				: Tuple			       =    vocab_size
				SCREAMING_SNAKE_CASE				: Any			       =    hidden_size
				SCREAMING_SNAKE_CASE				: int			       =    num_hidden_layers
				SCREAMING_SNAKE_CASE				: Any			       =    num_attention_heads
				SCREAMING_SNAKE_CASE				: Tuple			       =    hidden_act
				SCREAMING_SNAKE_CASE				: Tuple			       =    intermediate_size
				SCREAMING_SNAKE_CASE				: Optional[int]			       =    hidden_dropout_prob
				SCREAMING_SNAKE_CASE				: List[str]			       =    attention_probs_dropout_prob
				SCREAMING_SNAKE_CASE				: Dict			       =    max_position_embeddings
				SCREAMING_SNAKE_CASE				: Union[str, Any]			       =    initializer_range
				SCREAMING_SNAKE_CASE				: Any			       =    layer_norm_eps
				SCREAMING_SNAKE_CASE				: Optional[Any]			       =    relative_attention_num_buckets