



'''simple docstring'''



from collections import OrderedDict
from typing import TYPE_CHECKING, Any, Mapping, Optional

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


if TYPE_CHECKING:
		from ... import FeatureExtractionMixin, TensorType

lowerCamelCase	 =       logging.get_logger(__name__)

lowerCamelCase	 =       {
    """openai/imagegpt-small""": """""",
    """openai/imagegpt-medium""": """""",
    """openai/imagegpt-large""": """""",
}





class _UpperCamelCase		(     A		):





				'''simple docstring'''





				lowerCAmelCase__					    =    """imagegpt"""
				lowerCAmelCase__					    =    ["""past_key_values"""]
				lowerCAmelCase__					    =    {
				    """hidden_size""": """n_embd""",
				    """max_position_embeddings""": """n_positions""",
				    """num_attention_heads""": """n_head""",
				    """num_hidden_layers""": """n_layer""",
				}

				def __init__(							self  :  Dict  ,       _lowerCAmelCase  :  Optional[Any]=5_1_2 + 1  ,       _lowerCAmelCase  :  List[Any]=3_2 * 3_2  ,       _lowerCAmelCase  :  Optional[Any]=5_1_2  ,       _lowerCAmelCase  :  Union[str, Any]=2_4  ,       _lowerCAmelCase  :  Union[str, Any]=8  ,       _lowerCAmelCase  :  str=None  ,       _lowerCAmelCase  :  Any="quick_gelu"  ,       _lowerCAmelCase  :  int=0.1  ,       _lowerCAmelCase  :  str=0.1  ,       _lowerCAmelCase  :  List[str]=0.1  ,       _lowerCAmelCase  :  List[Any]=1e-5  ,       _lowerCAmelCase  :  Tuple=0.02  ,       _lowerCAmelCase  :  Dict=True  ,       _lowerCAmelCase  :  Union[str, Any]=True  ,       _lowerCAmelCase  :  int=False  ,       _lowerCAmelCase  :  Optional[int]=False  ,       _lowerCAmelCase  :  List[str]=False  ,       **_lowerCAmelCase  :  int  ,       ):







											'''simple docstring'''

											__lowercase       	=vocab_size
											__lowercase       	=n_positions
											__lowercase       	=n_embd
											__lowercase       	=n_layer
											__lowercase       	=n_head
											__lowercase       	=n_inner
											__lowercase       	=activation_function
											__lowercase       	=resid_pdrop
											__lowercase       	=embd_pdrop
											__lowercase       	=attn_pdrop
											__lowercase       	=layer_norm_epsilon
											__lowercase       	=initializer_range
											__lowercase       	=scale_attn_weights
											__lowercase       	=use_cache
											__lowercase       	=scale_attn_by_inverse_layer_idx
											__lowercase       	=reorder_and_upcast_attn
											__lowercase       	=tie_word_embeddings

											super().__init__(tie_word_embeddings=_lowerCAmelCase  ,       **_lowerCAmelCase)





class _UpperCamelCase		(     A		):





				'''simple docstring'''





				@property
				def 				__lowerCamelCase     (							self  :  List[Any]):







											'''simple docstring'''

											return OrderedDict(
											    [
											        ('input_ids', {0: 'batch', 1: 'sequence'}),
											    ])

				def 				__lowerCamelCase     (							self  :  str  ,       _lowerCAmelCase  :  "FeatureExtractionMixin"  ,       _lowerCAmelCase  :  int = 1  ,       _lowerCAmelCase  :  int = -1  ,       _lowerCAmelCase  :  bool = False  ,       _lowerCAmelCase  :  Optional["TensorType"] = None  ,       _lowerCAmelCase  :  int = 3  ,       _lowerCAmelCase  :  int = 3_2  ,       _lowerCAmelCase  :  int = 3_2  ,       ):







											'''simple docstring'''

											__lowercase       	=self._generate_dummy_images(_lowerCAmelCase  ,       _lowerCAmelCase  ,       _lowerCAmelCase  ,       _lowerCAmelCase)
											__lowercase       	=dict(preprocessor(images=_lowerCAmelCase  ,       return_tensors=_lowerCAmelCase))

											return inputs








'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import _LazyModule


lowerCamelCase	 =       {"""tokenization_bertweet""": ["""BertweetTokenizer"""]}


if TYPE_CHECKING:
		from .tokenization_bertweet import BertweetTokenizer

else:
		import sys

		lowerCamelCase	 =       _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



