




'''simple docstring'''


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


UpperCAmelCase_					=   logging.get_logger(__name__)

UpperCAmelCase_					=   {"ctrl": "https://huggingface.co/ctrl/resolve/main/config.json"}





class  __lowercase    (	__magic_name__			):
   _a    						=   """ctrl"""
   _a    						=   ["""past_key_values"""]
   _a    						=   {
       """max_position_embeddings""": """n_positions""",
       """hidden_size""": """n_embd""",
       """num_attention_heads""": """n_head""",
       """num_hidden_layers""": """n_layer""",
   }







   def __init__(						self   ,				UpperCamelCase=24_6534   ,				UpperCamelCase=256   ,				UpperCamelCase=1280   ,				UpperCamelCase=8192   ,				UpperCamelCase=48   ,				UpperCamelCase=16   ,				UpperCamelCase=0.1   ,				UpperCamelCase=0.1   ,				UpperCamelCase=1e-6   ,				UpperCamelCase=0.02   ,				UpperCamelCase=True   ,				**UpperCamelCase   ,				)					->     int:
     __a								=       vocab_size
     __a								=       n_positions
     __a								=       n_embd
     __a								=       n_layer
     __a								=       n_head
     __a								=       dff
     __a								=       resid_pdrop
     __a								=       embd_pdrop
     __a								=       layer_norm_epsilon
     __a								=       initializer_range

     __a								=       use_cache

     super().__init__(**UpperCamelCase   )









'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


UpperCAmelCase_					=   {
    "configuration_deberta": ["DEBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP", "DebertaConfig", "DebertaOnnxConfig"],
    "tokenization_deberta": ["DebertaTokenizer"],
}

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase_					=   ["DebertaTokenizerFast"]

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase_					=   [
      "DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST",
      "DebertaForMaskedLM",
      "DebertaForQuestionAnswering",
      "DebertaForSequenceClassification",
      "DebertaForTokenClassification",
      "DebertaModel",
      "DebertaPreTrainedModel",
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase_					=   [
      "TF_DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST",
      "TFDebertaForMaskedLM",
      "TFDebertaForQuestionAnswering",
      "TFDebertaForSequenceClassification",
      "TFDebertaForTokenClassification",
      "TFDebertaModel",
      "TFDebertaPreTrainedModel",
  ]


if TYPE_CHECKING:
  from .configuration_deberta import DEBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP, DebertaConfig, DebertaOnnxConfig
  from .tokenization_deberta import DebertaTokenizer

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_deberta_fast import DebertaTokenizerFast

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_deberta import (
        DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
        DebertaForMaskedLM,
        DebertaForQuestionAnswering,
        DebertaForSequenceClassification,
        DebertaForTokenClassification,
        DebertaModel,
        DebertaPreTrainedModel,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_deberta import (
        TF_DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
        TFDebertaForMaskedLM,
        TFDebertaForQuestionAnswering,
        TFDebertaForSequenceClassification,
        TFDebertaForTokenClassification,
        TFDebertaModel,
        TFDebertaPreTrainedModel,
    )


else:
  import sys

  UpperCAmelCase_					=   _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



