"""simple docstring"""
import copy

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


lowercase__   			=      logging.get_logger(__name__)

lowercase__   			=      {}




class   __snake_case			(	__lowerCAmelCase							):
      a__								=						"""fsmt_decoder"""



      def __init__(		self       ,     lowercase=0       ,     lowercase=0)      ->     Optional[int]:





        '''simple docstring'''





        super().__init__()
        a__:	Dict     				=      vocab_size
        a__:	str     				=      bos_token_id







class   __snake_case			(	__lowerCAmelCase							):
      a__								=						"""fsmt"""
      a__								=						{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}



      def __init__(		self       ,     lowercase=["en", "de"]       ,     lowercase=4_20_24       ,     lowercase=4_20_24       ,     lowercase="relu"       ,     lowercase=10_24       ,     lowercase=2_00       ,     lowercase=10_24       ,     lowercase=40_96       ,     lowercase=12       ,     lowercase=16       ,     lowercase=0.0       ,     lowercase=40_96       ,     lowercase=12       ,     lowercase=16       ,     lowercase=0.0       ,     lowercase=0.0       ,     lowercase=0.1       ,     lowercase=0.0       ,     lowercase=0.02       ,     lowercase=2       ,     lowercase=True       ,     lowercase=True       ,     lowercase=False       ,     lowercase=5       ,     lowercase=1.0       ,     lowercase=False       ,     lowercase=True       ,     lowercase=1       ,     lowercase=0       ,     lowercase=2       ,     lowercase=2       ,     **lowercase       ,     )      ->     List[Any]:





        '''simple docstring'''





        a__:	Optional[int]     				=      langs
        a__:	Union[str, Any]     				=      src_vocab_size
        a__:	Tuple     				=      tgt_vocab_size
        a__:	Optional[Any]     				=      d_model  # encoder_embed_dim and decoder_embed_dim

        a__:	str     				=      encoder_ffn_dim
        a__:	Optional[int]     				=      encoder_layers
        a__:	Dict     				=      encoder_attention_heads
        a__:	Optional[int]     				=      encoder_layerdrop
        a__:	Dict     				=      decoder_layerdrop
        a__:	Union[str, Any]     				=      decoder_ffn_dim
        a__:	List[Any]     				=      decoder_layers
        a__:	Dict     				=      decoder_attention_heads
        a__:	List[str]     				=      max_position_embeddings
        a__:	Optional[Any]     				=      init_std  # Normal(0, this parameter)
        a__:	Optional[Any]     				=      activation_function

        a__:	List[Any]     				=      DecoderConfig(vocab_size=lowercase       ,     bos_token_id=lowercase)
        if "decoder" in common_kwargs:
          del common_kwargs["decoder"]

        a__:	List[str]     				=      scale_embedding  # scale factor will be sqrt(d_model) if True

        # 3 Types of Dropout
        a__:	Dict     				=      attention_dropout
        a__:	Union[str, Any]     				=      activation_dropout
        a__:	List[Any]     				=      dropout

        a__:	Optional[int]     				=      use_cache
        super().__init__(
            pad_token_id=lowercase       ,     bos_token_id=lowercase       ,     eos_token_id=lowercase       ,     decoder_start_token_id=lowercase       ,     is_encoder_decoder=lowercase       ,     tie_word_embeddings=lowercase       ,     forced_eos_token_id=lowercase       ,     max_length=lowercase       ,     num_beams=lowercase       ,     length_penalty=lowercase       ,     early_stopping=lowercase       ,     **lowercase       ,     )



      def     lowerCamelCase_  (		self)      ->     List[str]:





        '''simple docstring'''





        a__:	Optional[Any]     				=      copy.deepcopy(self.__dict__)
        a__:	str     				=      self.decoder.to_dict()
        a__:	int     				=      self.__class__.model_type
        return output





from collections import OrderedDict
from typing import Mapping

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


__A	:   List[Any]	=					logging.get_logger(__name__)

__A	:   Tuple	=					{
    'google/electra-small-generator': 'https://huggingface.co/google/electra-small-generator/resolve/main/config.json',
    'google/electra-base-generator': 'https://huggingface.co/google/electra-base-generator/resolve/main/config.json',
    'google/electra-large-generator': 'https://huggingface.co/google/electra-large-generator/resolve/main/config.json',
    'google/electra-small-discriminator': (
        'https://huggingface.co/google/electra-small-discriminator/resolve/main/config.json'
    ),
    'google/electra-base-discriminator': (
        'https://huggingface.co/google/electra-base-discriminator/resolve/main/config.json'
    ),
    'google/electra-large-discriminator': (
        'https://huggingface.co/google/electra-large-discriminator/resolve/main/config.json'
    ),
}


class 			_SCREAMING_SNAKE_CASE      (  lowerCAmelCase__):
						_UpperCamelCase:Tuple	=		"electra"







						def __init__(			self     ,						_SCREAMING_SNAKE_CASE=3_0522     ,						_SCREAMING_SNAKE_CASE=128     ,						_SCREAMING_SNAKE_CASE=256     ,						_SCREAMING_SNAKE_CASE=12     ,						_SCREAMING_SNAKE_CASE=4     ,						_SCREAMING_SNAKE_CASE=1024     ,						_SCREAMING_SNAKE_CASE="gelu"     ,						_SCREAMING_SNAKE_CASE=0.1     ,						_SCREAMING_SNAKE_CASE=0.1     ,						_SCREAMING_SNAKE_CASE=512     ,						_SCREAMING_SNAKE_CASE=2     ,						_SCREAMING_SNAKE_CASE=0.0_2     ,						_SCREAMING_SNAKE_CASE=1E-12     ,						_SCREAMING_SNAKE_CASE="first"     ,						_SCREAMING_SNAKE_CASE=True     ,						_SCREAMING_SNAKE_CASE="gelu"     ,						_SCREAMING_SNAKE_CASE=0.1     ,						_SCREAMING_SNAKE_CASE=0     ,						_SCREAMING_SNAKE_CASE="absolute"     ,						_SCREAMING_SNAKE_CASE=True     ,						_SCREAMING_SNAKE_CASE=None     ,						**_SCREAMING_SNAKE_CASE     ,						)->							Optional[int]:
													super().__init__(pad_token_id=_SCREAMING_SNAKE_CASE     ,						**_SCREAMING_SNAKE_CASE							)

													lowerCamelCase_								=vocab_size
													lowerCamelCase_								=embedding_size
													lowerCamelCase_								=hidden_size
													lowerCamelCase_								=num_hidden_layers
													lowerCamelCase_								=num_attention_heads
													lowerCamelCase_								=intermediate_size
													lowerCamelCase_								=hidden_act
													lowerCamelCase_								=hidden_dropout_prob
													lowerCamelCase_								=attention_probs_dropout_prob
													lowerCamelCase_								=max_position_embeddings
													lowerCamelCase_								=type_vocab_size
													lowerCamelCase_								=initializer_range
													lowerCamelCase_								=layer_norm_eps

													lowerCamelCase_								=summary_type
													lowerCamelCase_								=summary_use_proj
													lowerCamelCase_								=summary_activation
													lowerCamelCase_								=summary_last_dropout
													lowerCamelCase_								=position_embedding_type
													lowerCamelCase_								=use_cache
													lowerCamelCase_								=classifier_dropout


class 			_SCREAMING_SNAKE_CASE      (  lowerCAmelCase__):







						@property
						def        _snake_case				(			self							)->							Mapping[str, Mapping[int, str]]:
													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),
													        ("""token_type_ids""", dynamic_axis),
													    ]							)
