

from collections import OrderedDict
from typing import Mapping

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


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

UpperCAmelCase__			:  Any					     =     {
    """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 							a__							( UpperCAmelCase							):







  """simple docstring"""




  UpperCAmelCase__   :			Union[str, Any]      							="""electra"""


  def __init__(      self     :			Dict					,					UpperCAmelCase__     :			Optional[int]=3_0_5_2_2					,					UpperCAmelCase__     :			str=1_2_8					,					UpperCAmelCase__     :			Optional[int]=2_5_6					,					UpperCAmelCase__     :			List[str]=1_2					,					UpperCAmelCase__     :			Tuple=4					,					UpperCAmelCase__     :			List[str]=1_0_2_4					,					UpperCAmelCase__     :			Optional[int]="gelu"					,					UpperCAmelCase__     :			List[str]=0.1					,					UpperCAmelCase__     :			str=0.1					,					UpperCAmelCase__     :			Optional[int]=5_1_2					,					UpperCAmelCase__     :			Optional[Any]=2					,					UpperCAmelCase__     :			str=0.02					,					UpperCAmelCase__     :			Dict=1e-12					,					UpperCAmelCase__     :			List[str]="first"					,					UpperCAmelCase__     :			Union[str, Any]=True					,					UpperCAmelCase__     :			Tuple="gelu"					,					UpperCAmelCase__     :			str=0.1					,					UpperCAmelCase__     :			str=0					,					UpperCAmelCase__     :			Optional[Any]="absolute"					,					UpperCAmelCase__     :			Any=True					,					UpperCAmelCase__     :			Tuple=None					,					**UpperCAmelCase__     :			List[str]					,					)       ->int:
        """simple docstring"""







        super().__init__(pad_token_id=UpperCAmelCase__					,					**UpperCAmelCase__		)

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

        SCREAMING_SNAKE_CASE			:   Optional[int]	  = summary_type
        SCREAMING_SNAKE_CASE			:   List[Any]	  = summary_use_proj
        SCREAMING_SNAKE_CASE			:   Tuple	  = summary_activation
        SCREAMING_SNAKE_CASE			:   Optional[int]	  = summary_last_dropout
        SCREAMING_SNAKE_CASE			:   Optional[int]	  = position_embedding_type
        SCREAMING_SNAKE_CASE			:   Dict	  = use_cache
        SCREAMING_SNAKE_CASE			:   str	  = classifier_dropout







class 							a__							( UpperCAmelCase							):







  """simple docstring"""




  @property
  def 			_lowercase   (      self     :			str		)       ->Mapping[str, Mapping[int, str]]:
        """simple docstring"""







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







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCAmelCase__			:  Optional[Any]					     =     {
    """configuration_musicgen""": [
        """MUSICGEN_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """MusicgenConfig""",
        """MusicgenDecoderConfig""",
    ],
    """processing_musicgen""": ["""MusicgenProcessor"""],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase__			:  Any					     =     [
      """MUSICGEN_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """MusicgenForConditionalGeneration""",
      """MusicgenForCausalLM""",
      """MusicgenModel""",
      """MusicgenPreTrainedModel""",
  ]

if TYPE_CHECKING:
  from .configuration_musicgen import (
      MUSICGEN_PRETRAINED_CONFIG_ARCHIVE_MAP,
      MusicgenConfig,
      MusicgenDecoderConfig,
  )
  from .processing_musicgen import MusicgenProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_musicgen import (
        MUSICGEN_PRETRAINED_MODEL_ARCHIVE_LIST,
        MusicgenForCausalLM,
        MusicgenForConditionalGeneration,
        MusicgenModel,
        MusicgenPreTrainedModel,
    )

else:
  import sys

  UpperCAmelCase__			:  Dict					     =     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




