


'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCAmelCase   : int             =				logging.get_logger(__name__)

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




class        _UpperCamelCase	(    SCREAMING_SNAKE_CASE):


				'''simple docstring'''


				_snake_case						       =				'''gptsan-japanese'''
				_snake_case						       =				[
				    '''past_key_values''',
				]
				_snake_case						       =				{
				    '''hidden_size''': '''d_model''',
				    '''num_attention_heads''': '''num_heads''',
				    '''num_hidden_layers''': '''num_layers''',
				}

				def __init__(     self							,      a_=3_6_0_0_0							,      a_=1_2_8_0							,      a_=1_0_2_4							,      a_=8_1_9_2							,      a_=4_0_9_6							,      a_=1_2_8							,      a_=1_0							,      a_=0							,      a_=1_6							,      a_=1_6							,      a_=1_2_8							,      a_=0.0							,      a_=1e-5							,      a_=False							,      a_=0.0							,      a_="float32"							,      a_=False							,      a_=False							,      a_=False							,      a_=0.0_02							,      a_=False							,      a_=True							,      a_=3_5_9_9_8							,      a_=3_5_9_9_5							,      a_=3_5_9_9_9							,      **a_							,      )    ->  Optional[int]:
					lowercase						:		str   					=		vocab_size
					lowercase						:		Optional[int]   					=		max_position_embeddings
					lowercase						:		Dict   					=		d_model
					lowercase						:		List[str]   					=		d_ff
					lowercase						:		Dict   					=		d_ext
					lowercase						:		int   					=		d_spout
					lowercase						:		Dict   					=		num_switch_layers
					lowercase						:		Any   					=		num_ext_layers
					lowercase						:		Any   					=		num_switch_layers + num_ext_layers
					lowercase						:		List[str]   					=		num_heads
					lowercase						:		int   					=		num_experts
					lowercase						:		List[Any]   					=		expert_capacity
					lowercase						:		Dict   					=		dropout_rate
					lowercase						:		Tuple   					=		layer_norm_epsilon
					lowercase						:		Dict   					=		router_bias
					lowercase						:		Optional[Any]   					=		router_jitter_noise
					lowercase						:		Optional[Any]   					=		router_dtype
					lowercase						:		int   					=		router_ignore_padding_tokens
					lowercase						:		List[Any]   					=		output_hidden_states
					lowercase						:		Dict   					=		output_attentions
					lowercase						:		Optional[int]   					=		initializer_factor
					lowercase						:		Any   					=		output_router_logits
					lowercase						:		Dict   					=		use_cache

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






'''simple docstring'''
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


lowerCAmelCase   : List[Any]             =				{
    """configuration_albert""": ["""ALBERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """AlbertConfig""", """AlbertOnnxConfig"""],
}

try:
					if not is_sentencepiece_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase   : Any             =				["""AlbertTokenizer"""]

try:
					if not is_tokenizers_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase   : Optional[Any]             =				["""AlbertTokenizerFast"""]

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase   : List[str]             =				[
					    """ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """AlbertForMaskedLM""",
					    """AlbertForMultipleChoice""",
					    """AlbertForPreTraining""",
					    """AlbertForQuestionAnswering""",
					    """AlbertForSequenceClassification""",
					    """AlbertForTokenClassification""",
					    """AlbertModel""",
					    """AlbertPreTrainedModel""",
					    """load_tf_weights_in_albert""",
					]

try:
					if not is_tf_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase   : Tuple             =				[
					    """TF_ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """TFAlbertForMaskedLM""",
					    """TFAlbertForMultipleChoice""",
					    """TFAlbertForPreTraining""",
					    """TFAlbertForQuestionAnswering""",
					    """TFAlbertForSequenceClassification""",
					    """TFAlbertForTokenClassification""",
					    """TFAlbertMainLayer""",
					    """TFAlbertModel""",
					    """TFAlbertPreTrainedModel""",
					]

try:
					if not is_flax_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase   : Optional[int]             =				[
					    """FlaxAlbertForMaskedLM""",
					    """FlaxAlbertForMultipleChoice""",
					    """FlaxAlbertForPreTraining""",
					    """FlaxAlbertForQuestionAnswering""",
					    """FlaxAlbertForSequenceClassification""",
					    """FlaxAlbertForTokenClassification""",
					    """FlaxAlbertModel""",
					    """FlaxAlbertPreTrainedModel""",
					]

if TYPE_CHECKING:
					from .configuration_albert import ALBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, AlbertConfig, AlbertOnnxConfig

					try:
										if not is_sentencepiece_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_albert import AlbertTokenizer

					try:
										if not is_tokenizers_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_albert_fast import AlbertTokenizerFast

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_albert import (
										    ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
										    AlbertForMaskedLM,
										    AlbertForMultipleChoice,
										    AlbertForPreTraining,
										    AlbertForQuestionAnswering,
										    AlbertForSequenceClassification,
										    AlbertForTokenClassification,
										    AlbertModel,
										    AlbertPreTrainedModel,
										    load_tf_weights_in_albert,
										)

					try:
										if not is_tf_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_tf_albert import (
										    TF_ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
										    TFAlbertForMaskedLM,
										    TFAlbertForMultipleChoice,
										    TFAlbertForPreTraining,
										    TFAlbertForQuestionAnswering,
										    TFAlbertForSequenceClassification,
										    TFAlbertForTokenClassification,
										    TFAlbertMainLayer,
										    TFAlbertModel,
										    TFAlbertPreTrainedModel,
										)

					try:
										if not is_flax_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_flax_albert import (
										    FlaxAlbertForMaskedLM,
										    FlaxAlbertForMultipleChoice,
										    FlaxAlbertForPreTraining,
										    FlaxAlbertForQuestionAnswering,
										    FlaxAlbertForSequenceClassification,
										    FlaxAlbertForTokenClassification,
										    FlaxAlbertModel,
										    FlaxAlbertPreTrainedModel,
										)
else:
					import sys

					lowerCAmelCase   : Union[str, Any]             =				_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


