





import warnings

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


_SCREAMING_SNAKE_CASE      	=		logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE      	=		{
    """xlnet-base-cased""": """https://huggingface.co/xlnet-base-cased/resolve/main/config.json""",
    """xlnet-large-cased""": """https://huggingface.co/xlnet-large-cased/resolve/main/config.json""",
}
class SCREAMING_SNAKE_CASE_						(					snake_case_					):
						__magic_name__:			Optional[int]       =       "xlnet"
						__magic_name__:			Optional[int]       =       ["mems"]
						__magic_name__:			List[Any]       =       {
						    "n_token": "vocab_size",  # Backward compatibility
						    "hidden_size": "d_model",
						    "num_attention_heads": "n_head",
						    "num_hidden_layers": "n_layer",
						}






						def __init__(      self      :      Union[str, Any]		,   _A      :      Any=32000		,   _A      :      str=1024		,   _A      :      List[Any]=24		,   _A      :      Tuple=16		,   _A      :      List[Any]=4096		,   _A      :      Dict="gelu"		,   _A      :      Optional[Any]=True		,   _A      :      str="bi"		,   _A      :      List[str]=0.0_2		,   _A      :      Optional[int]=1E-12		,   _A      :      List[Any]=0.1		,   _A      :      Any=512		,   _A      :      int=None		,   _A      :      Tuple=True		,   _A      :      Any=False		,   _A      :      Tuple=False		,   _A      :      Any=-1		,   _A      :      Optional[int]=False		,   _A      :      List[Any]="last"		,   _A      :      Any=True		,   _A      :      Dict="tanh"		,   _A      :      Union[str, Any]=0.1		,   _A      :      List[str]=5		,   _A      :      List[str]=5		,   _A      :      Dict=5		,   _A      :      Any=1		,   _A      :      Dict=2		,   **_A      :      List[Any]		,   )							->    Optional[Any]:







							"""simple docstring"""


							snake_case_		:			List[Any]											=	vocab_size
							snake_case_		:			int											=	d_model
							snake_case_		:			Any											=	n_layer
							snake_case_		:			List[str]											=	n_head
							if d_model % n_head != 0:
								raise ValueError(F"""'d_model % n_head' ({d_model % n_head}) should be equal to 0"""	)
							if "d_head" in kwargs:
								if kwargs["d_head"] != d_model // n_head:
									raise ValueError(
									    F"""`d_head` ({kwargs['d_head']}) should be equal to `d_model // n_head` ({d_model // n_head})"""	)
							snake_case_		:			Any											=	d_model // n_head
							snake_case_		:			List[Any]											=	ff_activation
							snake_case_		:			List[Any]											=	d_inner
							snake_case_		:			Dict											=	untie_r
							snake_case_		:			Optional[Any]											=	attn_type

							snake_case_		:			int											=	initializer_range
							snake_case_		:			Dict											=	layer_norm_eps

							snake_case_		:			Union[str, Any]											=	dropout
							snake_case_		:			Tuple											=	mem_len
							snake_case_		:			str											=	reuse_len
							snake_case_		:			Union[str, Any]											=	bi_data
							snake_case_		:			List[str]											=	clamp_len
							snake_case_		:			Optional[Any]											=	same_length

							snake_case_		:			Union[str, Any]											=	summary_type
							snake_case_		:			Tuple											=	summary_use_proj
							snake_case_		:			Tuple											=	summary_activation
							snake_case_		:			Dict											=	summary_last_dropout
							snake_case_		:			List[str]											=	start_n_top
							snake_case_		:			Tuple											=	end_n_top

							snake_case_		:			Optional[Any]											=	bos_token_id
							snake_case_		:			Union[str, Any]											=	pad_token_id
							snake_case_		:			str											=	eos_token_id

							if "use_cache" in kwargs:
								warnings.warn(
								    'The `use_cache` argument is deprecated and will be removed in a future version, use `use_mems_eval`'
								    ' instead.'		,   _A		,   )
								snake_case_		:			Any											=	kwargs['use_cache']

							snake_case_		:			List[str]											=	use_mems_eval
							snake_case_		:			int											=	use_mems_train
							super().__init__(pad_token_id=_A		,   bos_token_id=_A		,   eos_token_id=_A		,   **_A	)






						@property
						def UpperCAmelCase_				(      self      :      Dict	)							->    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		,   _A      :      Optional[Any]	)							->    Union[str, Any]:







							"""simple docstring"""


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








import numpy as np


def 							SCREAMING_SNAKE_CASE__						(    __a   ):
	return (2 / (1 + np.exp(-2 * vector   ))) - 1


if __name__ == "__main__":
						import doctest

						doctest.testmod()

