





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


_lowerCamelCase			       =      logging.get_logger(__name__)

_lowerCamelCase			       =      {'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}







class 			__A       (      lowerCamelCase__  ):




      """simple docstring"""







      UpperCAmelCase__						=      """openai-gpt"""
      UpperCAmelCase__						=      {
          """max_position_embeddings""": """n_positions""",
          """hidden_size""": """n_embd""",
          """num_attention_heads""": """n_head""",
          """num_hidden_layers""": """n_layer""",
      }


      def __init__(		self      ,							a__=4_0478      ,							a__=512      ,							a__=768      ,							a__=12      ,							a__=12      ,							a__="gelu"      ,							a__=0.1      ,							a__=0.1      ,							a__=0.1      ,							a__=1e-5      ,							a__=0.02      ,							a__="cls_index"      ,							a__=True      ,							a__=None      ,							a__=True      ,							a__=0.1      ,							**a__      ,							):



             """simple docstring"""





             _lowerCamelCase							:     List[str]	=		vocab_size
             _lowerCamelCase							:     Optional[Any]	=		n_positions
             _lowerCamelCase							:     List[Any]	=		n_embd
             _lowerCamelCase							:     Optional[int]	=		n_layer
             _lowerCamelCase							:     Any	=		n_head
             _lowerCamelCase							:     List[Any]	=		afn
             _lowerCamelCase							:     Optional[Any]	=		resid_pdrop
             _lowerCamelCase							:     str	=		embd_pdrop
             _lowerCamelCase							:     Dict	=		attn_pdrop
             _lowerCamelCase							:     int	=		layer_norm_epsilon
             _lowerCamelCase							:     Union[str, Any]	=		initializer_range
             _lowerCamelCase							:     Optional[int]	=		summary_type
             _lowerCamelCase							:     Dict	=		summary_use_proj
             _lowerCamelCase							:     List[Any]	=		summary_activation
             _lowerCamelCase							:     Optional[Any]	=		summary_first_dropout
             _lowerCamelCase							:     int	=		summary_proj_to_labels
             super().__init__(**a__)








from typing import TYPE_CHECKING

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


_lowerCamelCase			       =      {
    'configuration_roberta_prelayernorm': [
        'ROBERTA_PRELAYERNORM_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'RobertaPreLayerNormConfig',
        'RobertaPreLayerNormOnnxConfig',
    ],
}

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       _lowerCamelCase			       =      [
           'ROBERTA_PRELAYERNORM_PRETRAINED_MODEL_ARCHIVE_LIST',
           'RobertaPreLayerNormForCausalLM',
           'RobertaPreLayerNormForMaskedLM',
           'RobertaPreLayerNormForMultipleChoice',
           'RobertaPreLayerNormForQuestionAnswering',
           'RobertaPreLayerNormForSequenceClassification',
           'RobertaPreLayerNormForTokenClassification',
           'RobertaPreLayerNormModel',
           'RobertaPreLayerNormPreTrainedModel',
       ]

try:
       if not is_tf_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       _lowerCamelCase			       =      [
           'TF_ROBERTA_PRELAYERNORM_PRETRAINED_MODEL_ARCHIVE_LIST',
           'TFRobertaPreLayerNormForCausalLM',
           'TFRobertaPreLayerNormForMaskedLM',
           'TFRobertaPreLayerNormForMultipleChoice',
           'TFRobertaPreLayerNormForQuestionAnswering',
           'TFRobertaPreLayerNormForSequenceClassification',
           'TFRobertaPreLayerNormForTokenClassification',
           'TFRobertaPreLayerNormMainLayer',
           'TFRobertaPreLayerNormModel',
           'TFRobertaPreLayerNormPreTrainedModel',
       ]

try:
       if not is_flax_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       _lowerCamelCase			       =      [
           'FlaxRobertaPreLayerNormForCausalLM',
           'FlaxRobertaPreLayerNormForMaskedLM',
           'FlaxRobertaPreLayerNormForMultipleChoice',
           'FlaxRobertaPreLayerNormForQuestionAnswering',
           'FlaxRobertaPreLayerNormForSequenceClassification',
           'FlaxRobertaPreLayerNormForTokenClassification',
           'FlaxRobertaPreLayerNormModel',
           'FlaxRobertaPreLayerNormPreTrainedModel',
       ]


if TYPE_CHECKING:
       from .configuration_roberta_prelayernorm import (
           ROBERTA_PRELAYERNORM_PRETRAINED_CONFIG_ARCHIVE_MAP,
           RobertaPreLayerNormConfig,
           RobertaPreLayerNormOnnxConfig,
       )

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_roberta_prelayernorm import (
                  ROBERTA_PRELAYERNORM_PRETRAINED_MODEL_ARCHIVE_LIST,
                  RobertaPreLayerNormForCausalLM,
                  RobertaPreLayerNormForMaskedLM,
                  RobertaPreLayerNormForMultipleChoice,
                  RobertaPreLayerNormForQuestionAnswering,
                  RobertaPreLayerNormForSequenceClassification,
                  RobertaPreLayerNormForTokenClassification,
                  RobertaPreLayerNormModel,
                  RobertaPreLayerNormPreTrainedModel,
              )

       try:
              if not is_tf_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_tf_roberta_prelayernorm import (
                  TF_ROBERTA_PRELAYERNORM_PRETRAINED_MODEL_ARCHIVE_LIST,
                  TFRobertaPreLayerNormForCausalLM,
                  TFRobertaPreLayerNormForMaskedLM,
                  TFRobertaPreLayerNormForMultipleChoice,
                  TFRobertaPreLayerNormForQuestionAnswering,
                  TFRobertaPreLayerNormForSequenceClassification,
                  TFRobertaPreLayerNormForTokenClassification,
                  TFRobertaPreLayerNormMainLayer,
                  TFRobertaPreLayerNormModel,
                  TFRobertaPreLayerNormPreTrainedModel,
              )

       try:
              if not is_flax_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_flax_roberta_prelayernorm import (
                  FlaxRobertaPreLayerNormForCausalLM,
                  FlaxRobertaPreLayerNormForMaskedLM,
                  FlaxRobertaPreLayerNormForMultipleChoice,
                  FlaxRobertaPreLayerNormForQuestionAnswering,
                  FlaxRobertaPreLayerNormForSequenceClassification,
                  FlaxRobertaPreLayerNormForTokenClassification,
                  FlaxRobertaPreLayerNormModel,
                  FlaxRobertaPreLayerNormPreTrainedModel,
              )

else:
       import sys

       _lowerCamelCase			       =      _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)

