


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


__UpperCAmelCase      			=  logging.get_logger(__name__)

__UpperCAmelCase      			=  {
    """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__(						snake_case__			):






      '''simple docstring'''







      snake_case__       =					'''reformer'''
      snake_case__       =					['''past_buckets_states''']
      snake_case__       =					{}




      def __init__(		self   ,			__SCREAMING_SNAKE_CASE=64   ,			__SCREAMING_SNAKE_CASE=["local", "lsh", "local", "lsh", "local", "lsh"]   ,			__SCREAMING_SNAKE_CASE=1.0   ,			__SCREAMING_SNAKE_CASE=True   ,			__SCREAMING_SNAKE_CASE=[64, 64]   ,			__SCREAMING_SNAKE_CASE=[64, 1_92]   ,			__SCREAMING_SNAKE_CASE=0   ,			__SCREAMING_SNAKE_CASE=2   ,			__SCREAMING_SNAKE_CASE=5_12   ,			__SCREAMING_SNAKE_CASE=None   ,			__SCREAMING_SNAKE_CASE="relu"   ,			__SCREAMING_SNAKE_CASE=0.05   ,			__SCREAMING_SNAKE_CASE=2_56   ,			__SCREAMING_SNAKE_CASE=0.02   ,			__SCREAMING_SNAKE_CASE=False   ,			__SCREAMING_SNAKE_CASE=1E-12   ,			__SCREAMING_SNAKE_CASE=1   ,			__SCREAMING_SNAKE_CASE=0   ,			__SCREAMING_SNAKE_CASE=0.05   ,			__SCREAMING_SNAKE_CASE=64   ,			__SCREAMING_SNAKE_CASE=64   ,			__SCREAMING_SNAKE_CASE=0.0   ,			__SCREAMING_SNAKE_CASE=1   ,			__SCREAMING_SNAKE_CASE=0   ,			__SCREAMING_SNAKE_CASE=40_96   ,			__SCREAMING_SNAKE_CASE=12   ,			__SCREAMING_SNAKE_CASE=None   ,			__SCREAMING_SNAKE_CASE=1   ,			__SCREAMING_SNAKE_CASE=0   ,			__SCREAMING_SNAKE_CASE=3_20   ,			__SCREAMING_SNAKE_CASE=False   ,			__SCREAMING_SNAKE_CASE=True   ,			__SCREAMING_SNAKE_CASE=None   ,			**__SCREAMING_SNAKE_CASE   ,			)					->						Dict:







         """simple docstring"""







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





def 	_lowerCamelCase  (		A_  :	Union[str, Any]							,  A_  :	Optional[int]      )			->			Dict:

   '''simple docstring'''






   if len(str(A_      )      ) == 1 or len(str(A_      )      ) == 1:
      return a * b

   UpperCamelCase__ :			Any 						=max(len(str(A_      )      )							,  len(str(A_      )      )      )
   UpperCamelCase__ :			Optional[int] 						=ma // 2

   UpperCamelCase__						,	UpperCamelCase__ :			Dict 						=divmod(A_							,  1_0**ma      )
   UpperCamelCase__						,	UpperCamelCase__ :			Union[str, Any] 						=divmod(A_							,  1_0**ma      )

   UpperCamelCase__ :			List[Any] 						=karatsuba(A_							,  A_      )
   UpperCamelCase__ :			Dict 						=karatsuba((aa + aa)							,  (ba + ba)      )
   UpperCamelCase__ :			Optional[int] 						=karatsuba(A_							,  A_      )

   return (z * 1_0 ** (2 * ma)) + ((y - z - x) * 1_0 ** (ma)) + (x)
def 	_lowerCamelCase  (		)			->			Any:

   '''simple docstring'''






   print(karatsuba(1_5_4_6_3							,  2_3_4_8_9      )      )


if __name__ == "__main__":
     main()

