

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


__UpperCAmelCase    				=     logging.get_logger(__name__)

__UpperCAmelCase    				=     {
    "studio-ousia/luke-base": "https://huggingface.co/studio-ousia/luke-base/resolve/main/config.json",
    "studio-ousia/luke-large": "https://huggingface.co/studio-ousia/luke-large/resolve/main/config.json",
}





class A__    ( _lowerCamelCase ):



 """simple docstring"""







 _lowercase     :					Optional[int]      =						'''luke'''

 def __init__(		self :	List[Any]     ,						A_ :	Optional[Any]=5_0_2_6_7     ,						A_ :	str=5_0_0_0_0_0     ,						A_ :	str=7_6_8     ,						A_ :	Union[str, Any]=2_5_6     ,						A_ :	Union[str, Any]=1_2     ,						A_ :	Union[str, Any]=1_2     ,						A_ :	List[Any]=3_0_7_2     ,						A_ :	Dict="gelu"     ,						A_ :	Any=0.1     ,						A_ :	List[Any]=0.1     ,						A_ :	Union[str, Any]=5_1_2     ,						A_ :	List[str]=2     ,						A_ :	Optional[int]=0.02     ,						A_ :	Dict=1E-12     ,						A_ :	int=True     ,						A_ :	List[Any]=None     ,						A_ :	Tuple=1     ,						A_ :	Union[str, Any]=0     ,						A_ :	int=2     ,						**A_ :	Dict     ,						):






      '''simple docstring'''




      super().__init__(pad_token_id=A__     ,						bos_token_id=A__     ,						eos_token_id=A__     ,						**A__       )

      _lowerCAmelCase   :					List[Any]        =    vocab_size
      _lowerCAmelCase   :					str        =    entity_vocab_size
      _lowerCAmelCase   :					Optional[Any]        =    hidden_size
      _lowerCAmelCase   :					Dict        =    entity_emb_size
      _lowerCAmelCase   :					Optional[Any]        =    num_hidden_layers
      _lowerCAmelCase   :					int        =    num_attention_heads
      _lowerCAmelCase   :					Tuple        =    hidden_act
      _lowerCAmelCase   :					Any        =    intermediate_size
      _lowerCAmelCase   :					str        =    hidden_dropout_prob
      _lowerCAmelCase   :					str        =    attention_probs_dropout_prob
      _lowerCAmelCase   :					Optional[Any]        =    max_position_embeddings
      _lowerCAmelCase   :					int        =    type_vocab_size
      _lowerCAmelCase   :					List[str]        =    initializer_range
      _lowerCAmelCase   :					str        =    layer_norm_eps
      _lowerCAmelCase   :					Optional[Any]        =    use_entity_aware_attention
      _lowerCAmelCase   :					Dict        =    classifier_dropout









import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


__UpperCAmelCase    				=     '\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 ):



 """simple docstring"""







 def    __magic_name__       (		self :	Tuple       ):






      '''simple docstring'''




      _lowerCAmelCase   :					Dict        =    load_tool("text-question-answering"       )
      self.tool.setup()
      _lowerCAmelCase   :					int        =    load_tool("text-question-answering"     ,						remote=A_       )

 def    __magic_name__       (		self :	List[str]       ):






      '''simple docstring'''




      _lowerCAmelCase   :					Dict        =    self.tool(A_     ,						"What did Hugging Face do in April 2021?"       )
      self.assertEqual(A_     ,						"launched the BigScience Research Workshop"       )

 def    __magic_name__       (		self :	Tuple       ):






      '''simple docstring'''




      _lowerCAmelCase   :					int        =    self.remote_tool(A_     ,						"What did Hugging Face do in April 2021?"       )
      self.assertEqual(A_     ,						"launched the BigScience Research Workshop"       )

 def    __magic_name__       (		self :	Dict       ):






      '''simple docstring'''




      _lowerCAmelCase   :					Union[str, Any]        =    self.tool(text=A_     ,						question="What did Hugging Face do in April 2021?"       )
      self.assertEqual(A_     ,						"launched the BigScience Research Workshop"       )


 def    __magic_name__       (		self :	Optional[Any]       ):






      '''simple docstring'''




      _lowerCAmelCase   :					Optional[int]        =    self.remote_tool(text=A_     ,						question="What did Hugging Face do in April 2021?"       )
      self.assertEqual(A_     ,						"launched the BigScience Research Workshop"       )






