





from collections import OrderedDict
from typing import Mapping

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


snake_case__									=				logging.get_logger(__name__)

snake_case__									=				{
    '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  __A   (   A__			):

			'''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	,  __lowerCAmelCase=False	,  __lowerCAmelCase=0.0	,  __lowerCAmelCase=3_0_1_4_5	,  __lowerCAmelCase=2_0_4_8	,  __lowerCAmelCase=1_2	,  __lowerCAmelCase=1_6	,  __lowerCAmelCase=0.1	,  __lowerCAmelCase=0.1	,  __lowerCAmelCase=True	,  __lowerCAmelCase=False	,  __lowerCAmelCase=False	,  __lowerCAmelCase=False	,  __lowerCAmelCase=1	,  __lowerCAmelCase=True	,  __lowerCAmelCase=5_1_2	,  __lowerCAmelCase=2_0_4_8**-0.5	,  __lowerCAmelCase=1E-12	,  __lowerCAmelCase=0.02	,  __lowerCAmelCase=0	,  __lowerCAmelCase=1	,  __lowerCAmelCase=2	,  __lowerCAmelCase=3	,  __lowerCAmelCase=5	,  __lowerCAmelCase=True	,  __lowerCAmelCase="first"	,  __lowerCAmelCase=True	,  __lowerCAmelCase=None	,  __lowerCAmelCase=True	,  __lowerCAmelCase=0.1	,  __lowerCAmelCase=5	,  __lowerCAmelCase=5	,  __lowerCAmelCase=0	,  __lowerCAmelCase=0	,  __lowerCAmelCase=2	,  __lowerCAmelCase=0	,  **__lowerCAmelCase	,  ):



				'''simple docstring'''







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

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

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






class  __A   (   A__			):

			'''simple docstring'''







			@property
			def 		__lowerCamelCase    (   self							):



				'''simple docstring'''







				if self.task == "multiple-choice":
					lowerCamelCase__        =		{0: '''batch''', 1: '''choice''', 2: '''sequence'''}
				else:
					lowerCamelCase__        =		{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									=				{
    "google/pegasus-x-base": "https://huggingface.co/google/pegasus-x-base/resolve/main/config.json",
    "google/pegasus-x-large": "https://huggingface.co/google/pegasus-x-large/resolve/main/config.json",
    # See all PEGASUS-X models at https://huggingface.co/models?filter=pegasus-x
}






class  __A   (   lowerCAmelCase			):

			'''simple docstring'''







			lowerCAmelCase_												=						"""pegasus_x"""
			lowerCAmelCase_												=						["""past_key_values"""]
			lowerCAmelCase_												=						{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}





			def __init__(   self	,  __lowerCAmelCase=9_6_1_0_3	,  __lowerCAmelCase=1_6_3_8_4	,  __lowerCAmelCase=1_6	,  __lowerCAmelCase=4_0_9_6	,  __lowerCAmelCase=1_6	,  __lowerCAmelCase=1_6	,  __lowerCAmelCase=4_0_9_6	,  __lowerCAmelCase=1_6	,  __lowerCAmelCase=0.0	,  __lowerCAmelCase=0.0	,  __lowerCAmelCase=True	,  __lowerCAmelCase=True	,  __lowerCAmelCase="gelu"	,  __lowerCAmelCase=1_0_2_4	,  __lowerCAmelCase=0.1	,  __lowerCAmelCase=0.0	,  __lowerCAmelCase=0.0	,  __lowerCAmelCase=0.02	,  __lowerCAmelCase=0	,  __lowerCAmelCase=True	,  __lowerCAmelCase=0	,  __lowerCAmelCase=1	,  __lowerCAmelCase=1	,  __lowerCAmelCase=3_2	,  __lowerCAmelCase=5_1_2	,  __lowerCAmelCase=True	,  **__lowerCAmelCase	,  ):



				'''simple docstring'''







				lowerCamelCase__        =		vocab_size
				lowerCamelCase__        =		max_position_embeddings
				lowerCamelCase__        =		d_model
				lowerCamelCase__        =		encoder_ffn_dim
				lowerCamelCase__        =		encoder_layers
				lowerCamelCase__        =		encoder_attention_heads
				lowerCamelCase__        =		decoder_ffn_dim
				lowerCamelCase__        =		decoder_layers
				lowerCamelCase__        =		decoder_attention_heads
				lowerCamelCase__        =		dropout
				lowerCamelCase__        =		attention_dropout
				lowerCamelCase__        =		activation_dropout
				lowerCamelCase__        =		activation_function
				lowerCamelCase__        =		init_std
				lowerCamelCase__        =		encoder_layerdrop
				lowerCamelCase__        =		decoder_layerdrop
				lowerCamelCase__        =		use_cache
				lowerCamelCase__        =		encoder_layers
				lowerCamelCase__        =		scale_embedding  # scale factor will be sqrt(d_model) if True

				lowerCamelCase__        =		num_global_tokens
				lowerCamelCase__        =		block_size
				lowerCamelCase__        =		stagger_local_blocks

				super().__init__(
				    pad_token_id=__lowerCAmelCase	,  eos_token_id=__lowerCAmelCase	,  is_encoder_decoder=__lowerCAmelCase	,  decoder_start_token_id=__lowerCAmelCase	,  forced_eos_token_id=__lowerCAmelCase	,  **__lowerCAmelCase	,  )





			@property
			def 		__lowerCamelCase    (   self							):



				'''simple docstring'''







				return self.encoder_attention_heads





			@property
			def 		__lowerCamelCase    (   self							):



				'''simple docstring'''







				return self.d_model



