
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__snake_case					:							List[Any]           =							{"configuration_dinat": ["DINAT_PRETRAINED_CONFIG_ARCHIVE_MAP", "DinatConfig"]}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__snake_case					:							List[Any]           =							[
						    "DINAT_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "DinatForImageClassification",
						    "DinatModel",
						    "DinatPreTrainedModel",
						    "DinatBackbone",
						]

if TYPE_CHECKING:
						from .configuration_dinat import DINAT_PRETRAINED_CONFIG_ARCHIVE_MAP, DinatConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_dinat import (
												    DINAT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    DinatBackbone,
												    DinatForImageClassification,
												    DinatModel,
												    DinatPreTrainedModel,
												)

else:
						import sys

						__snake_case					:							Optional[Any]           =							_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)










from typing import Optional, Tuple

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


_lowercase:					List[str]      =						logging.get_logger(__name__)

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

_lowercase:					Union[str, Any]      =						{
    "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"},
}

_lowercase:					int      =						{
    "openai-gpt": 512,
}



class       _lowercase				(  lowerCAmelCase      ):





	"""simple docstring"""
	__A		      =				VOCAB_FILES_NAMES
	__A		      =				PRETRAINED_VOCAB_FILES_MAP
	__A		      =				PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
	__A		      =				["input_ids", "attention_mask"]
	__A		      =				OpenAIGPTTokenizer




	def __init__(self						,			lowerCamelCase_=None						,			lowerCamelCase_=None						,			lowerCamelCase_=None						,			lowerCamelCase_="<unk>"						,			**lowerCamelCase_						):
						"""simple docstring"""

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




	@property
	def 	UpperCamelCase_			(self						):
						"""simple docstring"""

						return True




	def 	UpperCamelCase_			(self						,			lowerCamelCase_						,			lowerCamelCase_ = None						):
						"""simple docstring"""

						a   	=  self._tokenizer.model.save(lowerCamelCase_						,			name=lowerCamelCase_						)
						return tuple(lowerCamelCase_						)
