






import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


lowerCamelCase			:					Union[str, Any]         =	'''
Hugging 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.

In March 2021, Hugging Face raised $40 million in a Series B funding round.[3]

On 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]
'''



class 							_UpperCamelCase			(unittest.TestCase							,		a_			):


      def  __UpperCAmelCase		(	self	)->	Optional[int]:
           __lowerCAmelCase								=					load_tool("text-question-answering"	)
           self.tool.setup()
           __lowerCAmelCase								=					load_tool("text-question-answering"					,						remote=__UpperCamelCase	)


      def  __UpperCAmelCase		(	self	)->	Any:
           __lowerCAmelCase								=					self.tool(__UpperCamelCase					,						"What did Hugging Face do in April 2021?"	)
           self.assertEqual(__UpperCamelCase					,						"launched the BigScience Research Workshop"	)


      def  __UpperCAmelCase		(	self	)->	Optional[Any]:
           __lowerCAmelCase								=					self.remote_tool(__UpperCamelCase					,						"What did Hugging Face do in April 2021?"	)
           self.assertEqual(__UpperCamelCase					,						"launched the BigScience Research Workshop"	)


      def  __UpperCAmelCase		(	self	)->	str:
           __lowerCAmelCase								=					self.tool(text=__UpperCamelCase					,						question="What did Hugging Face do in April 2021?"	)
           self.assertEqual(__UpperCamelCase					,						"launched the BigScience Research Workshop"	)


      def  __UpperCAmelCase		(	self	)->	str:
           __lowerCAmelCase								=					self.remote_tool(text=__UpperCamelCase					,						question="What did Hugging Face do in April 2021?"	)
           self.assertEqual(__UpperCamelCase					,						"launched the BigScience Research Workshop"	)














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


lowerCamelCase			:					List[str]         =	logging.get_logger(__name__)

lowerCamelCase			:					Dict         =	{
    '''microsoft/biogpt''': '''https://huggingface.co/microsoft/biogpt/resolve/main/config.json''',
    # See all BioGPT models at https://huggingface.co/models?filter=biogpt
}



class 							_UpperCamelCase			(a_			):
      snake_case_  =							"""biogpt"""


      def __init__(	self					,						__UpperCamelCase=4_2_3_8_4					,						__UpperCamelCase=1_0_2_4					,						__UpperCamelCase=2_4					,						__UpperCamelCase=1_6					,						__UpperCamelCase=4_0_9_6					,						__UpperCamelCase="gelu"					,						__UpperCamelCase=0.1					,						__UpperCamelCase=0.1					,						__UpperCamelCase=1_0_2_4					,						__UpperCamelCase=0.0_2					,						__UpperCamelCase=1e-12					,						__UpperCamelCase=True					,						__UpperCamelCase=True					,						__UpperCamelCase=0.0					,						__UpperCamelCase=0.0					,						__UpperCamelCase=1					,						__UpperCamelCase=0					,						__UpperCamelCase=2					,						**__UpperCamelCase					,						)->	Optional[Any]:
           __lowerCAmelCase								=					vocab_size
           __lowerCAmelCase								=					max_position_embeddings
           __lowerCAmelCase								=					hidden_size
           __lowerCAmelCase								=					num_hidden_layers
           __lowerCAmelCase								=					num_attention_heads
           __lowerCAmelCase								=					intermediate_size
           __lowerCAmelCase								=					hidden_act
           __lowerCAmelCase								=					hidden_dropout_prob
           __lowerCAmelCase								=					attention_probs_dropout_prob
           __lowerCAmelCase								=					initializer_range
           __lowerCAmelCase								=					layer_norm_eps
           __lowerCAmelCase								=					scale_embedding
           __lowerCAmelCase								=					use_cache
           __lowerCAmelCase								=					layerdrop
           __lowerCAmelCase								=					activation_dropout
           super().__init__(pad_token_id=__UpperCamelCase					,						bos_token_id=__UpperCamelCase					,						eos_token_id=__UpperCamelCase					,						**__UpperCamelCase	)






