



'''simple docstring'''

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


snake_case_			=     logging.get_logger(__name__)

snake_case_			=     {
    """tanreinama/GPTSAN-2.8B-spout_is_uniform""": (
        """https://huggingface.co/tanreinama/GPTSAN-2.8B-spout_is_uniform/resolve/main/config.json"""
    ),
}


class 	a__     (				_lowercase	):
	__magic_name__		:    Union[str, Any]	    =     "gptsan-japanese"
	__magic_name__		:    int	    =     [
	    "past_key_values",
	]
	__magic_name__		:    str	    =     {
	    "hidden_size": "d_model",
	    "num_attention_heads": "num_heads",
	    "num_hidden_layers": "num_layers",
	}


	def __init__(self : List[str],					__UpperCAmelCase : str=36000,					__UpperCAmelCase : Union[str, Any]=1280,					__UpperCAmelCase : List[str]=1024,					__UpperCAmelCase : Optional[int]=8192,					__UpperCAmelCase : Dict=4096,					__UpperCAmelCase : Optional[Any]=128,					__UpperCAmelCase : Dict=10,					__UpperCAmelCase : Any=0,					__UpperCAmelCase : List[Any]=16,					__UpperCAmelCase : Optional[int]=16,					__UpperCAmelCase : Dict=128,					__UpperCAmelCase : int=0.0,					__UpperCAmelCase : List[Any]=1e-5,					__UpperCAmelCase : List[str]=False,					__UpperCAmelCase : Optional[int]=0.0,					__UpperCAmelCase : List[str]="float32",					__UpperCAmelCase : Dict=False,					__UpperCAmelCase : List[Any]=False,					__UpperCAmelCase : Union[str, Any]=False,					__UpperCAmelCase : Optional[int]=0.002,					__UpperCAmelCase : int=False,					__UpperCAmelCase : Dict=True,					__UpperCAmelCase : str=35998,					__UpperCAmelCase : Any=35995,					__UpperCAmelCase : int=35999,					**__UpperCAmelCase : str,					)     ->			int:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						Tuple      					= vocab_size
					SCREAMING_SNAKE_CASE  :						List[str]      					= max_position_embeddings
					SCREAMING_SNAKE_CASE  :						Optional[int]      					= d_model
					SCREAMING_SNAKE_CASE  :						int      					= d_ff
					SCREAMING_SNAKE_CASE  :						int      					= d_ext
					SCREAMING_SNAKE_CASE  :						Optional[int]      					= d_spout
					SCREAMING_SNAKE_CASE  :						Dict      					= num_switch_layers
					SCREAMING_SNAKE_CASE  :						str      					= num_ext_layers
					SCREAMING_SNAKE_CASE  :						int      					= num_switch_layers + num_ext_layers
					SCREAMING_SNAKE_CASE  :						Union[str, Any]      					= num_heads
					SCREAMING_SNAKE_CASE  :						List[str]      					= num_experts
					SCREAMING_SNAKE_CASE  :						Tuple      					= expert_capacity
					SCREAMING_SNAKE_CASE  :						List[Any]      					= dropout_rate
					SCREAMING_SNAKE_CASE  :						List[Any]      					= layer_norm_epsilon
					SCREAMING_SNAKE_CASE  :						Optional[Any]      					= router_bias
					SCREAMING_SNAKE_CASE  :						Dict      					= router_jitter_noise
					SCREAMING_SNAKE_CASE  :						str      					= router_dtype
					SCREAMING_SNAKE_CASE  :						str      					= router_ignore_padding_tokens
					SCREAMING_SNAKE_CASE  :						List[Any]      					= output_hidden_states
					SCREAMING_SNAKE_CASE  :						Tuple      					= output_attentions
					SCREAMING_SNAKE_CASE  :						Optional[Any]      					= initializer_factor
					SCREAMING_SNAKE_CASE  :						str      					= output_router_logits
					SCREAMING_SNAKE_CASE  :						Optional[int]      					= use_cache

					super().__init__(
					    separator_token_id=__UpperCAmelCase,					pad_token_id=__UpperCAmelCase,					eos_token_id=__UpperCAmelCase,					**__UpperCAmelCase,					)









'''simple docstring'''

from ..utils import DummyObject, requires_backends


class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Dict	    =     ["torch", "transformers", "onnx"]


	def __init__(self : List[str],					*__UpperCAmelCase : Dict,					**__UpperCAmelCase : List[Any]      )     ->			Union[str, Any]:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : Optional[Any],					*__UpperCAmelCase : Tuple,					**__UpperCAmelCase : int      )     ->			int:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : Any,					*__UpperCAmelCase : Tuple,					**__UpperCAmelCase : Tuple      )     ->			Tuple:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Any	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Dict,					*__UpperCAmelCase : Union[str, Any],					**__UpperCAmelCase : Optional[Any]      )     ->			int:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : Any,					*__UpperCAmelCase : Tuple,					**__UpperCAmelCase : List[str]      )     ->			Optional[int]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : int,					*__UpperCAmelCase : List[Any],					**__UpperCAmelCase : Any      )     ->			Optional[Any]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Optional[Any]	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Dict,					*__UpperCAmelCase : Dict,					**__UpperCAmelCase : Any      )     ->			List[str]:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : Tuple,					*__UpperCAmelCase : Union[str, Any],					**__UpperCAmelCase : int      )     ->			Optional[Any]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : Union[str, Any],					*__UpperCAmelCase : List[str],					**__UpperCAmelCase : str      )     ->			Optional[int]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Tuple	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Union[str, Any],					*__UpperCAmelCase : Optional[int],					**__UpperCAmelCase : List[Any]      )     ->			Tuple:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : str,					*__UpperCAmelCase : Optional[int],					**__UpperCAmelCase : Tuple      )     ->			str:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : int,					*__UpperCAmelCase : List[Any],					**__UpperCAmelCase : List[str]      )     ->			Tuple:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    List[Any]	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Dict,					*__UpperCAmelCase : Optional[Any],					**__UpperCAmelCase : int      )     ->			List[str]:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : List[str],					*__UpperCAmelCase : Union[str, Any],					**__UpperCAmelCase : Dict      )     ->			Union[str, Any]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : Any,					*__UpperCAmelCase : List[str],					**__UpperCAmelCase : List[Any]      )     ->			Dict:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Dict	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Tuple,					*__UpperCAmelCase : Optional[Any],					**__UpperCAmelCase : List[str]      )     ->			Any:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : Tuple,					*__UpperCAmelCase : Any,					**__UpperCAmelCase : Union[str, Any]      )     ->			Optional[int]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : Optional[Any],					*__UpperCAmelCase : Union[str, Any],					**__UpperCAmelCase : Optional[Any]      )     ->			int:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )




