
from typing import TYPE_CHECKING

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


__a  			=					{
    "configuration_owlvit": [
        "OWLVIT_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "OwlViTConfig",
        "OwlViTOnnxConfig",
        "OwlViTTextConfig",
        "OwlViTVisionConfig",
    ],
    "processing_owlvit": ["OwlViTProcessor"],
}


try:
						if not is_vision_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__a  			=					["OwlViTFeatureExtractor"]
						__a  			=					["OwlViTImageProcessor"]

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__a  			=					[
						    "OWLVIT_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "OwlViTModel",
						    "OwlViTPreTrainedModel",
						    "OwlViTTextModel",
						    "OwlViTVisionModel",
						    "OwlViTForObjectDetection",
						]

if TYPE_CHECKING:
						from .configuration_owlvit import (
						    OWLVIT_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    OwlViTConfig,
						    OwlViTOnnxConfig,
						    OwlViTTextConfig,
						    OwlViTVisionConfig,
						)
						from .processing_owlvit import OwlViTProcessor

						try:
												if not is_vision_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .feature_extraction_owlvit import OwlViTFeatureExtractor
												from .image_processing_owlvit import OwlViTImageProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_owlvit import (
												    OWLVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    OwlViTForObjectDetection,
												    OwlViTModel,
												    OwlViTPreTrainedModel,
												    OwlViTTextModel,
												    OwlViTVisionModel,
												)

else:
						import sys

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









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


a_   :Optional[int]        =      logging.get_logger(__name__)

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




class 					snake_case__						(       lowerCAmelCase_     ):






     """simple docstring"""


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






     def __init__(       self  :  Optional[int], _snake_case  :  Dict=4_0_4_7_8, _snake_case  :  str=5_1_2, _snake_case  :  int=7_6_8, _snake_case  :  Tuple=1_2, _snake_case  :  Any=1_2, _snake_case  :  str="gelu", _snake_case  :  List[str]=0.1, _snake_case  :  Any=0.1, _snake_case  :  Dict=0.1, _snake_case  :  int=1e-5, _snake_case  :  Optional[Any]=0.0_2, _snake_case  :  List[Any]="cls_index", _snake_case  :  Any=True, _snake_case  :  Any=None, _snake_case  :  int=True, _snake_case  :  Optional[Any]=0.1, **_snake_case  :  List[Any], )   ->Optional[int]:
            snake_case__							:	int   	=	vocab_size
            snake_case__							:	Dict   	=	n_positions
            snake_case__							:	str   	=	n_embd
            snake_case__							:	str   	=	n_layer
            snake_case__							:	List[Any]   	=	n_head
            snake_case__							:	List[Any]   	=	afn
            snake_case__							:	Optional[Any]   	=	resid_pdrop
            snake_case__							:	List[str]   	=	embd_pdrop
            snake_case__							:	List[Any]   	=	attn_pdrop
            snake_case__							:	Optional[int]   	=	layer_norm_epsilon
            snake_case__							:	str   	=	initializer_range
            snake_case__							:	List[str]   	=	summary_type
            snake_case__							:	Optional[int]   	=	summary_use_proj
            snake_case__							:	List[str]   	=	summary_activation
            snake_case__							:	Optional[Any]   	=	summary_first_dropout
            snake_case__							:	int   	=	summary_proj_to_labels
            super().__init__(**_snake_case					)






