




'''simple docstring'''


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


_snake_case   :   Union[str, Any]     							=	logging.get_logger(__name__)

_snake_case   :   str     							=	{
    '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     A					(	_a					):
       lowercase_           =       'markuplm'







       def __init__(						self :						List[str]							,    lowerCAmelCase_ :						str=3_05_22							,    lowerCAmelCase_ :						List[Any]=7_68							,    lowerCAmelCase_ :						List[str]=12							,    lowerCAmelCase_ :						Union[str, Any]=12							,    lowerCAmelCase_ :						List[str]=30_72							,    lowerCAmelCase_ :						Tuple="gelu"							,    lowerCAmelCase_ :						str=0.1							,    lowerCAmelCase_ :						Optional[Any]=0.1							,    lowerCAmelCase_ :						str=5_12							,    lowerCAmelCase_ :						Optional[Any]=2							,    lowerCAmelCase_ :						Dict=0.0_2							,    lowerCAmelCase_ :						Union[str, Any]=1e-12							,    lowerCAmelCase_ :						Dict=0							,    lowerCAmelCase_ :						Tuple=0							,    lowerCAmelCase_ :						Union[str, Any]=2							,    lowerCAmelCase_ :						Optional[Any]=2_56							,    lowerCAmelCase_ :						List[Any]=10_24							,    lowerCAmelCase_ :						int=2_16							,    lowerCAmelCase_ :						List[str]=10_01							,    lowerCAmelCase_ :						Optional[Any]=32							,    lowerCAmelCase_ :						str=50							,    lowerCAmelCase_ :						Optional[int]="absolute"							,    lowerCAmelCase_ :						Dict=True							,    lowerCAmelCase_ :						Any=None							,    **lowerCAmelCase_ :						List[str]							,    )    ->							List[Any]:


              """simple docstring"""


              super().__init__(
                  pad_token_id=lowerCAmelCase_							,    bos_token_id=lowerCAmelCase_							,    eos_token_id=lowerCAmelCase_							,    **lowerCAmelCase_							,    )
              _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







'''simple docstring'''


import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


_snake_case   :   str     							=	'\nHugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf originally as a company that developed a chatbot app targeted at teenagers.[2] After open-sourcing the model behind the chatbot, the company pivoted to focus on being a platform for machine learning.\n\nIn March 2021, Hugging Face raised $40 million in a Series B funding round.[3]\n\nOn April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model.[4] In 2022, the workshop concluded with the announcement of BLOOM, a multilingual large language model with 176 billion parameters.[5]\n'

class     A					(	unittest.TestCase  ,_a					):







							def      __lowerCAmelCase    (						self :						Any      )    ->							Dict:


														"""simple docstring"""


														_a			  =       load_tool('''text-question-answering'''      )
														self.tool.setup()
														_a			  =       load_tool('''text-question-answering'''							,    remote=lowerCAmelCase_      )







							def      __lowerCAmelCase    (						self :						List[Any]      )    ->							Optional[int]:


														"""simple docstring"""


														_a			  =       self.tool(lowerCAmelCase_							,    '''What did Hugging Face do in April 2021?'''      )
														self.assertEqual(lowerCAmelCase_							,    '''launched the BigScience Research Workshop'''      )







							def      __lowerCAmelCase    (						self :						Union[str, Any]      )    ->							Dict:


														"""simple docstring"""


														_a			  =       self.remote_tool(lowerCAmelCase_							,    '''What did Hugging Face do in April 2021?'''      )
														self.assertEqual(lowerCAmelCase_							,    '''launched the BigScience Research Workshop'''      )







							def      __lowerCAmelCase    (						self :						List[Any]      )    ->							List[str]:


														"""simple docstring"""


														_a			  =       self.tool(text=lowerCAmelCase_							,    question='''What did Hugging Face do in April 2021?'''      )
														self.assertEqual(lowerCAmelCase_							,    '''launched the BigScience Research Workshop'''      )







							def      __lowerCAmelCase    (						self :						int      )    ->							List[Any]:


														"""simple docstring"""


														_a			  =       self.remote_tool(text=lowerCAmelCase_							,    question='''What did Hugging Face do in April 2021?'''      )
														self.assertEqual(lowerCAmelCase_							,    '''launched the BigScience Research Workshop'''      )

