






"""simple docstring"""





from typing import TYPE_CHECKING

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


UpperCamelCase_	:				Any										= {"""configuration_plbart""": ["""PLBART_PRETRAINED_CONFIG_ARCHIVE_MAP""", """PLBartConfig"""]}

try:
 if not is_sentencepiece_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCamelCase_	:				Tuple										= ["""PLBartTokenizer"""]

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCamelCase_	:				Any										= [
     """PLBART_PRETRAINED_MODEL_ARCHIVE_LIST""",
     """PLBartForCausalLM""",
     """PLBartForConditionalGeneration""",
     """PLBartForSequenceClassification""",
     """PLBartModel""",
     """PLBartPreTrainedModel""",
 ]


if TYPE_CHECKING:
 from .configuration_plbart import PLBART_PRETRAINED_CONFIG_ARCHIVE_MAP, PLBartConfig

 try:
  if not is_sentencepiece_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_plbart import PLBartTokenizer

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_plbart import (
      PLBART_PRETRAINED_MODEL_ARCHIVE_LIST,
      PLBartForCausalLM,
      PLBartForConditionalGeneration,
      PLBartForSequenceClassification,
      PLBartModel,
      PLBartPreTrainedModel,
  )


else:
 import sys

 UpperCamelCase_	:				List[Any]										= _LazyModule(__name__, globals()["""__file__"""], _import_structure)










"""simple docstring"""





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


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

UpperCamelCase_	:				Union[str, Any]										= {"""ctrl""": """https://huggingface.co/ctrl/resolve/main/config.json"""}


class      _lowercase (     lowerCAmelCase						):
      _a   :     str								=   '''ctrl'''
      _a   :     Optional[int]								=   ['''past_key_values''']
      _a   :     List[Any]								=   {
          '''max_position_embeddings''': '''n_positions''',
          '''hidden_size''': '''n_embd''',
          '''num_attention_heads''': '''n_head''',
          '''num_hidden_layers''': '''n_layer''',
      }


      def __init__(    self				:	str							,   a				:	Optional[int]=2_4_6_5_3_4							,   a				:	Optional[int]=2_5_6							,   a				:	Optional[int]=1_2_8_0							,   a				:	Any=8_1_9_2							,   a				:	int=4_8							,   a				:	Optional[Any]=1_6							,   a				:	str=0.1							,   a				:	str=0.1							,   a				:	Any=1e-6							,   a				:	Optional[int]=0.0_2							,   a				:	int=True							,   **a				:	str							,   ):





            """simple docstring"""







            __snake_case      :    Tuple  			=vocab_size
            __snake_case      :    Optional[Any]  			=n_positions
            __snake_case      :    List[Any]  			=n_embd
            __snake_case      :    Any  			=n_layer
            __snake_case      :    Any  			=n_head
            __snake_case      :    str  			=dff
            __snake_case      :    List[str]  			=resid_pdrop
            __snake_case      :    str  			=embd_pdrop
            __snake_case      :    Union[str, Any]  			=layer_norm_epsilon
            __snake_case      :    List[Any]  			=initializer_range

            __snake_case      :    Any  			=use_cache

            super().__init__(**a						)


