


"""simple docstring"""


from collections import OrderedDict
from typing import Mapping

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


A	:  Any            =     logging.get_logger(__name__)

A	:  Union[str, Any]            =     {
    "xlm-mlm-en-2048": "https://huggingface.co/xlm-mlm-en-2048/resolve/main/config.json",
    "xlm-mlm-ende-1024": "https://huggingface.co/xlm-mlm-ende-1024/resolve/main/config.json",
    "xlm-mlm-enfr-1024": "https://huggingface.co/xlm-mlm-enfr-1024/resolve/main/config.json",
    "xlm-mlm-enro-1024": "https://huggingface.co/xlm-mlm-enro-1024/resolve/main/config.json",
    "xlm-mlm-tlm-xnli15-1024": "https://huggingface.co/xlm-mlm-tlm-xnli15-1024/resolve/main/config.json",
    "xlm-mlm-xnli15-1024": "https://huggingface.co/xlm-mlm-xnli15-1024/resolve/main/config.json",
    "xlm-clm-enfr-1024": "https://huggingface.co/xlm-clm-enfr-1024/resolve/main/config.json",
    "xlm-clm-ende-1024": "https://huggingface.co/xlm-clm-ende-1024/resolve/main/config.json",
    "xlm-mlm-17-1280": "https://huggingface.co/xlm-mlm-17-1280/resolve/main/config.json",
    "xlm-mlm-100-1280": "https://huggingface.co/xlm-mlm-100-1280/resolve/main/config.json",
}
class     _UpperCamelCase    (  lowerCAmelCase__						):
							'''simple docstring'''







							__UpperCAmelCase		:       Tuple							 ="""xlm"""
							__UpperCAmelCase		:       str							 ={
							    """hidden_size""": """emb_dim""",
							    """num_attention_heads""": """n_heads""",
							    """num_hidden_layers""": """n_layers""",
							    """n_words""": """vocab_size""",  # For backward compatibility
							}

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

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

										super().__init__(pad_token_id=__a       ,  bos_token_id=__a       ,  **__a      )
class     _UpperCamelCase    (  lowerCAmelCase__						):
							'''simple docstring'''







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








"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A	:  Union[str, Any]            =     {
    "configuration_timesformer": ["TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP", "TimesformerConfig"],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	A	:  Optional[int]            =     [
	    "TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
	    "TimesformerModel",
	    "TimesformerForVideoClassification",
	    "TimesformerPreTrainedModel",
	]

if TYPE_CHECKING:
	from .configuration_timesformer import TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, TimesformerConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_timesformer import (
		    TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TimesformerForVideoClassification,
		    TimesformerModel,
		    TimesformerPreTrainedModel,
		)

else:
	import sys

	A	:  List[str]            =     _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




