


'''simple docstring'''
from collections import OrderedDict
from typing import Mapping

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


lowerCAmelCase						=					logging.get_logger(__name__)

lowerCAmelCase						=					{
    """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	):
       __UpperCAmelCase					='xmod'






       def __init__( self			,     _UpperCamelCase=3_0522			,     _UpperCamelCase=768			,     _UpperCamelCase=12			,     _UpperCamelCase=12			,     _UpperCamelCase=3072			,     _UpperCamelCase="gelu"			,     _UpperCamelCase=0.1			,     _UpperCamelCase=0.1			,     _UpperCamelCase=512			,     _UpperCamelCase=2			,     _UpperCamelCase=0.02			,     _UpperCamelCase=1e-12			,     _UpperCamelCase=1			,     _UpperCamelCase=0			,     _UpperCamelCase=2			,     _UpperCamelCase="absolute"			,     _UpperCamelCase=True			,     _UpperCamelCase=None			,     _UpperCamelCase=False			,     _UpperCamelCase=2			,     _UpperCamelCase=False			,     _UpperCamelCase=True			,     _UpperCamelCase=True			,     _UpperCamelCase=("en_XX",)			,     _UpperCamelCase=None			,     **_UpperCamelCase			,     )->      Optional[Any]:
            super().__init__(pad_token_id=_UpperCamelCase			,     bos_token_id=_UpperCamelCase			,     eos_token_id=_UpperCamelCase			,     **_UpperCamelCase   )

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






class        lowerCAmelCase_  (     UpperCAmelCase	):






       @property
       def   UpperCamelCase						( self   )->      Mapping[str, Mapping[int, str]]:
            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 .testing import (
    are_the_same_tensors,
    execute_subprocess_async,
    require_bnb,
    require_cpu,
    require_cuda,
    require_huggingface_suite,
    require_mps,
    require_multi_gpu,
    require_multi_xpu,
    require_safetensors,
    require_single_gpu,
    require_single_xpu,
    require_torch_min_version,
    require_tpu,
    require_xpu,
    skip,
    slow,
)
from .training import RegressionDataset, RegressionModel, RegressionModelaXPU


from .scripts import test_script, test_sync, test_ops  # isort: skip





