


'''simple docstring'''






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


lowercase							=logging.get_logger(__name__)

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






class  __magic_name__							(		lowerCAmelCase    ):
       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  ,							snake_case=4_0_4_7_8  ,							snake_case=5_1_2  ,							snake_case=7_6_8  ,							snake_case=1_2  ,							snake_case=1_2  ,							snake_case="gelu"  ,							snake_case=0.1  ,							snake_case=0.1  ,							snake_case=0.1  ,							snake_case=1E-5  ,							snake_case=0.02  ,							snake_case="cls_index"  ,							snake_case=True  ,							snake_case=None  ,							snake_case=True  ,							snake_case=0.1  ,							**snake_case  ,							)						->  List[str]:




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





'''simple docstring'''






from typing import TYPE_CHECKING

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


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

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

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowercase							=[
     '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

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

