


from collections import OrderedDict
from typing import Mapping

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


__UpperCamelCase				:  Dict      					=							logging.get_logger(__name__)

__UpperCamelCase				:  Any      					=							{
    'facebook/xmod-base': 'https://huggingface.co/facebook/xmod-base/resolve/main/config.json',
    'facebook/xmod-large-prenorm': 'https://huggingface.co/facebook/xmod-large-prenorm/resolve/main/config.json',
    'facebook/xmod-base-13-125k': 'https://huggingface.co/facebook/xmod-base-13-125k/resolve/main/config.json',
    'facebook/xmod-base-30-125k': 'https://huggingface.co/facebook/xmod-base-30-125k/resolve/main/config.json',
    'facebook/xmod-base-30-195k': 'https://huggingface.co/facebook/xmod-base-30-195k/resolve/main/config.json',
    'facebook/xmod-base-60-125k': 'https://huggingface.co/facebook/xmod-base-60-125k/resolve/main/config.json',
    'facebook/xmod-base-60-265k': 'https://huggingface.co/facebook/xmod-base-60-265k/resolve/main/config.json',
    'facebook/xmod-base-75-125k': 'https://huggingface.co/facebook/xmod-base-75-125k/resolve/main/config.json',
    'facebook/xmod-base-75-269k': 'https://huggingface.co/facebook/xmod-base-75-269k/resolve/main/config.json',
}





class  lowerCAmelCase__(    _UpperCamelCase						):






    '''simple docstring'''





    A_  :     Optional[int]			= 'xmod'





    def __init__(	self				:   List[str]       ,   __snake_case				:   List[str]=30_522       ,   __snake_case				:   Union[str, Any]=768       ,   __snake_case				:   Tuple=12       ,   __snake_case				:   List[Any]=12       ,   __snake_case				:   Optional[int]=3_072       ,   __snake_case				:   Dict="gelu"       ,   __snake_case				:   str=0.1       ,   __snake_case				:   Dict=0.1       ,   __snake_case				:   Optional[Any]=512       ,   __snake_case				:   Dict=2       ,   __snake_case				:   List[str]=0.02       ,   __snake_case				:   Optional[Any]=1E-12       ,   __snake_case				:   Dict=1       ,   __snake_case				:   Optional[Any]=0       ,   __snake_case				:   List[Any]=2       ,   __snake_case				:   Any="absolute"       ,   __snake_case				:   Union[str, Any]=True       ,   __snake_case				:   List[str]=None       ,   __snake_case				:   Optional[Any]=False       ,   __snake_case				:   Optional[Any]=2       ,   __snake_case				:   Any=False       ,   __snake_case				:   Union[str, Any]=True       ,   __snake_case				:   Optional[int]=True       ,   __snake_case				:   List[str]=("en_XX",)       ,   __snake_case				:   Any=None       ,   **__snake_case				:   Any       ,   ):





       '''simple docstring'''
       super().__init__(pad_token_id=__snake_case       ,   bos_token_id=__snake_case       ,   eos_token_id=__snake_case       ,   **__snake_case	)

       UpperCAmelCase_							:      List[str]						=   vocab_size
       UpperCAmelCase_							:      Optional[int]						=   hidden_size
       UpperCAmelCase_							:      Any						=   num_hidden_layers
       UpperCAmelCase_							:      Any						=   num_attention_heads
       UpperCAmelCase_							:      int						=   hidden_act
       UpperCAmelCase_							:      Dict						=   intermediate_size
       UpperCAmelCase_							:      Optional[int]						=   hidden_dropout_prob
       UpperCAmelCase_							:      int						=   attention_probs_dropout_prob
       UpperCAmelCase_							:      Tuple						=   max_position_embeddings
       UpperCAmelCase_							:      int						=   type_vocab_size
       UpperCAmelCase_							:      Optional[Any]						=   initializer_range
       UpperCAmelCase_							:      Optional[int]						=   layer_norm_eps
       UpperCAmelCase_							:      int						=   position_embedding_type
       UpperCAmelCase_							:      List[str]						=   use_cache
       UpperCAmelCase_							:      Union[str, Any]						=   classifier_dropout
       UpperCAmelCase_							:      Tuple						=   pre_norm
       UpperCAmelCase_							:      str						=   adapter_reduction_factor
       UpperCAmelCase_							:      int						=   adapter_layer_norm
       UpperCAmelCase_							:      Any						=   adapter_reuse_layer_norm
       UpperCAmelCase_							:      List[str]						=   ln_before_adapter
       UpperCAmelCase_							:      Union[str, Any]						=   list(__snake_case	)
       UpperCAmelCase_							:      Optional[int]						=   default_language





class  lowerCAmelCase__(    _UpperCamelCase						):






    '''simple docstring'''





    @property
    def 					_lowerCamelCase (	self				:   Optional[int]	):





       '''simple docstring'''
       if self.task == "multiple-choice":
          UpperCAmelCase_							:      Tuple						=   {0: "batch", 1: "choice", 2: "sequence"}
       else:
          UpperCAmelCase_							:      List[Any]						=   {0: "batch", 1: "sequence"}
       return OrderedDict(
           [
               ('''input_ids''', dynamic_axis),
               ('''attention_mask''', dynamic_axis),
           ]	)




# 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				:  List[Any]      					=							{
    'configuration_vivit': ['VIVIT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'VivitConfig'],
}
try:
       if not is_vision_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase				:  Optional[Any]      					=							['VivitImageProcessor']


try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase				:  List[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				:  str      					=							_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)