"""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 :     List[str]				       =				{
    "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'''






    __magic_name__   :			Any       		=       """xmod"""





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

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






class 	__lowerCAmelCase					(      _UpperCamelCase):




    '''simple docstring'''






    @property
    def 					_UpperCAmelCase		(     self				:	Any							):


          if self.task == "multiple-choice":
                A__	:      Optional[int]      ={0: "batch", 1: "choice", 2: "sequence"}
          else:
                A__	:      int      ={0: "batch", 1: "sequence"}
          return OrderedDict(
              [
                  ("input_ids", dynamic_axis),
                  ("attention_mask", dynamic_axis),
              ]							)













from typing import TYPE_CHECKING

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


UpperCAmelCase__							  =						{"processing_layoutxlm": ["LayoutXLMProcessor"]}

try:
     if not is_sentencepiece_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCAmelCase__							  =						["LayoutXLMTokenizer"]

try:
     if not is_tokenizers_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCAmelCase__							  =						["LayoutXLMTokenizerFast"]

if TYPE_CHECKING:
     from .processing_layoutxlm import LayoutXLMProcessor

     try:
          if not is_sentencepiece_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .tokenization_layoutxlm import LayoutXLMTokenizer

     try:
          if not is_tokenizers_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .tokenization_layoutxlm_fast import LayoutXLMTokenizerFast

else:
     import sys

     UpperCAmelCase__							  =						_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


