
"""simple docstring"""






from typing import TYPE_CHECKING

from ...file_utils import _LazyModule, is_torch_available
from ...utils import OptionalDependencyNotAvailable


UpperCamelCase_							=					{
    'configuration_gpt_neox_japanese': ['GPT_NEOX_JAPANESE_PRETRAINED_CONFIG_ARCHIVE_MAP', 'GPTNeoXJapaneseConfig'],
    'tokenization_gpt_neox_japanese': ['GPTNeoXJapaneseTokenizer'],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase_							=					[
          'GPT_NEOX_JAPANESE_PRETRAINED_MODEL_ARCHIVE_LIST',
          'GPTNeoXJapaneseForCausalLM',
          'GPTNeoXJapaneseLayer',
          'GPTNeoXJapaneseModel',
          'GPTNeoXJapanesePreTrainedModel',
      ]


if TYPE_CHECKING:
      from .configuration_gpt_neox_japanese import GPT_NEOX_JAPANESE_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTNeoXJapaneseConfig
      from .tokenization_gpt_neox_japanese import GPTNeoXJapaneseTokenizer

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_gpt_neox_japanese import (
                GPT_NEOX_JAPANESE_PRETRAINED_MODEL_ARCHIVE_LIST,
                GPTNeoXJapaneseForCausalLM,
                GPTNeoXJapaneseLayer,
                GPTNeoXJapaneseModel,
                GPTNeoXJapanesePreTrainedModel,
            )


else:
      import sys

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





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


__lowerCAmelCase		:				Optional[Any]       			=		logging.get_logger(__name__)

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




class     snake_case__							(_UpperCamelCase   ):
				"""simple docstring"""



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





				def __init__(      self				:     str					,      __lowerCamelCase				:     List[str]=4_04_78					,      __lowerCamelCase				:     List[Any]=5_12					,      __lowerCamelCase				:     List[str]=7_68					,      __lowerCamelCase				:     List[str]=12					,      __lowerCamelCase				:     Optional[Any]=12					,      __lowerCamelCase				:     str="gelu"					,      __lowerCamelCase				:     Optional[int]=0.1					,      __lowerCamelCase				:     Any=0.1					,      __lowerCamelCase				:     Dict=0.1					,      __lowerCamelCase				:     Any=1e-5					,      __lowerCamelCase				:     Optional[int]=0.02					,      __lowerCamelCase				:     Optional[int]="cls_index"					,      __lowerCamelCase				:     List[Any]=True					,      __lowerCamelCase				:     Optional[int]=None					,      __lowerCamelCase				:     Optional[Any]=True					,      __lowerCamelCase				:     Tuple=0.1					,      **__lowerCamelCase				:     Union[str, Any]					,      )					->     List[str]:
							a    =			vocab_size
							a    =			n_positions
							a    =			n_embd
							a    =			n_layer
							a    =			n_head
							a    =			afn
							a    =			resid_pdrop
							a    =			embd_pdrop
							a    =			attn_pdrop
							a    =			layer_norm_epsilon
							a    =			initializer_range
							a    =			summary_type
							a    =			summary_use_proj
							a    =			summary_activation
							a    =			summary_first_dropout
							a    =			summary_proj_to_labels
							super().__init__(**__lowerCamelCase							)






