


'''simple docstring'''







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


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

A__:       List[str]          =			{
    '''transfo-xl-wt103''': '''https://huggingface.co/transfo-xl-wt103/resolve/main/config.json''',
}







class A__			(		__snake_case ):
      __UpperCamelCase			:    Dict      			=				"transfo-xl"
      __UpperCamelCase			:    Dict      			=				["mems"]
      __UpperCamelCase			:    Dict      			=				{
          "n_token": "vocab_size",
          "hidden_size": "d_model",
          "num_attention_heads": "n_head",
          "num_hidden_layers": "n_layer",
      }






      def __init__(					self     :Any	,		SCREAMING_SNAKE_CASE     :str=2_6_7_7_3_5	,		SCREAMING_SNAKE_CASE     :Tuple=[2_0_0_0_0, 4_0_0_0_0, 2_0_0_0_0_0]	,		SCREAMING_SNAKE_CASE     :List[str]=1_0_2_4	,		SCREAMING_SNAKE_CASE     :List[str]=1_0_2_4	,		SCREAMING_SNAKE_CASE     :int=1_6	,		SCREAMING_SNAKE_CASE     :Any=6_4	,		SCREAMING_SNAKE_CASE     :Any=4_0_9_6	,		SCREAMING_SNAKE_CASE     :Union[str, Any]=4	,		SCREAMING_SNAKE_CASE     :List[Any]=False	,		SCREAMING_SNAKE_CASE     :Any=1_8	,		SCREAMING_SNAKE_CASE     :Dict=1_6_0_0	,		SCREAMING_SNAKE_CASE     :Dict=1_0_0_0	,		SCREAMING_SNAKE_CASE     :int=True	,		SCREAMING_SNAKE_CASE     :Optional[Any]=True	,		SCREAMING_SNAKE_CASE     :int=0	,		SCREAMING_SNAKE_CASE     :List[str]=-1	,		SCREAMING_SNAKE_CASE     :int=True	,		SCREAMING_SNAKE_CASE     :Optional[int]=0.1	,		SCREAMING_SNAKE_CASE     :Any=0.0	,		SCREAMING_SNAKE_CASE     :List[Any]=True	,		SCREAMING_SNAKE_CASE     :List[str]="normal"	,		SCREAMING_SNAKE_CASE     :Optional[int]=0.01	,		SCREAMING_SNAKE_CASE     :List[Any]=0.01	,		SCREAMING_SNAKE_CASE     :Optional[int]=0.02	,		SCREAMING_SNAKE_CASE     :List[str]=1e-5	,		SCREAMING_SNAKE_CASE     :List[str]=0	,		**SCREAMING_SNAKE_CASE     :Optional[int]	,		)			->   Union[str, Any]:




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






      @property
      def __UpperCAmelCase			(					self     :Union[str, Any]      )			->   Union[str, 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 __UpperCAmelCase			(					self     :Tuple	,		SCREAMING_SNAKE_CASE     :str      )			->   Tuple:




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










__magic_name__   :  str        =							8.314_4598
def 		lowercase__  (				_UpperCamelCase       ,							_UpperCamelCase) ->			float:
      """simple docstring"""

      if temperature < 0:
            raise Exception('Temperature cannot be less than 0 K')
      if molar_mass <= 0:
            raise Exception('Molar mass cannot be less than or equal to 0 kg/mol')
      else:
            return (3 * UNIVERSAL_GAS_CONSTANT * temperature / molar_mass) ** 0.5


if __name__ == "__main__":
       import doctest

       # run doctest
       doctest.testmod()

       # example
       __magic_name__   :  List[Any]        =							300
       __magic_name__   :  Union[str, Any]        =							28
       __magic_name__   :  str        =							rms_speed_of_molecule(temperature, molar_mass)
       print(F'Vrms of Nitrogen gas at 300 K is {vrms} m/s')



