






from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase__							  =						logging.get_logger(__name__)

UpperCAmelCase__							  =						{
    "microsoft/markuplm-base": "https://huggingface.co/microsoft/markuplm-base/resolve/main/config.json",
    "microsoft/markuplm-large": "https://huggingface.co/microsoft/markuplm-large/resolve/main/config.json",
}






class 						lowercase_   (      lowercase  ):






      '''simple docstring'''




      __snake_case	    =    '''markuplm'''







      def __init__( self :		Optional[Any]					,   __UpperCAmelCase :		Any=30_522					,   __UpperCAmelCase :		Any=768					,   __UpperCAmelCase :		List[Any]=12					,   __UpperCAmelCase :		str=12					,   __UpperCAmelCase :		int=3_072					,   __UpperCAmelCase :		Any="gelu"					,   __UpperCAmelCase :		Tuple=0.1					,   __UpperCAmelCase :		Tuple=0.1					,   __UpperCAmelCase :		Any=512					,   __UpperCAmelCase :		Union[str, Any]=2					,   __UpperCAmelCase :		Dict=0.02					,   __UpperCAmelCase :		Tuple=1e-1_2					,   __UpperCAmelCase :		Dict=0					,   __UpperCAmelCase :		Any=0					,   __UpperCAmelCase :		List[Any]=2					,   __UpperCAmelCase :		Optional[Any]=256					,   __UpperCAmelCase :		List[str]=1_024					,   __UpperCAmelCase :		Union[str, Any]=216					,   __UpperCAmelCase :		List[str]=1_001					,   __UpperCAmelCase :		str=32					,   __UpperCAmelCase :		Tuple=50					,   __UpperCAmelCase :		Any="absolute"					,   __UpperCAmelCase :		Optional[int]=True					,   __UpperCAmelCase :		List[str]=None					,   **__UpperCAmelCase :		int					,   )       ->Dict:




       """simple docstring"""


       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
       # additional properties
       a						    = max_depth
       a						    = max_xpath_tag_unit_embeddings
       a						    = max_xpath_subs_unit_embeddings
       a						    = tag_pad_id
       a						    = subs_pad_id
       a						    = xpath_unit_hidden_size










from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


UpperCAmelCase__							  =						{
    "configuration_rag": ["RagConfig"],
    "retrieval_rag": ["RagRetriever"],
    "tokenization_rag": ["RagTokenizer"],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCAmelCase__							  =						[
         "RagModel",
         "RagPreTrainedModel",
         "RagSequenceForGeneration",
         "RagTokenForGeneration",
     ]

try:
     if not is_tf_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCAmelCase__							  =						[
         "TFRagModel",
         "TFRagPreTrainedModel",
         "TFRagSequenceForGeneration",
         "TFRagTokenForGeneration",
     ]


if TYPE_CHECKING:
     from .configuration_rag import RagConfig
     from .retrieval_rag import RagRetriever
     from .tokenization_rag import RagTokenizer

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_rag import RagModel, RagPreTrainedModel, RagSequenceForGeneration, RagTokenForGeneration

     try:
          if not is_tf_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_tf_rag import (
              TFRagModel,
              TFRagPreTrainedModel,
              TFRagSequenceForGeneration,
              TFRagTokenForGeneration,
          )

else:
     import sys

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


