

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


_SCREAMING_SNAKE_CASE					:  List[str]             =      logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE					:  Tuple             =      {
    '''transfo-xl-wt103''': '''https://huggingface.co/transfo-xl-wt103/resolve/main/config.json''',
}






class 	UpperCAmelCase__		(	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     ,       __lowerCamelCase						:		int=26_7735     ,       __lowerCamelCase						:		Any=[2_0000, 4_0000, 20_0000]     ,       __lowerCamelCase						:		Dict=1024     ,       __lowerCamelCase						:		Optional[int]=1024     ,       __lowerCamelCase						:		List[Any]=16     ,       __lowerCamelCase						:		Union[str, Any]=64     ,       __lowerCamelCase						:		Dict=4096     ,       __lowerCamelCase						:		int=4     ,       __lowerCamelCase						:		Dict=False     ,       __lowerCamelCase						:		Tuple=18     ,       __lowerCamelCase						:		Optional[int]=1600     ,       __lowerCamelCase						:		str=1000     ,       __lowerCamelCase						:		Any=True     ,       __lowerCamelCase						:		Dict=True     ,       __lowerCamelCase						:		List[Any]=0     ,       __lowerCamelCase						:		int=-1     ,       __lowerCamelCase						:		Tuple=True     ,       __lowerCamelCase						:		List[Any]=0.1     ,       __lowerCamelCase						:		int=0.0     ,       __lowerCamelCase						:		int=True     ,       __lowerCamelCase						:		str="normal"     ,       __lowerCamelCase						:		List[str]=0.01     ,       __lowerCamelCase						:		Any=0.01     ,       __lowerCamelCase						:		List[str]=0.02     ,       __lowerCamelCase						:		List[str]=1e-5     ,       __lowerCamelCase						:		Union[str, Any]=0     ,       **__lowerCamelCase						:		int     ,       )		->							Optional[Any]:
							SCREAMING_SNAKE_CASE__   =   vocab_size
							SCREAMING_SNAKE_CASE__   =   []
							self.cutoffs.extend(__lowerCamelCase )
							if proj_share_all_but_first:
												SCREAMING_SNAKE_CASE__   =   [False] + [True] * len(self.cutoffs )
							else:
												SCREAMING_SNAKE_CASE__   =   [False] + [False] * len(self.cutoffs )
							SCREAMING_SNAKE_CASE__   =   d_model
							SCREAMING_SNAKE_CASE__   =   d_embed
							SCREAMING_SNAKE_CASE__   =   d_head
							SCREAMING_SNAKE_CASE__   =   d_inner
							SCREAMING_SNAKE_CASE__   =   div_val
							SCREAMING_SNAKE_CASE__   =   pre_lnorm
							SCREAMING_SNAKE_CASE__   =   n_layer
							SCREAMING_SNAKE_CASE__   =   n_head
							SCREAMING_SNAKE_CASE__   =   mem_len
							SCREAMING_SNAKE_CASE__   =   same_length
							SCREAMING_SNAKE_CASE__   =   attn_type
							SCREAMING_SNAKE_CASE__   =   clamp_len
							SCREAMING_SNAKE_CASE__   =   sample_softmax
							SCREAMING_SNAKE_CASE__   =   adaptive
							SCREAMING_SNAKE_CASE__   =   dropout
							SCREAMING_SNAKE_CASE__   =   dropatt
							SCREAMING_SNAKE_CASE__   =   untie_r
							SCREAMING_SNAKE_CASE__   =   init
							SCREAMING_SNAKE_CASE__   =   init_range
							SCREAMING_SNAKE_CASE__   =   proj_init_std
							SCREAMING_SNAKE_CASE__   =   init_std
							SCREAMING_SNAKE_CASE__   =   layer_norm_epsilon
							super().__init__(eos_token_id=__lowerCamelCase     ,       **__lowerCamelCase )






		@property
		def 				lowercase_		(							self						:		str )		->							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 				lowercase_		(							self						:		List[str]     ,       __lowerCamelCase						:		Any )		->							List[Any]:
							# 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 ...utils import is_torch_available, is_transformers_available


if is_transformers_available() and is_torch_available():
       from .pipeline_vq_diffusion import LearnedClassifierFreeSamplingEmbeddings, VQDiffusionPipeline


