



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


snake_case     :    int						=    logging.get_logger(__name__)

snake_case     :    Optional[int]						=    {
    '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 				lowerCAmelCase__	(						snake_case__    ):
					__A  :     Dict     =    'reformer'
					__A  :     Optional[int]     =    ['past_buckets_states']
					__A  :     str     =    {}







					def __init__(							self   :  Tuple      ,		_A   :  Dict=64      ,		_A   :  Union[str, Any]=["local", "lsh", "local", "lsh", "local", "lsh"]      ,		_A   :  Optional[Any]=1.0      ,		_A   :  int=True      ,		_A   :  int=[64, 64]      ,		_A   :  Optional[int]=[64, 192]      ,		_A   :  Dict=0      ,		_A   :  Union[str, Any]=2      ,		_A   :  Optional[int]=512      ,		_A   :  Optional[Any]=None      ,		_A   :  Optional[int]="relu"      ,		_A   :  int=0.05      ,		_A   :  int=256      ,		_A   :  Union[str, Any]=0.02      ,		_A   :  Dict=False      ,		_A   :  str=1e-12      ,		_A   :  Any=1      ,		_A   :  Dict=0      ,		_A   :  int=0.05      ,		_A   :  str=64      ,		_A   :  Union[str, Any]=64      ,		_A   :  Any=0.0      ,		_A   :  List[str]=1      ,		_A   :  Any=0      ,		_A   :  Optional[int]=4096      ,		_A   :  Any=12      ,		_A   :  str=None      ,		_A   :  List[Any]=1      ,		_A   :  Dict=0      ,		_A   :  Optional[Any]=320      ,		_A   :  int=False      ,		_A   :  Any=True      ,		_A   :  Dict=None      ,		**_A   :  Union[str, Any]      ,		):
											A__						:				Union[str, Any]         =			hash_seed
											A__						:				List[str]         =			vocab_size
											A__						:				Dict         =			attention_head_size
											A__						:				List[Any]         =			hidden_size
											A__						:				Union[str, Any]         =			num_attention_heads
											A__						:				str         =			num_hashes
											A__						:				Optional[Any]         =			len(__SCREAMING_SNAKE_CASE)
											A__						:				Optional[Any]         =			tuple(__SCREAMING_SNAKE_CASE) if isinstance(__SCREAMING_SNAKE_CASE      ,		__SCREAMING_SNAKE_CASE) else num_buckets
											A__						:				List[Any]         =			lsh_attn_chunk_length
											A__						:				Union[str, Any]         =			local_attn_chunk_length
											A__						:				Tuple         =			lsh_num_chunks_after
											A__						:				int         =			lsh_num_chunks_before
											A__						:				Any         =			local_num_chunks_after
											A__						:				Any         =			local_num_chunks_before
											A__						:				Optional[Any]         =			hidden_act
											A__						:				str         =			feed_forward_size
											A__						:				List[str]         =			hidden_dropout_prob
											A__						:				Any         =			lsh_attention_probs_dropout_prob
											A__						:				str         =			local_attention_probs_dropout_prob
											A__						:				List[Any]         =			max_position_embeddings
											A__						:				List[str]         =			initializer_range
											A__						:				int         =			layer_norm_eps
											A__						:				Any         =			axial_pos_embds
											A__						:				str         =			tuple(__SCREAMING_SNAKE_CASE)
											A__						:				Optional[int]         =			tuple(__SCREAMING_SNAKE_CASE)
											A__						:				Optional[int]         =			axial_norm_std
											A__						:				Tuple         =			chunk_size_lm_head
											A__						:				List[str]         =			attn_layers
											A__						:				Optional[int]         =			use_cache
											A__						:				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      ,		)



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__UpperCAmelCase      			=  {"""configuration_sew_d""": ["""SEW_D_PRETRAINED_CONFIG_ARCHIVE_MAP""", """SEWDConfig"""]}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     __UpperCAmelCase      			=  [
         """SEW_D_PRETRAINED_MODEL_ARCHIVE_LIST""",
         """SEWDForCTC""",
         """SEWDForSequenceClassification""",
         """SEWDModel""",
         """SEWDPreTrainedModel""",
     ]

if TYPE_CHECKING:
     from .configuration_sew_d import SEW_D_PRETRAINED_CONFIG_ARCHIVE_MAP, SEWDConfig

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_sew_d import (
              SEW_D_PRETRAINED_MODEL_ARCHIVE_LIST,
              SEWDForCTC,
              SEWDForSequenceClassification,
              SEWDModel,
              SEWDPreTrainedModel,
          )


else:
     import sys

     __UpperCAmelCase      			=  _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

