

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


_lowerCAmelCase					:			int  				=			logging.get_logger(__name__)

_lowerCAmelCase					:			int  				=			{
    "transfo-xl-wt103": "https://huggingface.co/transfo-xl-wt103/resolve/main/config.json",
}






class 	__magic_name__    (			lowerCAmelCase_      ):
			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					,  __snake_case=26_7735					,  __snake_case=[2_0000, 4_0000, 20_0000]					,  __snake_case=1024					,  __snake_case=1024					,  __snake_case=16					,  __snake_case=64					,  __snake_case=4096					,  __snake_case=4					,  __snake_case=False					,  __snake_case=18					,  __snake_case=1600					,  __snake_case=1000					,  __snake_case=True					,  __snake_case=True					,  __snake_case=0					,  __snake_case=-1					,  __snake_case=True					,  __snake_case=0.1					,  __snake_case=0.0					,  __snake_case=True					,  __snake_case="normal"					,  __snake_case=0.01					,  __snake_case=0.01					,  __snake_case=0.02					,  __snake_case=1e-5					,  __snake_case=0					,  **__snake_case					,  )   -> str:




						'''simple docstring'''
						__a        =vocab_size
						__a        =[]
						self.cutoffs.extend(__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=__snake_case					,  **__snake_case					)





			@property
			def 		__magic_name__    (		self					)   -> Tuple:




						'''simple docstring'''
						# 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 		__magic_name__    (		self					,  __snake_case					)   -> Dict:




						'''simple docstring'''
						# 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.'					)









_lowerCAmelCase					:			Optional[int]  				=			"\n# Transformers installation\n! pip install transformers datasets\n# To install from source instead of the last release, comment the command above and uncomment the following one.\n# ! pip install git+https://github.com/huggingface/transformers.git\n"

_lowerCAmelCase					:			Tuple  				=			[{"type": "code", "content": INSTALL_CONTENT}]
_lowerCAmelCase					:			Optional[int]  				=			{
    "{processor_class}": "FakeProcessorClass",
    "{model_class}": "FakeModelClass",
    "{object_class}": "FakeObjectClass",
}






