



"""simple docstring"""


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


snake_case_				     =       logging.get_logger(__name__)

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







class       A_			(     SCREAMING_SNAKE_CASE_				):



						"""simple docstring"""
						__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 :Optional[int]   ,  lowercase_ :Optional[int]=4_04_78   ,  lowercase_ :List[Any]=5_12   ,  lowercase_ :List[str]=7_68   ,  lowercase_ :int=12   ,  lowercase_ :Dict=12   ,  lowercase_ :Union[str, Any]="gelu"   ,  lowercase_ :Union[str, Any]=0.1   ,  lowercase_ :str=0.1   ,  lowercase_ :List[str]=0.1   ,  lowercase_ :Optional[Any]=1E-5   ,  lowercase_ :Optional[int]=0.02   ,  lowercase_ :Optional[Any]="cls_index"   ,  lowercase_ :List[str]=True   ,  lowercase_ :List[str]=None   ,  lowercase_ :str=True   ,  lowercase_ :int=0.1   ,  **lowercase_ :List[Any]   ,  )				->			str:
												UpperCAmelCase             = vocab_size
												UpperCAmelCase             = n_positions
												UpperCAmelCase             = n_embd
												UpperCAmelCase             = n_layer
												UpperCAmelCase             = n_head
												UpperCAmelCase             = afn
												UpperCAmelCase             = resid_pdrop
												UpperCAmelCase             = embd_pdrop
												UpperCAmelCase             = attn_pdrop
												UpperCAmelCase             = layer_norm_epsilon
												UpperCAmelCase             = initializer_range
												UpperCAmelCase             = summary_type
												UpperCAmelCase             = summary_use_proj
												UpperCAmelCase             = summary_activation
												UpperCAmelCase             = summary_first_dropout
												UpperCAmelCase             = summary_proj_to_labels
												super().__init__(**lowercase_					)










"""simple docstring"""
from typing import TYPE_CHECKING

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


__a      =				{
    "configuration_mask2former": [
        "MASK2FORMER_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "Mask2FormerConfig",
    ],
}

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

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__a      =				[
						    "MASK2FORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "Mask2FormerForUniversalSegmentation",
						    "Mask2FormerModel",
						    "Mask2FormerPreTrainedModel",
						]

if TYPE_CHECKING:
						from .configuration_maskaformer import MASK2FORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, MaskaFormerConfig

						try:
												if not is_vision_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .image_processing_maskaformer import MaskaFormerImageProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_maskaformer import (
												    MASK2FORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    MaskaFormerForUniversalSegmentation,
												    MaskaFormerModel,
												    MaskaFormerPreTrainedModel,
												)


else:
						import sys

						__a      =				_LazyModule(__name__, globals()["__file__"], _import_structure)
