





"""simple docstring"""





import warnings

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


__A											=						logging.get_logger(__name__)

__A											=						{
    """RUCAIBox/mvp""": """https://huggingface.co/RUCAIBox/mvp/resolve/main/config.json""",
}






class    _lowerCAmelCase  (	a			):
       """simple docstring"""




       __magic_name__	:Tuple						    =   """mvp"""
       __magic_name__	:Optional[Any]						    =   ["""past_key_values"""]
       __magic_name__	:str						    =   {"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}






       def __init__(       self       ,					__UpperCAmelCase=5_0_2_6_7       ,					__UpperCAmelCase=1_0_2_4       ,					__UpperCAmelCase=1_2       ,					__UpperCAmelCase=4_0_9_6       ,					__UpperCAmelCase=1_6       ,					__UpperCAmelCase=1_2       ,					__UpperCAmelCase=4_0_9_6       ,					__UpperCAmelCase=1_6       ,					__UpperCAmelCase=0.0       ,					__UpperCAmelCase=0.0       ,					__UpperCAmelCase="gelu"       ,					__UpperCAmelCase=1_0_2_4       ,					__UpperCAmelCase=0.1       ,					__UpperCAmelCase=0.0       ,					__UpperCAmelCase=0.0       ,					__UpperCAmelCase=0.02       ,					__UpperCAmelCase=0.0       ,					__UpperCAmelCase=False       ,					__UpperCAmelCase=True       ,					__UpperCAmelCase=1       ,					__UpperCAmelCase=0       ,					__UpperCAmelCase=2       ,					__UpperCAmelCase=True       ,					__UpperCAmelCase=2       ,					__UpperCAmelCase=2       ,					__UpperCAmelCase=False       ,					__UpperCAmelCase=1_0_0       ,					__UpperCAmelCase=8_0_0       ,					**__UpperCAmelCase       ,					):



         '''simple docstring'''

         lowerCAmelCase__     :str											=				vocab_size
         lowerCAmelCase__     :List[Any]											=				max_position_embeddings
         lowerCAmelCase__     :List[str]											=				d_model
         lowerCAmelCase__     :Optional[int]											=				encoder_ffn_dim
         lowerCAmelCase__     :Dict											=				encoder_layers
         lowerCAmelCase__     :Optional[int]											=				encoder_attention_heads
         lowerCAmelCase__     :Dict											=				decoder_ffn_dim
         lowerCAmelCase__     :Optional[int]											=				decoder_layers
         lowerCAmelCase__     :List[Any]											=				decoder_attention_heads
         lowerCAmelCase__     :List[Any]											=				dropout
         lowerCAmelCase__     :Optional[Any]											=				attention_dropout
         lowerCAmelCase__     :int											=				activation_dropout
         lowerCAmelCase__     :List[str]											=				activation_function
         lowerCAmelCase__     :Any											=				init_std
         lowerCAmelCase__     :List[str]											=				encoder_layerdrop
         lowerCAmelCase__     :Optional[Any]											=				decoder_layerdrop
         lowerCAmelCase__     :Tuple											=				classifier_dropout
         lowerCAmelCase__     :Any											=				use_cache
         lowerCAmelCase__     :Tuple											=				encoder_layers
         lowerCAmelCase__     :str											=				scale_embedding  # scale factor will be sqrt(d_model) if True
         lowerCAmelCase__     :Any											=				use_prompt
         lowerCAmelCase__     :List[Any]											=				prompt_length
         lowerCAmelCase__     :Dict											=				prompt_mid_dim

         super().__init__(
             pad_token_id=__UpperCAmelCase       ,					bos_token_id=__UpperCAmelCase       ,					eos_token_id=__UpperCAmelCase       ,					is_encoder_decoder=__UpperCAmelCase       ,					decoder_start_token_id=__UpperCAmelCase       ,					forced_eos_token_id=__UpperCAmelCase       ,					**__UpperCAmelCase       ,					)

         if self.forced_bos_token_id is None and kwargs.get('force_bos_token_to_be_generated'       ,					__UpperCAmelCase ):
           lowerCAmelCase__     :str											=				self.bos_token_id
           warnings.warn(
               F"Please make sure the config includes `forced_bos_token_id={self.bos_token_id}` in future versions. "
               'The config can simply be saved and uploaded again to be fixed.' )






'''simple docstring'''


from typing import TYPE_CHECKING

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


lowerCAmelCase_      :  Optional[Any]				     =  {
    'configuration_mobilevit': ['MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MobileViTConfig', 'MobileViTOnnxConfig'],
}

try:
 if not is_vision_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase_      :  int				     =  ['MobileViTFeatureExtractor']
 lowerCAmelCase_      :  int				     =  ['MobileViTImageProcessor']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase_      :  str				     =  [
     'MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
     'MobileViTForImageClassification',
     'MobileViTForSemanticSegmentation',
     'MobileViTModel',
     'MobileViTPreTrainedModel',
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase_      :  Optional[Any]				     =  [
     'TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
     'TFMobileViTForImageClassification',
     'TFMobileViTForSemanticSegmentation',
     'TFMobileViTModel',
     'TFMobileViTPreTrainedModel',
 ]

if TYPE_CHECKING:
 from .configuration_mobilevit import MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP, MobileViTConfig, MobileViTOnnxConfig

 try:
  if not is_vision_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .feature_extraction_mobilevit import MobileViTFeatureExtractor
  from .image_processing_mobilevit import MobileViTImageProcessor

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_mobilevit import (
      MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
      MobileViTForImageClassification,
      MobileViTForSemanticSegmentation,
      MobileViTModel,
      MobileViTPreTrainedModel,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_mobilevit import (
      TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFMobileViTForImageClassification,
      TFMobileViTForSemanticSegmentation,
      TFMobileViTModel,
      TFMobileViTPreTrainedModel,
  )


else:
 import sys

 lowerCAmelCase_      :  List[Any]				     =  _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)
