
"""simple docstring"""






from typing import TYPE_CHECKING

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


UpperCAmelCase        =				{
    """configuration_roberta_prelayernorm""": [
        """ROBERTA_PRELAYERNORM_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """RobertaPreLayerNormConfig""",
        """RobertaPreLayerNormOnnxConfig""",
    ],
}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCAmelCase        =				[
					    """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:
					UpperCAmelCase        =				[
					    """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:
					UpperCAmelCase        =				[
					    """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

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




"""simple docstring"""






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


UpperCAmelCase        =				logging.get_logger(__name__)

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



class 			lowercase					( lowercase__		):
			lowercase        =     '''openai-gpt'''
			lowercase        =     {
			    '''max_position_embeddings''': '''n_positions''',
			    '''hidden_size''': '''n_embd''',
			    '''num_attention_heads''': '''n_head''',
			    '''num_hidden_layers''': '''n_layer''',
			}






			def __init__(self  :	List[Any]      ,SCREAMING_SNAKE_CASE_  :	str=40_478      ,SCREAMING_SNAKE_CASE_  :	Optional[int]=512      ,SCREAMING_SNAKE_CASE_  :	Union[str, Any]=768      ,SCREAMING_SNAKE_CASE_  :	Dict=12      ,SCREAMING_SNAKE_CASE_  :	Dict=12      ,SCREAMING_SNAKE_CASE_  :	int="gelu"      ,SCREAMING_SNAKE_CASE_  :	Dict=0.1      ,SCREAMING_SNAKE_CASE_  :	List[Any]=0.1      ,SCREAMING_SNAKE_CASE_  :	Dict=0.1      ,SCREAMING_SNAKE_CASE_  :	Optional[Any]=1e-5      ,SCREAMING_SNAKE_CASE_  :	List[str]=0.02      ,SCREAMING_SNAKE_CASE_  :	Union[str, Any]="cls_index"      ,SCREAMING_SNAKE_CASE_  :	str=True      ,SCREAMING_SNAKE_CASE_  :	Any=None      ,SCREAMING_SNAKE_CASE_  :	List[Any]=True      ,SCREAMING_SNAKE_CASE_  :	List[str]=0.1      ,**SCREAMING_SNAKE_CASE_  :	int      ,)       ->	int:





				"""simple docstring"""


				lowerCAmelCase												=  vocab_size
				lowerCAmelCase												=  n_positions
				lowerCAmelCase												=  n_embd
				lowerCAmelCase												=  n_layer
				lowerCAmelCase												=  n_head
				lowerCAmelCase												=  afn
				lowerCAmelCase												=  resid_pdrop
				lowerCAmelCase												=  embd_pdrop
				lowerCAmelCase												=  attn_pdrop
				lowerCAmelCase												=  layer_norm_epsilon
				lowerCAmelCase												=  initializer_range
				lowerCAmelCase												=  summary_type
				lowerCAmelCase												=  summary_use_proj
				lowerCAmelCase												=  summary_activation
				lowerCAmelCase												=  summary_first_dropout
				lowerCAmelCase												=  summary_proj_to_labels
				super().__init__(**SCREAMING_SNAKE_CASE_			)


