



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


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

lowerCAmelCase					:				Tuple   	={
    '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 	_a			(      snake_case_  ):
			_UpperCamelCase:   List[Any]	     =		"reformer"
			_UpperCamelCase:   Optional[Any]	     =		["past_buckets_states"]
			_UpperCamelCase:   Tuple	     =		{}






			def __init__(    self    ,  lowercase_=64    ,  lowercase_=["local", "lsh", "local", "lsh", "local", "lsh"]    ,  lowercase_=1.0    ,  lowercase_=True    ,  lowercase_=[64, 64]    ,  lowercase_=[64, 192]    ,  lowercase_=0    ,  lowercase_=2    ,  lowercase_=512    ,  lowercase_=None    ,  lowercase_="relu"    ,  lowercase_=0.0_5    ,  lowercase_=256    ,  lowercase_=0.0_2    ,  lowercase_=False    ,  lowercase_=1e-12    ,  lowercase_=1    ,  lowercase_=0    ,  lowercase_=0.0_5    ,  lowercase_=64    ,  lowercase_=64    ,  lowercase_=0.0    ,  lowercase_=1    ,  lowercase_=0    ,  lowercase_=4096    ,  lowercase_=12    ,  lowercase_=None    ,  lowercase_=1    ,  lowercase_=0    ,  lowercase_=320    ,  lowercase_=False    ,  lowercase_=True    ,  lowercase_=None    ,  **lowercase_    ,  )	->					Any:
									lowerCAmelCase	:   Tuple					     =					hash_seed
									lowerCAmelCase	:   Optional[Any]					     =					vocab_size
									lowerCAmelCase	:   Dict					     =					attention_head_size
									lowerCAmelCase	:   Union[str, Any]					     =					hidden_size
									lowerCAmelCase	:   Dict					     =					num_attention_heads
									lowerCAmelCase	:   List[Any]					     =					num_hashes
									lowerCAmelCase	:   str					     =					len(lowercase_ )
									lowerCAmelCase	:   int					     =					tuple(lowercase_ ) if isinstance(lowercase_    ,  lowercase_ ) else num_buckets
									lowerCAmelCase	:   str					     =					lsh_attn_chunk_length
									lowerCAmelCase	:   List[str]					     =					local_attn_chunk_length
									lowerCAmelCase	:   Dict					     =					lsh_num_chunks_after
									lowerCAmelCase	:   int					     =					lsh_num_chunks_before
									lowerCAmelCase	:   Union[str, Any]					     =					local_num_chunks_after
									lowerCAmelCase	:   List[str]					     =					local_num_chunks_before
									lowerCAmelCase	:   str					     =					hidden_act
									lowerCAmelCase	:   Tuple					     =					feed_forward_size
									lowerCAmelCase	:   Optional[int]					     =					hidden_dropout_prob
									lowerCAmelCase	:   Any					     =					lsh_attention_probs_dropout_prob
									lowerCAmelCase	:   Tuple					     =					local_attention_probs_dropout_prob
									lowerCAmelCase	:   List[Any]					     =					max_position_embeddings
									lowerCAmelCase	:   Tuple					     =					initializer_range
									lowerCAmelCase	:   Any					     =					layer_norm_eps
									lowerCAmelCase	:   Optional[Any]					     =					axial_pos_embds
									lowerCAmelCase	:   Dict					     =					tuple(lowercase_ )
									lowerCAmelCase	:   Dict					     =					tuple(lowercase_ )
									lowerCAmelCase	:   int					     =					axial_norm_std
									lowerCAmelCase	:   Any					     =					chunk_size_lm_head
									lowerCAmelCase	:   str					     =					attn_layers
									lowerCAmelCase	:   Optional[int]					     =					use_cache
									lowerCAmelCase	:   Dict					     =					classifier_dropout
									super().__init__(
									    pad_token_id=lowercase_    ,  eos_token_id=lowercase_    ,  is_decoder=lowercase_    ,  tie_word_embeddings=lowercase_    ,  **lowercase_    ,  )






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_speech_available,
    is_torch_available,
)


lowerCAmelCase					:				Optional[int]   	={
    'configuration_speech_to_text_2': ['SPEECH_TO_TEXT_2_PRETRAINED_CONFIG_ARCHIVE_MAP', 'Speech2Text2Config'],
    'processing_speech_to_text_2': ['Speech2Text2Processor'],
    'tokenization_speech_to_text_2': ['Speech2Text2Tokenizer'],
}


try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCAmelCase					:				int   	=[
		    'SPEECH_TO_TEXT_2_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'Speech2Text2ForCausalLM',
		    'Speech2Text2PreTrainedModel',
		]


if TYPE_CHECKING:
		from .configuration_speech_to_text_a import SPEECH_TO_TEXT_2_PRETRAINED_CONFIG_ARCHIVE_MAP, SpeechaTextaConfig
		from .processing_speech_to_text_a import SpeechaTextaProcessor
		from .tokenization_speech_to_text_a import SpeechaTextaTokenizer

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_speech_to_text_a import (
				    SPEECH_TO_TEXT_2_PRETRAINED_MODEL_ARCHIVE_LIST,
				    SpeechaTextaForCausalLM,
				    SpeechaTextaPreTrainedModel,
				)

else:
		import sys

		lowerCAmelCase					:				Union[str, Any]   	=_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)

