




"""simple docstring"""







from collections import OrderedDict
from typing import Mapping

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


a            =							logging.get_logger(__name__)

a            =							{
    '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 					SCREAMING_SNAKE_CASE__    (    _a    ):
						_a			  =  'xmod'


						def __init__(							self :	Optional[Any]  ,  lowerCAmelCase :	Dict=3_0522  ,  lowerCAmelCase :	Dict=768  ,  lowerCAmelCase :	Optional[Any]=12  ,  lowerCAmelCase :	Union[str, Any]=12  ,  lowerCAmelCase :	Optional[int]=3072  ,  lowerCAmelCase :	int="gelu"  ,  lowerCAmelCase :	Any=0.1  ,  lowerCAmelCase :	Any=0.1  ,  lowerCAmelCase :	List[Any]=512  ,  lowerCAmelCase :	Any=2  ,  lowerCAmelCase :	Optional[int]=0.02  ,  lowerCAmelCase :	Dict=1e-12  ,  lowerCAmelCase :	Optional[Any]=1  ,  lowerCAmelCase :	List[str]=0  ,  lowerCAmelCase :	List[str]=2  ,  lowerCAmelCase :	List[Any]="absolute"  ,  lowerCAmelCase :	List[str]=True  ,  lowerCAmelCase :	Dict=None  ,  lowerCAmelCase :	Optional[Any]=False  ,  lowerCAmelCase :	Tuple=2  ,  lowerCAmelCase :	Any=False  ,  lowerCAmelCase :	Optional[Any]=True  ,  lowerCAmelCase :	Optional[Any]=True  ,  lowerCAmelCase :	Union[str, Any]=("en_XX",)  ,  lowerCAmelCase :	List[str]=None  ,  **lowerCAmelCase :	List[Any]  ,  ):
										super().__init__(pad_token_id=SCREAMING_SNAKE_CASE_  ,  bos_token_id=SCREAMING_SNAKE_CASE_  ,  eos_token_id=SCREAMING_SNAKE_CASE_  ,  **SCREAMING_SNAKE_CASE_    )

										lowerCAmelCase              = vocab_size
										lowerCAmelCase              = hidden_size
										lowerCAmelCase              = num_hidden_layers
										lowerCAmelCase              = num_attention_heads
										lowerCAmelCase              = hidden_act
										lowerCAmelCase              = intermediate_size
										lowerCAmelCase              = hidden_dropout_prob
										lowerCAmelCase              = attention_probs_dropout_prob
										lowerCAmelCase              = max_position_embeddings
										lowerCAmelCase              = type_vocab_size
										lowerCAmelCase              = initializer_range
										lowerCAmelCase              = layer_norm_eps
										lowerCAmelCase              = position_embedding_type
										lowerCAmelCase              = use_cache
										lowerCAmelCase              = classifier_dropout
										lowerCAmelCase              = pre_norm
										lowerCAmelCase              = adapter_reduction_factor
										lowerCAmelCase              = adapter_layer_norm
										lowerCAmelCase              = adapter_reuse_layer_norm
										lowerCAmelCase              = ln_before_adapter
										lowerCAmelCase              = list(SCREAMING_SNAKE_CASE_    )
										lowerCAmelCase              = default_language






class 					SCREAMING_SNAKE_CASE__    (    _a    ):


						@property
						def      __lowercase       (							self :	Union[str, Any]    ):
										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),
										    ]    )







from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
						if not (is_transformers_available() and is_torch_available() and is_transformers_version('>=', '4.25.0')):
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						from ...utils.dummy_torch_and_transformers_objects import UnCLIPImageVariationPipeline, UnCLIPPipeline
else:
						from .pipeline_unclip import UnCLIPPipeline
						from .pipeline_unclip_image_variation import UnCLIPImageVariationPipeline
						from .text_proj import UnCLIPTextProjModel




