
"""simple docstring"""






from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


UpperCamelCase_						   =   logging.get_logger(__name__)

UpperCamelCase_						   =   {
    'flaubert/flaubert_small_cased': 'https://huggingface.co/flaubert/flaubert_small_cased/resolve/main/config.json',
    'flaubert/flaubert_base_uncased': 'https://huggingface.co/flaubert/flaubert_base_uncased/resolve/main/config.json',
    'flaubert/flaubert_base_cased': 'https://huggingface.co/flaubert/flaubert_base_cased/resolve/main/config.json',
    'flaubert/flaubert_large_cased': 'https://huggingface.co/flaubert/flaubert_large_cased/resolve/main/config.json',
}





class 							snake_case       (     SCREAMING_SNAKE_CASE_		):
   a_					:		Dict     					=     """flaubert"""
   a_					:		Dict     					=     {
       """hidden_size""": """emb_dim""",
       """num_attention_heads""": """n_heads""",
       """num_hidden_layers""": """n_layers""",
       """n_words""": """vocab_size""",  # For backward compatibility
   }







   def __init__( self       ,							__UpperCAmelCase=False       ,							__UpperCAmelCase=0.0       ,							__UpperCAmelCase=3_01_45       ,							__UpperCAmelCase=20_48       ,							__UpperCAmelCase=12       ,							__UpperCAmelCase=16       ,							__UpperCAmelCase=0.1       ,							__UpperCAmelCase=0.1       ,							__UpperCAmelCase=True       ,							__UpperCAmelCase=False       ,							__UpperCAmelCase=False       ,							__UpperCAmelCase=False       ,							__UpperCAmelCase=1       ,							__UpperCAmelCase=True       ,							__UpperCAmelCase=5_12       ,							__UpperCAmelCase=20_48**-0.5       ,							__UpperCAmelCase=1E-12       ,							__UpperCAmelCase=0.02       ,							__UpperCAmelCase=0       ,							__UpperCAmelCase=1       ,							__UpperCAmelCase=2       ,							__UpperCAmelCase=3       ,							__UpperCAmelCase=5       ,							__UpperCAmelCase=True       ,							__UpperCAmelCase="first"       ,							__UpperCAmelCase=True       ,							__UpperCAmelCase=None       ,							__UpperCAmelCase=True       ,							__UpperCAmelCase=0.1       ,							__UpperCAmelCase=5       ,							__UpperCAmelCase=5       ,							__UpperCAmelCase=0       ,							__UpperCAmelCase=0       ,							__UpperCAmelCase=2       ,							__UpperCAmelCase=0       ,							**__UpperCAmelCase       ,							)   ->List[str]:
      a_						   =     pre_norm
      a_						   =     layerdrop
      a_						   =     vocab_size
      a_						   =     emb_dim
      a_						   =     n_layers
      a_						   =     n_heads
      a_						   =     dropout
      a_						   =     attention_dropout
      a_						   =     gelu_activation
      a_						   =     sinusoidal_embeddings
      a_						   =     causal
      a_						   =     asm
      a_						   =     n_langs
      a_						   =     use_lang_emb
      a_						   =     layer_norm_eps
      a_						   =     bos_index
      a_						   =     eos_index
      a_						   =     pad_index
      a_						   =     unk_index
      a_						   =     mask_index
      a_						   =     is_encoder
      a_						   =     max_position_embeddings
      a_						   =     embed_init_std
      a_						   =     init_std
      a_						   =     summary_type
      a_						   =     summary_use_proj
      a_						   =     summary_activation
      a_						   =     summary_proj_to_labels
      a_						   =     summary_first_dropout
      a_						   =     start_n_top
      a_						   =     end_n_top
      a_						   =     mask_token_id
      a_						   =     lang_id

      if "n_words" in kwargs:
         a_						   =     kwargs["n_words"]

      super().__init__(pad_token_id=__UpperCAmelCase       ,							bos_token_id=__UpperCAmelCase       ,							**__UpperCAmelCase)






class 							snake_case       (     SCREAMING_SNAKE_CASE_		):







   @property
   def    UpperCAmelCase__	( self)   ->Mapping[str, Mapping[int, str]]:
      if self.task == "multiple-choice":
         a_						   =     {0: "batch", 1: "choice", 2: "sequence"}
      else:
         a_						   =     {0: "batch", 1: "sequence"}
      return OrderedDict(
          [
              ("input_ids", dynamic_axis),
              ("attention_mask", dynamic_axis),
          ])

"""simple docstring"""






from typing import TYPE_CHECKING

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


UpperCamelCase_						   =   {
    'configuration_mobilevitv2': [
        'MOBILEVITV2_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'MobileViTV2Config',
        'MobileViTV2OnnxConfig',
    ],
}


try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase_						   =   [
          'MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST',
          'MobileViTV2ForImageClassification',
          'MobileViTV2ForSemanticSegmentation',
          'MobileViTV2Model',
          'MobileViTV2PreTrainedModel',
      ]

if TYPE_CHECKING:
      from .configuration_mobilevitva import (
          MOBILEVITV2_PRETRAINED_CONFIG_ARCHIVE_MAP,
          MobileViTVaConfig,
          MobileViTVaOnnxConfig,
      )

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_mobilevitva import (
                MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST,
                MobileViTVaForImageClassification,
                MobileViTVaForSemanticSegmentation,
                MobileViTVaModel,
                MobileViTVaPreTrainedModel,
            )

else:
      import sys

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