





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


__lowercase				    =      logging.get_logger(__name__)

__lowercase				    =      {
    """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 	__snake_case					(      _a ):






    '''simple docstring'''
    _lowerCAmelCase  =						"""reformer"""
    _lowerCAmelCase  =						["""past_buckets_states"""]
    _lowerCAmelCase  =						{}





    def __init__( self    :		int      ,    snake_case    :		Optional[Any]=64      ,    snake_case    :		Union[str, Any]=["local", "lsh", "local", "lsh", "local", "lsh"]      ,    snake_case    :		int=1.0      ,    snake_case    :		List[str]=True      ,    snake_case    :		int=[64, 64]      ,    snake_case    :		Tuple=[64, 192]      ,    snake_case    :		Optional[int]=0      ,    snake_case    :		Dict=2      ,    snake_case    :		str=512      ,    snake_case    :		int=None      ,    snake_case    :		Union[str, Any]="relu"      ,    snake_case    :		Tuple=0.05      ,    snake_case    :		int=256      ,    snake_case    :		Any=0.02      ,    snake_case    :		int=False      ,    snake_case    :		Optional[Any]=1e-12      ,    snake_case    :		List[Any]=1      ,    snake_case    :		List[Any]=0      ,    snake_case    :		int=0.05      ,    snake_case    :		Dict=64      ,    snake_case    :		List[Any]=64      ,    snake_case    :		str=0.0      ,    snake_case    :		int=1      ,    snake_case    :		str=0      ,    snake_case    :		int=4_096      ,    snake_case    :		str=12      ,    snake_case    :		Dict=None      ,    snake_case    :		List[Any]=1      ,    snake_case    :		Union[str, Any]=0      ,    snake_case    :		str=320      ,    snake_case    :		List[Any]=False      ,    snake_case    :		int=True      ,    snake_case    :		Any=None      ,    **snake_case    :		List[str]      ,    ):

      """simple docstring"""





      __lowerCAmelCase								=					hash_seed
      __lowerCAmelCase								=					vocab_size
      __lowerCAmelCase								=					attention_head_size
      __lowerCAmelCase								=					hidden_size
      __lowerCAmelCase								=					num_attention_heads
      __lowerCAmelCase								=					num_hashes
      __lowerCAmelCase								=					len(snake_case				)
      __lowerCAmelCase								=					tuple(snake_case				) if isinstance(snake_case      ,    snake_case				) else num_buckets
      __lowerCAmelCase								=					lsh_attn_chunk_length
      __lowerCAmelCase								=					local_attn_chunk_length
      __lowerCAmelCase								=					lsh_num_chunks_after
      __lowerCAmelCase								=					lsh_num_chunks_before
      __lowerCAmelCase								=					local_num_chunks_after
      __lowerCAmelCase								=					local_num_chunks_before
      __lowerCAmelCase								=					hidden_act
      __lowerCAmelCase								=					feed_forward_size
      __lowerCAmelCase								=					hidden_dropout_prob
      __lowerCAmelCase								=					lsh_attention_probs_dropout_prob
      __lowerCAmelCase								=					local_attention_probs_dropout_prob
      __lowerCAmelCase								=					max_position_embeddings
      __lowerCAmelCase								=					initializer_range
      __lowerCAmelCase								=					layer_norm_eps
      __lowerCAmelCase								=					axial_pos_embds
      __lowerCAmelCase								=					tuple(snake_case				)
      __lowerCAmelCase								=					tuple(snake_case				)
      __lowerCAmelCase								=					axial_norm_std
      __lowerCAmelCase								=					chunk_size_lm_head
      __lowerCAmelCase								=					attn_layers
      __lowerCAmelCase								=					use_cache
      __lowerCAmelCase								=					classifier_dropout
      super().__init__(
          pad_token_id=snake_case      ,    eos_token_id=snake_case      ,    is_decoder=snake_case      ,    tie_word_embeddings=snake_case      ,    **snake_case      ,    )







def        __SCREAMING_SNAKE_CASE	(				__lowercase:		int):



  '''simple docstring'''






  if not isinstance(__lowercase  ,				__lowercase):
    __lowerCAmelCase								=					F'''Input value of [number={number}] must be an integer'''
    raise TypeError(__lowercase)
  if number < 0 or number % 2 == 1:
    return False
  __lowerCAmelCase								=					int(number**0.5)
  return number == number_sqrt * (number_sqrt + 1)


if __name__ == "__main__":
      import doctest

      doctest.testmod()
