






'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available


A:      int  				=				{}

try:
      if not is_sentencepiece_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A:      List[str]  				=				["GPTSw3Tokenizer"]


if TYPE_CHECKING:
      try:
            if not is_sentencepiece_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .tokenization_gpt_swa import GPTSwaTokenizer

else:
      import sys

      A:      str  				=				_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)








'''simple docstring'''

from collections import OrderedDict
from typing import Mapping

from packaging import version

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


A:      Dict  				=				logging.get_logger(__name__)

A:      Optional[Any]  				=				{
    "google/vit-base-patch16-224": "https://huggingface.co/vit-base-patch16-224/resolve/main/config.json",
    # See all ViT models at https://huggingface.co/models?filter=vit
}






class 							__magic_name__     (	UpperCAmelCase_				):







	"""simple docstring"""



	SCREAMING_SNAKE_CASE_					:      Optional[Any]        =  'vit'
	def __init__(							self  ,      _lowercase=768  ,      _lowercase=12  ,      _lowercase=12  ,      _lowercase=3072  ,      _lowercase="gelu"  ,      _lowercase=0.0  ,      _lowercase=0.0  ,      _lowercase=0.02  ,      _lowercase=1E-1_2  ,      _lowercase=224  ,      _lowercase=16  ,      _lowercase=3  ,      _lowercase=True  ,      _lowercase=16  ,      **_lowercase  ,      )						->  List[str]:
							super().__init__(**_lowercase       )

							lowercase_      :   Optional[int]        =			hidden_size
							lowercase_      :   str        =			num_hidden_layers
							lowercase_      :   str        =			num_attention_heads
							lowercase_      :   int        =			intermediate_size
							lowercase_      :   List[Any]        =			hidden_act
							lowercase_      :   Any        =			hidden_dropout_prob
							lowercase_      :   List[str]        =			attention_probs_dropout_prob
							lowercase_      :   str        =			initializer_range
							lowercase_      :   List[str]        =			layer_norm_eps
							lowercase_      :   Any        =			image_size
							lowercase_      :   Tuple        =			patch_size
							lowercase_      :   Optional[Any]        =			num_channels
							lowercase_      :   str        =			qkv_bias
							lowercase_      :   List[str]        =			encoder_stride






class 							__magic_name__     (	UpperCAmelCase_				):







	"""simple docstring"""



	SCREAMING_SNAKE_CASE_					:      Any        =  version.parse('1.11'				)
	@property
	def        lowerCamelCase__		(							self       )						->  Mapping[str, Mapping[int, str]]:
							return OrderedDict(
							    [
							        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
							    ]       )







	@property
	def        lowerCamelCase__		(							self       )						->  float:
							return 1E-4
