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


SCREAMING_SNAKE_CASE			:						int				  =		logging.get_logger(__name__)

SCREAMING_SNAKE_CASE			:						Any				  =		{
    """transfo-xl-wt103""": """https://huggingface.co/transfo-xl-wt103/resolve/main/config.json""",
}
class  A_			(							a_			):
  _SCREAMING_SNAKE_CASE     					=      """transfo-xl"""
  _SCREAMING_SNAKE_CASE     					=      ["""mems"""]
  _SCREAMING_SNAKE_CASE     					=      {
      """n_token""": """vocab_size""",
      """hidden_size""": """d_model""",
      """num_attention_heads""": """n_head""",
      """num_hidden_layers""": """n_layer""",
  }

  def __init__(		self			:   List[Any]  ,				__SCREAMING_SNAKE_CASE			:   int=26_77_35  ,				__SCREAMING_SNAKE_CASE			:   Dict=[2_00_00, 4_00_00, 20_00_00]  ,				__SCREAMING_SNAKE_CASE			:   Optional[int]=10_24  ,				__SCREAMING_SNAKE_CASE			:   int=10_24  ,				__SCREAMING_SNAKE_CASE			:   str=16  ,				__SCREAMING_SNAKE_CASE			:   Any=64  ,				__SCREAMING_SNAKE_CASE			:   Dict=40_96  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=4  ,				__SCREAMING_SNAKE_CASE			:   Optional[Any]=False  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=18  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=16_00  ,				__SCREAMING_SNAKE_CASE			:   Optional[Any]=10_00  ,				__SCREAMING_SNAKE_CASE			:   str=True  ,				__SCREAMING_SNAKE_CASE			:   Any=True  ,				__SCREAMING_SNAKE_CASE			:   int=0  ,				__SCREAMING_SNAKE_CASE			:   Tuple=-1  ,				__SCREAMING_SNAKE_CASE			:   Any=True  ,				__SCREAMING_SNAKE_CASE			:   Tuple=0.1  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=0.0  ,				__SCREAMING_SNAKE_CASE			:   Dict=True  ,				__SCREAMING_SNAKE_CASE			:   Optional[int]="normal"  ,				__SCREAMING_SNAKE_CASE			:   str=0.01  ,				__SCREAMING_SNAKE_CASE			:   int=0.01  ,				__SCREAMING_SNAKE_CASE			:   Union[str, Any]=0.02  ,				__SCREAMING_SNAKE_CASE			:   str=1E-5  ,				__SCREAMING_SNAKE_CASE			:   Tuple=0  ,				**__SCREAMING_SNAKE_CASE			:   Union[str, Any]  ,				):
   __a							=	vocab_size
   __a							=	[]
   self.cutoffs.extend(__SCREAMING_SNAKE_CASE							)
   if proj_share_all_but_first:
    __a							=	[False] + [True] * len(self.cutoffs							)
   else:
    __a							=	[False] + [False] * len(self.cutoffs							)
   __a							=	d_model
   __a							=	d_embed
   __a							=	d_head
   __a							=	d_inner
   __a							=	div_val
   __a							=	pre_lnorm
   __a							=	n_layer
   __a							=	n_head
   __a							=	mem_len
   __a							=	same_length
   __a							=	attn_type
   __a							=	clamp_len
   __a							=	sample_softmax
   __a							=	adaptive
   __a							=	dropout
   __a							=	dropatt
   __a							=	untie_r
   __a							=	init
   __a							=	init_range
   __a							=	proj_init_std
   __a							=	init_std
   __a							=	layer_norm_epsilon
   super().__init__(eos_token_id=__SCREAMING_SNAKE_CASE  ,				**__SCREAMING_SNAKE_CASE							)

  @property
  def 		_UpperCAmelCase (		self			:   Dict							):
   # Message copied from Transformer-XL documentation
   logger.info(f"""The model {self.model_type} is one of the few models that has no sequence length limit."""							)
   return -1

  @max_position_embeddings.setter
  def 		_UpperCAmelCase (		self			:   str  ,				__SCREAMING_SNAKE_CASE			:   int							):
   # Message copied from Transformer-XL documentation
   raise NotImplementedError(
       f"""The model {self.model_type} is one of the few models that has no sequence length limit."""							)



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


SCREAMING_SNAKE_CASE			:						int				  =		logging.get_logger(__name__)

SCREAMING_SNAKE_CASE			:						Dict				  =		{
    """google/canine-s""": """https://huggingface.co/google/canine-s/resolve/main/config.json""",
    # See all CANINE models at https://huggingface.co/models?filter=canine
}
class  A_			(							a_			):
  _SCREAMING_SNAKE_CASE     					=      """canine"""

  def __init__(		self			:   int  ,				__SCREAMING_SNAKE_CASE			:   List[str]=7_68  ,				__SCREAMING_SNAKE_CASE			:   Any=12  ,				__SCREAMING_SNAKE_CASE			:   str=12  ,				__SCREAMING_SNAKE_CASE			:   int=30_72  ,				__SCREAMING_SNAKE_CASE			:   int="gelu"  ,				__SCREAMING_SNAKE_CASE			:   Optional[int]=0.1  ,				__SCREAMING_SNAKE_CASE			:   List[str]=0.1  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=1_63_84  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=16  ,				__SCREAMING_SNAKE_CASE			:   int=0.02  ,				__SCREAMING_SNAKE_CASE			:   Optional[Any]=1E-12  ,				__SCREAMING_SNAKE_CASE			:   Union[str, Any]=0  ,				__SCREAMING_SNAKE_CASE			:   List[str]=0xE000  ,				__SCREAMING_SNAKE_CASE			:   int=0xE001  ,				__SCREAMING_SNAKE_CASE			:   Optional[int]=4  ,				__SCREAMING_SNAKE_CASE			:   Optional[Any]=4  ,				__SCREAMING_SNAKE_CASE			:   List[Any]=8  ,				__SCREAMING_SNAKE_CASE			:   List[str]=1_63_84  ,				__SCREAMING_SNAKE_CASE			:   Optional[Any]=1_28  ,				**__SCREAMING_SNAKE_CASE			:   List[str]  ,				):
   super().__init__(pad_token_id=__SCREAMING_SNAKE_CASE  ,				bos_token_id=__SCREAMING_SNAKE_CASE  ,				eos_token_id=__SCREAMING_SNAKE_CASE  ,				**__SCREAMING_SNAKE_CASE							)

   __a							=	max_position_embeddings
   __a							=	hidden_size
   __a							=	num_hidden_layers
   __a							=	num_attention_heads
   __a							=	intermediate_size
   __a							=	hidden_act
   __a							=	hidden_dropout_prob
   __a							=	attention_probs_dropout_prob
   __a							=	initializer_range
   __a							=	type_vocab_size
   __a							=	layer_norm_eps

   # Character config:
   __a							=	downsampling_rate
   __a							=	upsampling_kernel_size
   __a							=	num_hash_functions
   __a							=	num_hash_buckets
   __a							=	local_transformer_stride


