




"""simple docstring"""

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


_lowerCamelCase	:      Union[str, Any]   =							logging.get_logger(__name__)

_lowerCamelCase	:      Optional[Any]   =							{
    "google/reformer-crime-and-punishment": (
        "https://huggingface.co/google/reformer-crime-and-punishment/resolve/main/config.json"
    ),
    "google/reformer-enwik8": "https://huggingface.co/google/reformer-enwik8/resolve/main/config.json",
}

class 							lowercase   (     __UpperCAmelCase):
				__lowerCAmelCase     :     Tuple								= "reformer"
				__lowerCAmelCase     :     str								= ["past_buckets_states"]
				__lowerCAmelCase     :     str								= {}







				def __init__(				self :       Union[str, Any]   ,  _lowerCamelCase :       List[str]=64   ,  _lowerCamelCase :       Any=["local", "lsh", "local", "lsh", "local", "lsh"]   ,  _lowerCamelCase :       Optional[int]=1.0   ,  _lowerCamelCase :       Dict=True   ,  _lowerCamelCase :       List[str]=[64, 64]   ,  _lowerCamelCase :       Optional[int]=[64, 1_92]   ,  _lowerCamelCase :       Union[str, Any]=0   ,  _lowerCamelCase :       Dict=2   ,  _lowerCamelCase :       List[str]=5_12   ,  _lowerCamelCase :       List[Any]=None   ,  _lowerCamelCase :       Optional[int]="relu"   ,  _lowerCamelCase :       Dict=0.05   ,  _lowerCamelCase :       int=2_56   ,  _lowerCamelCase :       List[Any]=0.02   ,  _lowerCamelCase :       Optional[Any]=False   ,  _lowerCamelCase :       Any=1E-12   ,  _lowerCamelCase :       Any=1   ,  _lowerCamelCase :       int=0   ,  _lowerCamelCase :       int=0.05   ,  _lowerCamelCase :       List[Any]=64   ,  _lowerCamelCase :       List[str]=64   ,  _lowerCamelCase :       Optional[int]=0.0   ,  _lowerCamelCase :       str=1   ,  _lowerCamelCase :       Union[str, Any]=0   ,  _lowerCamelCase :       Union[str, Any]=40_96   ,  _lowerCamelCase :       int=12   ,  _lowerCamelCase :       Optional[int]=None   ,  _lowerCamelCase :       Optional[Any]=1   ,  _lowerCamelCase :       int=0   ,  _lowerCamelCase :       Tuple=3_20   ,  _lowerCamelCase :       int=False   ,  _lowerCamelCase :       int=True   ,  _lowerCamelCase :       Optional[int]=None   ,  **_lowerCamelCase :       List[str]   ,  ):



					"""simple docstring"""

					A_	:					List[Any]						 =		hash_seed
					A_	:					int						 =		vocab_size
					A_	:					Optional[int]						 =		attention_head_size
					A_	:					Any						 =		hidden_size
					A_	:					Union[str, Any]						 =		num_attention_heads
					A_	:					Dict						 =		num_hashes
					A_	:					Union[str, Any]						 =		len(_lowerCamelCase							)
					A_	:					Dict						 =		tuple(_lowerCamelCase							) if isinstance(_lowerCamelCase   ,  _lowerCamelCase							) else num_buckets
					A_	:					Union[str, Any]						 =		lsh_attn_chunk_length
					A_	:					Tuple						 =		local_attn_chunk_length
					A_	:					int						 =		lsh_num_chunks_after
					A_	:					List[Any]						 =		lsh_num_chunks_before
					A_	:					Union[str, Any]						 =		local_num_chunks_after
					A_	:					str						 =		local_num_chunks_before
					A_	:					List[Any]						 =		hidden_act
					A_	:					Optional[Any]						 =		feed_forward_size
					A_	:					Union[str, Any]						 =		hidden_dropout_prob
					A_	:					int						 =		lsh_attention_probs_dropout_prob
					A_	:					List[Any]						 =		local_attention_probs_dropout_prob
					A_	:					Union[str, Any]						 =		max_position_embeddings
					A_	:					Tuple						 =		initializer_range
					A_	:					Optional[int]						 =		layer_norm_eps
					A_	:					Optional[Any]						 =		axial_pos_embds
					A_	:					Union[str, Any]						 =		tuple(_lowerCamelCase							)
					A_	:					str						 =		tuple(_lowerCamelCase							)
					A_	:					str						 =		axial_norm_std
					A_	:					int						 =		chunk_size_lm_head
					A_	:					List[str]						 =		attn_layers
					A_	:					List[Any]						 =		use_cache
					A_	:					Optional[Any]						 =		classifier_dropout
					super().__init__(
					    pad_token_id=_lowerCamelCase   ,  eos_token_id=_lowerCamelCase   ,  is_decoder=_lowerCamelCase   ,  tie_word_embeddings=_lowerCamelCase   ,  **_lowerCamelCase   ,  )












'''simple docstring'''







from typing import TYPE_CHECKING

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


snake_case_  :							Any            =	{
    "configuration_flava": [
        "FLAVA_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "FlavaConfig",
        "FlavaImageCodebookConfig",
        "FlavaImageConfig",
        "FlavaMultimodalConfig",
        "FlavaTextConfig",
    ],
}

try:
					if not is_vision_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					snake_case_  :							List[str]            =	["FlavaFeatureExtractor"]
					snake_case_  :							int            =	["FlavaImageProcessor"]
					snake_case_  :							Tuple            =	["FlavaProcessor"]

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					snake_case_  :							Optional[int]            =	[
					    "FLAVA_PRETRAINED_MODEL_ARCHIVE_LIST",
					    "FlavaForPreTraining",
					    "FlavaImageCodebook",
					    "FlavaImageModel",
					    "FlavaModel",
					    "FlavaMultimodalModel",
					    "FlavaPreTrainedModel",
					    "FlavaTextModel",
					]

if TYPE_CHECKING:
					from .configuration_flava import (
					    FLAVA_PRETRAINED_CONFIG_ARCHIVE_MAP,
					    FlavaConfig,
					    FlavaImageCodebookConfig,
					    FlavaImageConfig,
					    FlavaMultimodalConfig,
					    FlavaTextConfig,
					)

					try:
										if not is_vision_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .feature_extraction_flava import FlavaFeatureExtractor
										from .image_processing_flava import FlavaImageProcessor
										from .processing_flava import FlavaProcessor

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_flava import (
										    FLAVA_PRETRAINED_MODEL_ARCHIVE_LIST,
										    FlavaForPreTraining,
										    FlavaImageCodebook,
										    FlavaImageModel,
										    FlavaModel,
										    FlavaMultimodalModel,
										    FlavaPreTrainedModel,
										    FlavaTextModel,
										)

else:
					import sys

					snake_case_  :							Any            =	_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





