






'''simple docstring'''







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


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

_A      :     Optional[int]       	={
    '''uw-madison/nystromformer-512''': '''https://huggingface.co/uw-madison/nystromformer-512/resolve/main/config.json''',
    # See all Nystromformer models at https://huggingface.co/models?filter=nystromformer
}

class _lowercase      (							_lowercase						):
							a							 =			"""nystromformer"""




							def __init__(				self:							List[Any]     ,				UpperCamelCase__:							Union[str, Any]=30_000     ,				UpperCamelCase__:							List[str]=768     ,				UpperCamelCase__:							Tuple=12     ,				UpperCamelCase__:							str=12     ,				UpperCamelCase__:							Tuple=3_072     ,				UpperCamelCase__:							Union[str, Any]="gelu_new"     ,				UpperCamelCase__:							str=0.1     ,				UpperCamelCase__:							Optional[int]=0.1     ,				UpperCamelCase__:							Optional[int]=510     ,				UpperCamelCase__:							int=2     ,				UpperCamelCase__:							List[Any]=64     ,				UpperCamelCase__:							Optional[Any]=64     ,				UpperCamelCase__:							List[Any]=65     ,				UpperCamelCase__:							Any=False     ,				UpperCamelCase__:							List[str]=0.02     ,				UpperCamelCase__:							Union[str, Any]=1e-5     ,				UpperCamelCase__:							Optional[Any]=1     ,				UpperCamelCase__:							Any=0     ,				UpperCamelCase__:							Union[str, Any]=2     ,				**UpperCamelCase__:							List[Any]     ,				):
														lowerCamelCase__   :      Dict			    =			vocab_size
														lowerCamelCase__   :      List[Any]			    =			max_position_embeddings
														lowerCamelCase__   :      Optional[Any]			    =			hidden_size
														lowerCamelCase__   :      Any			    =			num_hidden_layers
														lowerCamelCase__   :      Any			    =			num_attention_heads
														lowerCamelCase__   :      int			    =			intermediate_size
														lowerCamelCase__   :      List[Any]			    =			hidden_act
														lowerCamelCase__   :      Union[str, Any]			    =			hidden_dropout_prob
														lowerCamelCase__   :      Any			    =			attention_probs_dropout_prob
														lowerCamelCase__   :      List[Any]			    =			initializer_range
														lowerCamelCase__   :      List[str]			    =			type_vocab_size
														lowerCamelCase__   :      Optional[int]			    =			segment_means_seq_len
														lowerCamelCase__   :      Union[str, Any]			    =			num_landmarks
														lowerCamelCase__   :      Any			    =			conv_kernel_size
														lowerCamelCase__   :      Optional[int]			    =			inv_coeff_init_option
														lowerCamelCase__   :      Tuple			    =			layer_norm_eps
														super().__init__(pad_token_id=UpperCamelCase__     ,				bos_token_id=UpperCamelCase__     ,				eos_token_id=UpperCamelCase__     ,				**UpperCamelCase__	)









'''simple docstring'''







from typing import TYPE_CHECKING

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


_A      :     Tuple       	={
    '''configuration_imagegpt''': ['''IMAGEGPT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ImageGPTConfig''', '''ImageGPTOnnxConfig''']
}

try:
			if not is_vision_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A      :     Dict       	=['''ImageGPTFeatureExtractor''']
			_A      :     Union[str, Any]       	=['''ImageGPTImageProcessor''']

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A      :     str       	=[
			    '''IMAGEGPT_PRETRAINED_MODEL_ARCHIVE_LIST''',
			    '''ImageGPTForCausalImageModeling''',
			    '''ImageGPTForImageClassification''',
			    '''ImageGPTModel''',
			    '''ImageGPTPreTrainedModel''',
			    '''load_tf_weights_in_imagegpt''',
			]


if TYPE_CHECKING:
			from .configuration_imagegpt import IMAGEGPT_PRETRAINED_CONFIG_ARCHIVE_MAP, ImageGPTConfig, ImageGPTOnnxConfig

			try:
						if not is_vision_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .feature_extraction_imagegpt import ImageGPTFeatureExtractor
						from .image_processing_imagegpt import ImageGPTImageProcessor

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_imagegpt import (
						    IMAGEGPT_PRETRAINED_MODEL_ARCHIVE_LIST,
						    ImageGPTForCausalImageModeling,
						    ImageGPTForImageClassification,
						    ImageGPTModel,
						    ImageGPTPreTrainedModel,
						    load_tf_weights_in_imagegpt,
						)

else:
			import sys

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

