




from typing import Optional, Tuple

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_openai import OpenAIGPTTokenizer


UpperCamelCase__            =     logging.get_logger(__name__)

UpperCamelCase__            =     {"""vocab_file""": """vocab.json""", """merges_file""": """merges.txt""", """tokenizer_file""": """tokenizer.json"""}

UpperCamelCase__            =     {
    """vocab_file""": {"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/vocab.json"""},
    """merges_file""": {"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/merges.txt"""},
    """tokenizer_file""": {"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/tokenizer.json"""},
}

UpperCamelCase__            =     {
    """openai-gpt""": 512,
}
class      a__       (   snake_case__ ):
						_a				:       Optional[int]   =       VOCAB_FILES_NAMES
						_a				:       Dict   =       PRETRAINED_VOCAB_FILES_MAP
						_a				:       List[Any]   =       PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
						_a				:       Union[str, Any]   =       ["""input_ids""", """attention_mask"""]
						_a				:       Any   =       OpenAIGPTTokenizer






						def __init__(  self						,     _A=None						,     _A=None						,     _A=None						,     _A="<unk>"						,     **_A     ):




											"""simple docstring"""



											super().__init__(_A						,     _A						,     tokenizer_file=_A						,     unk_token=_A						,     **_A     )






						@property
						def 							__SCREAMING_SNAKE_CASE(  self     ):




											"""simple docstring"""



											return True






						def 							__SCREAMING_SNAKE_CASE(  self						,     _A						,     _A = None     ):




											"""simple docstring"""



											__lowerCAmelCase							  =			self._tokenizer.model.save(_A						,     name=_A     )
											return tuple(_A     )










from typing import TYPE_CHECKING

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


UpperCamelCase__            =     {"""configuration_vit_hybrid""": ["""VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP""", """ViTHybridConfig"""]}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCamelCase__            =     [
					    """VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """ViTHybridForImageClassification""",
					    """ViTHybridModel""",
					    """ViTHybridPreTrainedModel""",
					]

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


if TYPE_CHECKING:
					from .configuration_vit_hybrid import VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTHybridConfig

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_vit_hybrid import (
										    VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST,
										    ViTHybridForImageClassification,
										    ViTHybridModel,
										    ViTHybridPreTrainedModel,
										)

					try:
										if not is_vision_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .image_processing_vit_hybrid import ViTHybridImageProcessor


else:
					import sys

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




