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


__a         =   logging.get_logger(__name__)

__a         =   {'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}
class 					lowercase__(							UpperCAmelCase				):



	"""simple docstring"""




	a     :Any       	=      'openai-gpt'
	a     :Optional[int]       	=      {
	    '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_    :     Tuple=4_0_4_7_8			,				SCREAMING_SNAKE_CASE_    :     Optional[int]=5_1_2			,				SCREAMING_SNAKE_CASE_    :     List[str]=7_6_8			,				SCREAMING_SNAKE_CASE_    :     List[str]=1_2			,				SCREAMING_SNAKE_CASE_    :     List[Any]=1_2			,				SCREAMING_SNAKE_CASE_    :     Any="gelu"			,				SCREAMING_SNAKE_CASE_    :     str=0.1			,				SCREAMING_SNAKE_CASE_    :     Dict=0.1			,				SCREAMING_SNAKE_CASE_    :     str=0.1			,				SCREAMING_SNAKE_CASE_    :     str=1e-5			,				SCREAMING_SNAKE_CASE_    :     int=0.02			,				SCREAMING_SNAKE_CASE_    :     Union[str, Any]="cls_index"			,				SCREAMING_SNAKE_CASE_    :     Dict=True			,				SCREAMING_SNAKE_CASE_    :     Optional[int]=None			,				SCREAMING_SNAKE_CASE_    :     Optional[int]=True			,				SCREAMING_SNAKE_CASE_    :     List[str]=0.1			,				**SCREAMING_SNAKE_CASE_    :     Tuple			,				)			->	Any:
					lowercase_	    =   vocab_size
					lowercase_	    =   n_positions
					lowercase_	    =   n_embd
					lowercase_	    =   n_layer
					lowercase_	    =   n_head
					lowercase_	    =   afn
					lowercase_	    =   resid_pdrop
					lowercase_	    =   embd_pdrop
					lowercase_	    =   attn_pdrop
					lowercase_	    =   layer_norm_epsilon
					lowercase_	    =   initializer_range
					lowercase_	    =   summary_type
					lowercase_	    =   summary_use_proj
					lowercase_	    =   summary_activation
					lowercase_	    =   summary_first_dropout
					lowercase_	    =   summary_proj_to_labels
					super().__init__(**SCREAMING_SNAKE_CASE_			)







'''simple docstring'''




from typing import TYPE_CHECKING

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


_a					:			Any							=    {
    'configuration_groupvit': [
        'GROUPVIT_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'GroupViTConfig',
        'GroupViTOnnxConfig',
        'GroupViTTextConfig',
        'GroupViTVisionConfig',
    ],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _a					:			Union[str, Any]							=    [
      'GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
      'GroupViTModel',
      'GroupViTPreTrainedModel',
      'GroupViTTextModel',
      'GroupViTVisionModel',
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _a					:			Tuple							=    [
      'TF_GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
      'TFGroupViTModel',
      'TFGroupViTPreTrainedModel',
      'TFGroupViTTextModel',
      'TFGroupViTVisionModel',
  ]

if TYPE_CHECKING:
  from .configuration_groupvit import (
      GROUPVIT_PRETRAINED_CONFIG_ARCHIVE_MAP,
      GroupViTConfig,
      GroupViTOnnxConfig,
      GroupViTTextConfig,
      GroupViTVisionConfig,
  )

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_groupvit import (
        GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
        GroupViTModel,
        GroupViTPreTrainedModel,
        GroupViTTextModel,
        GroupViTVisionModel,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_groupvit import (
        TF_GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
        TFGroupViTModel,
        TFGroupViTPreTrainedModel,
        TFGroupViTTextModel,
        TFGroupViTVisionModel,
    )

else:
  import sys

  _a					:			Union[str, Any]							=    _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


