



'''simple docstring'''







# 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

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


SCREAMING_SNAKE_CASE__     : Dict				=   {
    """configuration_tvlt""": ["""TVLT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """TvltConfig"""],
    """feature_extraction_tvlt""": ["""TvltFeatureExtractor"""],
    """processing_tvlt""": ["""TvltProcessor"""],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							SCREAMING_SNAKE_CASE__     : Tuple				=   [
							    """TVLT_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """TvltModel""",
							    """TvltForPreTraining""",
							    """TvltForAudioVisualClassification""",
							    """TvltPreTrainedModel""",
							]

try:
							if not is_vision_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							SCREAMING_SNAKE_CASE__     : List[str]				=   ["""TvltImageProcessor"""]


if TYPE_CHECKING:
							from .configuration_tvlt import TVLT_PRETRAINED_CONFIG_ARCHIVE_MAP, TvltConfig
							from .processing_tvlt import TvltProcessor
							from .feature_extraction_tvlt import TvltFeatureExtractor

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_tvlt import (
														    TVLT_PRETRAINED_MODEL_ARCHIVE_LIST,
														    TvltForAudioVisualClassification,
														    TvltForPreTraining,
														    TvltModel,
														    TvltPreTrainedModel,
														)

							try:
														if not is_vision_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .image_processing_tvlt import TvltImageProcessor


else:
							import sys

							SCREAMING_SNAKE_CASE__     : Any				=   _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




"""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          = {
    """squeezebert/squeezebert-uncased""": (
        """https://huggingface.co/squeezebert/squeezebert-uncased/resolve/main/config.json"""
    ),
    """squeezebert/squeezebert-mnli""": """https://huggingface.co/squeezebert/squeezebert-mnli/resolve/main/config.json""",
    """squeezebert/squeezebert-mnli-headless""": (
        """https://huggingface.co/squeezebert/squeezebert-mnli-headless/resolve/main/config.json"""
    ),
}






class 		_A    (    _a    ):







    """simple docstring"""




    UpperCAmelCase			:				Tuple      =			SQUEEZEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
    UpperCAmelCase			:				Any      =			"""squeezebert"""






    def __init__(   self							:       List[str]							,					__UpperCAmelCase							:       Tuple=30522							,					__UpperCAmelCase							:       Tuple=768							,					__UpperCAmelCase							:       int=12							,					__UpperCAmelCase							:       str=12							,					__UpperCAmelCase							:       List[Any]=3072							,					__UpperCAmelCase							:       Dict="gelu"							,					__UpperCAmelCase							:       List[Any]=0.1							,					__UpperCAmelCase							:       Optional[int]=0.1							,					__UpperCAmelCase							:       Optional[Any]=512							,					__UpperCAmelCase							:       int=2							,					__UpperCAmelCase							:       Dict=0.02							,					__UpperCAmelCase							:       Optional[int]=1e-12							,					__UpperCAmelCase							:       Optional[Any]=0							,					__UpperCAmelCase							:       Optional[Any]=768							,					__UpperCAmelCase							:       Tuple=4							,					__UpperCAmelCase							:       Dict=4							,					__UpperCAmelCase							:       str=4							,					__UpperCAmelCase							:       List[Any]=1							,					__UpperCAmelCase							:       Optional[int]=4							,					__UpperCAmelCase							:       Optional[int]=4							,					**__UpperCAmelCase							:       Tuple							,					):
      super().__init__(pad_token_id=__UpperCAmelCase							,					**__UpperCAmelCase)

      a		:						List[Any] 				=     vocab_size
      a		:						List[Any] 				=     hidden_size
      a		:						Dict 				=     num_hidden_layers
      a		:						int 				=     num_attention_heads
      a		:						Dict 				=     hidden_act
      a		:						Tuple 				=     intermediate_size
      a		:						int 				=     hidden_dropout_prob
      a		:						List[Any] 				=     attention_probs_dropout_prob
      a		:						Union[str, Any] 				=     max_position_embeddings
      a		:						Union[str, Any] 				=     type_vocab_size
      a		:						Optional[Any] 				=     initializer_range
      a		:						Any 				=     layer_norm_eps
      a		:						Any 				=     embedding_size
      a		:						Tuple 				=     q_groups
      a		:						List[str] 				=     k_groups
      a		:						str 				=     v_groups
      a		:						Optional[Any] 				=     post_attention_groups
      a		:						List[str] 				=     intermediate_groups
      a		:						Optional[int] 				=     output_groups






class 		_A    (    _a    ):







    """simple docstring"""




    @property
    def       __snake_case				(   self							:       Optional[Any]):
      if self.task == "multiple-choice":
        a		:						Optional[int] 				=     {0: "batch", 1: "choice", 2: "sequence"}
      else:
        a		:						Tuple 				=     {0: "batch", 1: "sequence"}
      return OrderedDict(
          [
              ("input_ids", dynamic_axis),
              ("attention_mask", dynamic_axis),
              ("token_type_ids", dynamic_axis),
          ])






