





'''simple docstring'''







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


lowerCAmelCase_					:    Union[str, Any]      	=			logging.get_logger(__name__)

lowerCAmelCase_					:    Union[str, Any]      	=			{
    'transfo-xl-wt103': 'https://huggingface.co/transfo-xl-wt103/resolve/main/config.json',
}
class 				__SCREAMING_SNAKE_CASE  (__a      ):






				"""simple docstring"""







				__a            ="""transfo-xl"""
				__a            =["""mems"""]
				__a            ={
				    """n_token""": """vocab_size""",
				    """hidden_size""": """d_model""",
				    """num_attention_heads""": """n_head""",
				    """num_hidden_layers""": """n_layer""",
				}




				def __init__(  self     :					Any					,				__a     :					str=26_77_35					,				__a     :					Dict=[2_00_00, 4_00_00, 20_00_00]					,				__a     :					Optional[int]=10_24					,				__a     :					List[str]=10_24					,				__a     :					List[Any]=16					,				__a     :					Dict=64					,				__a     :					Union[str, Any]=40_96					,				__a     :					Tuple=4					,				__a     :					Optional[int]=False					,				__a     :					List[Any]=18					,				__a     :					List[Any]=16_00					,				__a     :					Tuple=10_00					,				__a     :					Optional[Any]=True					,				__a     :					Optional[Any]=True					,				__a     :					str=0					,				__a     :					List[Any]=-1					,				__a     :					Any=True					,				__a     :					Optional[Any]=0.1					,				__a     :					Optional[Any]=0.0					,				__a     :					Optional[int]=True					,				__a     :					List[str]="normal"					,				__a     :					Tuple=0.01					,				__a     :					Union[str, Any]=0.01					,				__a     :					Union[str, Any]=0.02					,				__a     :					Tuple=1e-5					,				__a     :					Any=0					,				**__a     :					Union[str, Any]					,				):
								_a								= vocab_size
								_a								= []
								self.cutoffs.extend(__a					)
								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=__a					,				**__a					)




				@property
				def   UpperCamelCase__   (  self     :					int					):
								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     :					Union[str, Any]					,				__a     :					Optional[Any]					):
								raise NotImplementedError(
								    f'The model {self.model_type} is one of the few models that has no sequence length limit.'					)






'''simple docstring'''







from ..utils import DummyObject, requires_backends


class 			_a  (	metaclass=__a ):
       __a				:     int   				=					["""flax""", """transformers"""]
       def __init__(	self						:	Optional[Any]   ,				*lowercase						:	str   ,				**lowercase						:	List[Any]				):



           '''simple docstring'''

           requires_backends(self   ,				['''flax''', '''transformers''']				)
       @classmethod
       def     A      (	cls						:	Union[str, Any]   ,				*lowercase						:	List[Any]   ,				**lowercase						:	List[str]				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)







       @classmethod
       def     A      (	cls						:	Union[str, Any]   ,				*lowercase						:	Tuple   ,				**lowercase						:	int				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)






class 			_a  (	metaclass=__a ):
       __a				:     int   				=					["""flax""", """transformers"""]
       def __init__(	self						:	int   ,				*lowercase						:	Tuple   ,				**lowercase						:	Dict				):



           '''simple docstring'''

           requires_backends(self   ,				['''flax''', '''transformers''']				)
       @classmethod
       def     A      (	cls						:	List[str]   ,				*lowercase						:	Optional[int]   ,				**lowercase						:	List[Any]				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)







       @classmethod
       def     A      (	cls						:	Dict   ,				*lowercase						:	Union[str, Any]   ,				**lowercase						:	Union[str, Any]				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)






class 			_a  (	metaclass=__a ):
       __a				:     int   				=					["""flax""", """transformers"""]
       def __init__(	self						:	Optional[int]   ,				*lowercase						:	Union[str, Any]   ,				**lowercase						:	Any				):



           '''simple docstring'''

           requires_backends(self   ,				['''flax''', '''transformers''']				)
       @classmethod
       def     A      (	cls						:	Union[str, Any]   ,				*lowercase						:	Tuple   ,				**lowercase						:	Any				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)







       @classmethod
       def     A      (	cls						:	Any   ,				*lowercase						:	Dict   ,				**lowercase						:	Optional[Any]				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)






class 			_a  (	metaclass=__a ):
       __a				:     Any   				=					["""flax""", """transformers"""]
       def __init__(	self						:	Any   ,				*lowercase						:	Optional[Any]   ,				**lowercase						:	Optional[int]				):



           '''simple docstring'''

           requires_backends(self   ,				['''flax''', '''transformers''']				)
       @classmethod
       def     A      (	cls						:	Dict   ,				*lowercase						:	Optional[Any]   ,				**lowercase						:	Optional[Any]				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)







       @classmethod
       def     A      (	cls						:	Union[str, Any]   ,				*lowercase						:	str   ,				**lowercase						:	Any				):



           '''simple docstring'''

           requires_backends(cls   ,				['''flax''', '''transformers''']				)




