



'''simple docstring'''


from collections import OrderedDict
from typing import Mapping

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


lowercase							       =			logging.get_logger(__name__)

lowercase							       =			{
    '''distilbert-base-uncased''': '''https://huggingface.co/distilbert-base-uncased/resolve/main/config.json''',
    '''distilbert-base-uncased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-uncased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-cased''': '''https://huggingface.co/distilbert-base-cased/resolve/main/config.json''',
    '''distilbert-base-cased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-cased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-german-cased''': '''https://huggingface.co/distilbert-base-german-cased/resolve/main/config.json''',
    '''distilbert-base-multilingual-cased''': (
        '''https://huggingface.co/distilbert-base-multilingual-cased/resolve/main/config.json'''
    ),
    '''distilbert-base-uncased-finetuned-sst-2-english''': (
        '''https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english/resolve/main/config.json'''
    ),
}







class 	UpperCAmelCase	(		__a):


 '''simple docstring'''




 __magic_name__					: Dict  =      "distilbert"
 __magic_name__					: int  =      {
     "hidden_size": "dim",
     "num_attention_heads": "n_heads",
     "num_hidden_layers": "n_layers",
 }




 def __init__(   self							,  lowerCAmelCase_=3_0_5_2_2							,  lowerCAmelCase_=5_1_2							,  lowerCAmelCase_=False							,  lowerCAmelCase_=6							,  lowerCAmelCase_=1_2							,  lowerCAmelCase_=7_6_8							,  lowerCAmelCase_=4 * 7_6_8							,  lowerCAmelCase_=0.1							,  lowerCAmelCase_=0.1							,  lowerCAmelCase_="gelu"							,  lowerCAmelCase_=0.0_2							,  lowerCAmelCase_=0.1							,  lowerCAmelCase_=0.2							,  lowerCAmelCase_=0							,  **lowerCAmelCase_							,  ) ->      List[Any]:



      """simple docstring"""







      a_       		=vocab_size
      a_       		=max_position_embeddings
      a_       		=sinusoidal_pos_embds
      a_       		=n_layers
      a_       		=n_heads
      a_       		=dim
      a_       		=hidden_dim
      a_       		=dropout
      a_       		=attention_dropout
      a_       		=activation
      a_       		=initializer_range
      a_       		=qa_dropout
      a_       		=seq_classif_dropout
      super().__init__(**lowerCAmelCase_							,  pad_token_id=lowerCAmelCase_)







class 	UpperCAmelCase	(		__a):


 '''simple docstring'''




 @property
 def       lowercase_  (   self) ->      Mapping[str, Mapping[int, str]]:



      """simple docstring"""







      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_flax_available,
    is_tf_available,
    is_torch_available,
)


lowercase							       =			{
    '''configuration_vision_encoder_decoder''': ['''VisionEncoderDecoderConfig''', '''VisionEncoderDecoderOnnxConfig''']
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase							       =			['''VisionEncoderDecoderModel''']

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase							       =			['''TFVisionEncoderDecoderModel''']

try:
  if not is_flax_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase							       =			['''FlaxVisionEncoderDecoderModel''']

if TYPE_CHECKING:
  from .configuration_vision_encoder_decoder import VisionEncoderDecoderConfig, VisionEncoderDecoderOnnxConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_vision_encoder_decoder import VisionEncoderDecoderModel

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_vision_encoder_decoder import TFVisionEncoderDecoderModel

  try:
    if not is_flax_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_flax_vision_encoder_decoder import FlaxVisionEncoderDecoderModel

else:
  import sys

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


