
"""simple docstring"""


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


_lowercase							   =				logging.get_logger(__name__)

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







class 				lowerCAmelCase_				(      _lowercase    ):



						'''simple docstring'''


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


						def __init__( self     :      Dict  ,A_     :      Any=3_6000  ,A_     :      Dict=1280  ,A_     :      Any=1024  ,A_     :      Optional[int]=8192  ,A_     :      int=4096  ,A_     :      Any=128  ,A_     :      Union[str, Any]=10  ,A_     :      str=0  ,A_     :      Union[str, Any]=16  ,A_     :      str=16  ,A_     :      str=128  ,A_     :      Any=0.0  ,A_     :      Tuple=1e-5  ,A_     :      int=False  ,A_     :      Optional[int]=0.0  ,A_     :      int="float32"  ,A_     :      List[Any]=False  ,A_     :      Union[str, Any]=False  ,A_     :      Optional[Any]=False  ,A_     :      str=0.0_02  ,A_     :      Optional[int]=False  ,A_     :      List[str]=True  ,A_     :      Optional[int]=3_5998  ,A_     :      Dict=3_5995  ,A_     :      str=3_5999  ,**A_     :      List[Any]  ,)     ->   Optional[int]:
							A						   =   vocab_size
							A						   =   max_position_embeddings
							A						   =   d_model
							A						   =   d_ff
							A						   =   d_ext
							A						   =   d_spout
							A						   =   num_switch_layers
							A						   =   num_ext_layers
							A						   =   num_switch_layers + num_ext_layers
							A						   =   num_heads
							A						   =   num_experts
							A						   =   expert_capacity
							A						   =   dropout_rate
							A						   =   layer_norm_epsilon
							A						   =   router_bias
							A						   =   router_jitter_noise
							A						   =   router_dtype
							A						   =   router_ignore_padding_tokens
							A						   =   output_hidden_states
							A						   =   output_attentions
							A						   =   initializer_factor
							A						   =   output_router_logits
							A						   =   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_tokenizers_available,
    is_torch_available,
    is_vision_available,
)


_lowercase							   =				{
    '''configuration_perceiver''': ['''PERCEIVER_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''PerceiverConfig''', '''PerceiverOnnxConfig'''],
    '''tokenization_perceiver''': ['''PerceiverTokenizer'''],
}

try:
		if not is_vision_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_lowercase							   =				['''PerceiverFeatureExtractor''']
		_lowercase							   =				['''PerceiverImageProcessor''']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_lowercase							   =				[
		    '''PERCEIVER_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''PerceiverForImageClassificationConvProcessing''',
		    '''PerceiverForImageClassificationFourier''',
		    '''PerceiverForImageClassificationLearned''',
		    '''PerceiverForMaskedLM''',
		    '''PerceiverForMultimodalAutoencoding''',
		    '''PerceiverForOpticalFlow''',
		    '''PerceiverForSequenceClassification''',
		    '''PerceiverLayer''',
		    '''PerceiverModel''',
		    '''PerceiverPreTrainedModel''',
		]


if TYPE_CHECKING:
		from .configuration_perceiver import PERCEIVER_PRETRAINED_CONFIG_ARCHIVE_MAP, PerceiverConfig, PerceiverOnnxConfig
		from .tokenization_perceiver import PerceiverTokenizer

		try:
				if not is_vision_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .feature_extraction_perceiver import PerceiverFeatureExtractor
				from .image_processing_perceiver import PerceiverImageProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_perceiver import (
				    PERCEIVER_PRETRAINED_MODEL_ARCHIVE_LIST,
				    PerceiverForImageClassificationConvProcessing,
				    PerceiverForImageClassificationFourier,
				    PerceiverForImageClassificationLearned,
				    PerceiverForMaskedLM,
				    PerceiverForMultimodalAutoencoding,
				    PerceiverForOpticalFlow,
				    PerceiverForSequenceClassification,
				    PerceiverLayer,
				    PerceiverModel,
				    PerceiverPreTrainedModel,
				)

else:
		import sys

		_lowercase							   =				_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)