

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  (      SCREAMING_SNAKE_CASE							):
  _a		    =						"""gptsan-japanese"""
  _a		    =						[
      """past_key_values""",
  ]
  _a		    =						{
      """hidden_size""": """d_model""",
      """num_attention_heads""": """num_heads""",
      """num_hidden_layers""": """num_layers""",
  }




  def __init__(       self							,     lowerCAmelCase=36_000							,     lowerCAmelCase=1_280							,     lowerCAmelCase=1_024							,     lowerCAmelCase=8_192							,     lowerCAmelCase=4_096							,     lowerCAmelCase=128							,     lowerCAmelCase=10							,     lowerCAmelCase=0							,     lowerCAmelCase=16							,     lowerCAmelCase=16							,     lowerCAmelCase=128							,     lowerCAmelCase=0.0							,     lowerCAmelCase=1e-5							,     lowerCAmelCase=False							,     lowerCAmelCase=0.0							,     lowerCAmelCase="float32"							,     lowerCAmelCase=False							,     lowerCAmelCase=False							,     lowerCAmelCase=False							,     lowerCAmelCase=0.002							,     lowerCAmelCase=False							,     lowerCAmelCase=True							,     lowerCAmelCase=35_998							,     lowerCAmelCase=35_995							,     lowerCAmelCase=35_999							,     **lowerCAmelCase							,     )						->				str:
        '''simple docstring'''






        _lowercase			 =vocab_size
        _lowercase			 =max_position_embeddings
        _lowercase			 =d_model
        _lowercase			 =d_ff
        _lowercase			 =d_ext
        _lowercase			 =d_spout
        _lowercase			 =num_switch_layers
        _lowercase			 =num_ext_layers
        _lowercase			 =num_switch_layers + num_ext_layers
        _lowercase			 =num_heads
        _lowercase			 =num_experts
        _lowercase			 =expert_capacity
        _lowercase			 =dropout_rate
        _lowercase			 =layer_norm_epsilon
        _lowercase			 =router_bias
        _lowercase			 =router_jitter_noise
        _lowercase			 =router_dtype
        _lowercase			 =router_ignore_padding_tokens
        _lowercase			 =output_hidden_states
        _lowercase			 =output_attentions
        _lowercase			 =initializer_factor
        _lowercase			 =output_router_logits
        _lowercase			 =use_cache

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





from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_torch_available,
    is_vision_available,
)


lowercase_             =     {'configuration_beit': ['BEIT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'BeitConfig', 'BeitOnnxConfig']}

try:
  if not is_vision_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase_             =     ['BeitFeatureExtractor']
  lowercase_             =     ['BeitImageProcessor']

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase_             =     [
      'BEIT_PRETRAINED_MODEL_ARCHIVE_LIST',
      'BeitForImageClassification',
      'BeitForMaskedImageModeling',
      'BeitForSemanticSegmentation',
      'BeitModel',
      'BeitPreTrainedModel',
  ]


try:
  if not is_flax_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase_             =     [
      'FlaxBeitForImageClassification',
      'FlaxBeitForMaskedImageModeling',
      'FlaxBeitModel',
      'FlaxBeitPreTrainedModel',
  ]

if TYPE_CHECKING:
  from .configuration_beit import BEIT_PRETRAINED_CONFIG_ARCHIVE_MAP, BeitConfig, BeitOnnxConfig

  try:
    if not is_vision_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .feature_extraction_beit import BeitFeatureExtractor
    from .image_processing_beit import BeitImageProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_beit import (
        BEIT_PRETRAINED_MODEL_ARCHIVE_LIST,
        BeitForImageClassification,
        BeitForMaskedImageModeling,
        BeitForSemanticSegmentation,
        BeitModel,
        BeitPreTrainedModel,
    )

  try:
    if not is_flax_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_flax_beit import (
        FlaxBeitForImageClassification,
        FlaxBeitForMaskedImageModeling,
        FlaxBeitModel,
        FlaxBeitPreTrainedModel,
    )


else:
  import sys

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


