





'''simple docstring'''




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


_A:					Any							=				logging.get_logger(__name__)

_A:					List[str]							=				{
    """tanreinama/GPTSAN-2.8B-spout_is_uniform""": (
        """https://huggingface.co/tanreinama/GPTSAN-2.8B-spout_is_uniform/resolve/main/config.json"""
    ),
}






class UpperCAmelCase							(		UpperCAmelCase_							):
    _A :			Dict						   =       """gptsan-japanese"""
    _A :			Tuple						   =       [
        """past_key_values""",
    ]
    _A :			List[Any]						   =       {
        """hidden_size""": """d_model""",
        """num_attention_heads""": """num_heads""",
        """num_hidden_layers""": """num_layers""",
    }



    def __init__(  self     ,			__A=36_000     ,			__A=1_280     ,			__A=1_024     ,			__A=8_192     ,			__A=4_096     ,			__A=128     ,			__A=10     ,			__A=0     ,			__A=16     ,			__A=16     ,			__A=128     ,			__A=0.0     ,			__A=1E-5     ,			__A=False     ,			__A=0.0     ,			__A="float32"     ,			__A=False     ,			__A=False     ,			__A=False     ,			__A=0.0_0_2     ,			__A=False     ,			__A=True     ,			__A=35_998     ,			__A=35_995     ,			__A=35_999     ,			**__A     ,			):
     __UpperCAmelCase					=   vocab_size
     __UpperCAmelCase					=   max_position_embeddings
     __UpperCAmelCase					=   d_model
     __UpperCAmelCase					=   d_ff
     __UpperCAmelCase					=   d_ext
     __UpperCAmelCase					=   d_spout
     __UpperCAmelCase					=   num_switch_layers
     __UpperCAmelCase					=   num_ext_layers
     __UpperCAmelCase					=   num_switch_layers + num_ext_layers
     __UpperCAmelCase					=   num_heads
     __UpperCAmelCase					=   num_experts
     __UpperCAmelCase					=   expert_capacity
     __UpperCAmelCase					=   dropout_rate
     __UpperCAmelCase					=   layer_norm_epsilon
     __UpperCAmelCase					=   router_bias
     __UpperCAmelCase					=   router_jitter_noise
     __UpperCAmelCase					=   router_dtype
     __UpperCAmelCase					=   router_ignore_padding_tokens
     __UpperCAmelCase					=   output_hidden_states
     __UpperCAmelCase					=   output_attentions
     __UpperCAmelCase					=   initializer_factor
     __UpperCAmelCase					=   output_router_logits
     __UpperCAmelCase					=   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_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


_A:					str							=				{
    """configuration_whisper""": ["""WHISPER_PRETRAINED_CONFIG_ARCHIVE_MAP""", """WhisperConfig""", """WhisperOnnxConfig"""],
    """feature_extraction_whisper""": ["""WhisperFeatureExtractor"""],
    """processing_whisper""": ["""WhisperProcessor"""],
    """tokenization_whisper""": ["""WhisperTokenizer"""],
}

try:
    if not is_tokenizers_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    _A:					Union[str, Any]							=				["""WhisperTokenizerFast"""]

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    _A:					Optional[Any]							=				[
        """WHISPER_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """WhisperForConditionalGeneration""",
        """WhisperModel""",
        """WhisperPreTrainedModel""",
        """WhisperForAudioClassification""",
    ]

try:
    if not is_tf_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    _A:					Dict							=				[
        """TF_WHISPER_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """TFWhisperForConditionalGeneration""",
        """TFWhisperModel""",
        """TFWhisperPreTrainedModel""",
    ]

try:
    if not is_flax_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    _A:					Union[str, Any]							=				[
        """FlaxWhisperForConditionalGeneration""",
        """FlaxWhisperModel""",
        """FlaxWhisperPreTrainedModel""",
        """FlaxWhisperForAudioClassification""",
    ]


if TYPE_CHECKING:
    from .configuration_whisper import WHISPER_PRETRAINED_CONFIG_ARCHIVE_MAP, WhisperConfig, WhisperOnnxConfig
    from .feature_extraction_whisper import WhisperFeatureExtractor
    from .processing_whisper import WhisperProcessor
    from .tokenization_whisper import WhisperTokenizer

    try:
        if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_whisper_fast import WhisperTokenizerFast

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_whisper import (
            WHISPER_PRETRAINED_MODEL_ARCHIVE_LIST,
            WhisperForAudioClassification,
            WhisperForConditionalGeneration,
            WhisperModel,
            WhisperPreTrainedModel,
        )

    try:
        if not is_tf_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_tf_whisper import (
            TF_WHISPER_PRETRAINED_MODEL_ARCHIVE_LIST,
            TFWhisperForConditionalGeneration,
            TFWhisperModel,
            TFWhisperPreTrainedModel,
        )

    try:
        if not is_flax_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_flax_whisper import (
            FlaxWhisperForAudioClassification,
            FlaxWhisperForConditionalGeneration,
            FlaxWhisperModel,
            FlaxWhisperPreTrainedModel,
        )

else:
    import sys

    _A:					int							=				_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





