



'''simple docstring'''




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


a  :     str       =       logging.get_logger(__name__)

a  :     str       =       {
    """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      UpperCamelCase_					(				lowercase__     ):
	lowercase		=					'''reformer'''
	lowercase		=					['''past_buckets_states''']
	lowercase		=					{}





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









def 						A_					(						lowercase_	,  lowercase_			)				->List[Any]:







 """simple docstring"""

 SCREAMING_SNAKE_CASE				    =		1
 while b > 0:
  if b & 1:
   res *= a

  a *= a
  b >>= 1

 return res





def 						A_					(						lowercase_	,  lowercase_	,  lowercase_			)				->Any:







 """simple docstring"""

 SCREAMING_SNAKE_CASE				    =		1
 while b > 0:
  if b & 1:
   SCREAMING_SNAKE_CASE				    =		((res % c) * (a % c)) % c

  a *= a
  b >>= 1

 return res




