





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


UpperCAmelCase_					:   Tuple 							=						logging.get_logger(__name__)

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





class      lowercase__    (							__A  ):
  __UpperCamelCase	     =  """gptsan-japanese"""
  __UpperCamelCase	     =  [
      """past_key_values""",
  ]
  __UpperCamelCase	     =  {
      """hidden_size""": """d_model""",
      """num_attention_heads""": """num_heads""",
      """num_hidden_layers""": """num_layers""",
  }







  def __init__(	self    ,						_lowercase=36_000    ,						_lowercase=1_280    ,						_lowercase=1_024    ,						_lowercase=8_192    ,						_lowercase=4_096    ,						_lowercase=128    ,						_lowercase=10    ,						_lowercase=0    ,						_lowercase=16    ,						_lowercase=16    ,						_lowercase=128    ,						_lowercase=0.0    ,						_lowercase=1e-5    ,						_lowercase=False    ,						_lowercase=0.0    ,						_lowercase="float32"    ,						_lowercase=False    ,						_lowercase=False    ,						_lowercase=False    ,						_lowercase=0.002    ,						_lowercase=False    ,						_lowercase=True    ,						_lowercase=35_998    ,						_lowercase=35_995    ,						_lowercase=35_999    ,						**_lowercase    ,						):
       lowerCAmelCase_					:       Tuple    =		vocab_size
       lowerCAmelCase_					:       Tuple    =		max_position_embeddings
       lowerCAmelCase_					:       str    =		d_model
       lowerCAmelCase_					:       str    =		d_ff
       lowerCAmelCase_					:       Optional[Any]    =		d_ext
       lowerCAmelCase_					:       List[str]    =		d_spout
       lowerCAmelCase_					:       Union[str, Any]    =		num_switch_layers
       lowerCAmelCase_					:       int    =		num_ext_layers
       lowerCAmelCase_					:       Optional[Any]    =		num_switch_layers + num_ext_layers
       lowerCAmelCase_					:       str    =		num_heads
       lowerCAmelCase_					:       str    =		num_experts
       lowerCAmelCase_					:       Optional[Any]    =		expert_capacity
       lowerCAmelCase_					:       Optional[int]    =		dropout_rate
       lowerCAmelCase_					:       int    =		layer_norm_epsilon
       lowerCAmelCase_					:       Union[str, Any]    =		router_bias
       lowerCAmelCase_					:       List[str]    =		router_jitter_noise
       lowerCAmelCase_					:       List[Any]    =		router_dtype
       lowerCAmelCase_					:       Any    =		router_ignore_padding_tokens
       lowerCAmelCase_					:       Optional[int]    =		output_hidden_states
       lowerCAmelCase_					:       Tuple    =		output_attentions
       lowerCAmelCase_					:       Tuple    =		initializer_factor
       lowerCAmelCase_					:       Any    =		output_router_logits
       lowerCAmelCase_					:       Tuple    =		use_cache

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







# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


UpperCAmelCase_					:   Tuple 							=						{
    """configuration_vivit""": ["""VIVIT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """VivitConfig"""],
}
try:
      if not is_vision_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCAmelCase_					:   Tuple 							=						["""VivitImageProcessor"""]


try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCAmelCase_					:   Any 							=						[
          """VIVIT_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """VivitModel""",
          """VivitPreTrainedModel""",
          """VivitForVideoClassification""",
      ]


if TYPE_CHECKING:
      from .configuration_vivit import VIVIT_PRETRAINED_CONFIG_ARCHIVE_MAP, VivitConfig

      try:
            if not is_vision_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .image_processing_vivit import VivitImageProcessor

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_vivit import (
                VIVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
                VivitForVideoClassification,
                VivitModel,
                VivitPreTrainedModel,
            )


else:
      import sys

      UpperCAmelCase_					:   Dict 							=						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)
