

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


__UpperCAmelCase								=			logging.get_logger(__name__)

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



class SCREAMING_SNAKE_CASE     (  a_			):
  """simple docstring"""






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







  def __init__(      self			:   Tuple	,							lowerCAmelCase			:   List[Any]=26_77_35	,							lowerCAmelCase			:   Union[str, Any]=[2_00_00, 4_00_00, 20_00_00]	,							lowerCAmelCase			:   Optional[Any]=10_24	,							lowerCAmelCase			:   int=10_24	,							lowerCAmelCase			:   List[str]=16	,							lowerCAmelCase			:   Optional[Any]=64	,							lowerCAmelCase			:   int=40_96	,							lowerCAmelCase			:   Optional[int]=4	,							lowerCAmelCase			:   int=False	,							lowerCAmelCase			:   int=18	,							lowerCAmelCase			:   Any=16_00	,							lowerCAmelCase			:   Tuple=10_00	,							lowerCAmelCase			:   Dict=True	,							lowerCAmelCase			:   Union[str, Any]=True	,							lowerCAmelCase			:   Optional[int]=0	,							lowerCAmelCase			:   Any=-1	,							lowerCAmelCase			:   Optional[Any]=True	,							lowerCAmelCase			:   Optional[int]=0.1	,							lowerCAmelCase			:   List[str]=0.0	,							lowerCAmelCase			:   Any=True	,							lowerCAmelCase			:   Optional[Any]="normal"	,							lowerCAmelCase			:   Dict=0.01	,							lowerCAmelCase			:   Optional[Any]=0.01	,							lowerCAmelCase			:   List[str]=0.02	,							lowerCAmelCase			:   int=1e-5	,							lowerCAmelCase			:   Optional[Any]=0	,							**lowerCAmelCase			:   Dict	,							)							->     List[str]:






     """simple docstring"""







     __lowerCAmelCase  :      Dict    =						vocab_size
     __lowerCAmelCase  :      Optional[Any]    =						[]
     self.cutoffs.extend(lowerCAmelCase   )
     if proj_share_all_but_first:
        __lowerCAmelCase  :      Tuple    =						[False] + [True] * len(self.cutoffs   )
     else:
        __lowerCAmelCase  :      Any    =						[False] + [False] * len(self.cutoffs   )
     __lowerCAmelCase  :      Dict    =						d_model
     __lowerCAmelCase  :      str    =						d_embed
     __lowerCAmelCase  :      Optional[Any]    =						d_head
     __lowerCAmelCase  :      List[Any]    =						d_inner
     __lowerCAmelCase  :      List[Any]    =						div_val
     __lowerCAmelCase  :      Optional[int]    =						pre_lnorm
     __lowerCAmelCase  :      List[str]    =						n_layer
     __lowerCAmelCase  :      Optional[Any]    =						n_head
     __lowerCAmelCase  :      Union[str, Any]    =						mem_len
     __lowerCAmelCase  :      List[Any]    =						same_length
     __lowerCAmelCase  :      Optional[int]    =						attn_type
     __lowerCAmelCase  :      str    =						clamp_len
     __lowerCAmelCase  :      List[Any]    =						sample_softmax
     __lowerCAmelCase  :      List[Any]    =						adaptive
     __lowerCAmelCase  :      List[str]    =						dropout
     __lowerCAmelCase  :      Dict    =						dropatt
     __lowerCAmelCase  :      Any    =						untie_r
     __lowerCAmelCase  :      Tuple    =						init
     __lowerCAmelCase  :      Dict    =						init_range
     __lowerCAmelCase  :      Dict    =						proj_init_std
     __lowerCAmelCase  :      int    =						init_std
     __lowerCAmelCase  :      Optional[int]    =						layer_norm_epsilon
     super().__init__(eos_token_id=lowerCAmelCase	,							**lowerCAmelCase   )







  @property
  def 	SCREAMING_SNAKE_CASE   (      self			:   List[Any]   )							->     List[Any]:






     """simple docstring"""







     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 	SCREAMING_SNAKE_CASE   (      self			:   Union[str, Any]	,							lowerCAmelCase			:   Tuple   )							->     List[Any]:






     """simple docstring"""







     raise NotImplementedError(
         f'''The model {self.model_type} is one of the few models that has no sequence length limit.'''   )





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

__UpperCAmelCase								=			[{"""type""": """code""", """content""": INSTALL_CONTENT}]
__UpperCAmelCase								=			{
    """{processor_class}""": """FakeProcessorClass""",
    """{model_class}""": """FakeModelClass""",
    """{object_class}""": """FakeObjectClass""",
}


