
"""simple docstring"""





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


UpperCamelCase_					:						Any				= logging.get_logger(__name__)

UpperCamelCase_					:						int				= {
    '''uw-madison/mra-base-512-4''': '''https://huggingface.co/uw-madison/mra-base-512-4/resolve/main/config.json''',
}



class __lowerCAmelCase				(					_lowercase      ):




   """simple docstring"""







   snake_case	      =				"mra"




   def __init__(				self						:					str       ,   _snake_case						:					List[str]=50_265       ,   _snake_case						:					int=768       ,   _snake_case						:					Tuple=12       ,   _snake_case						:					List[str]=12       ,   _snake_case						:					int=3_072       ,   _snake_case						:					Any="gelu"       ,   _snake_case						:					Optional[int]=0.1       ,   _snake_case						:					List[str]=0.1       ,   _snake_case						:					Tuple=512       ,   _snake_case						:					Optional[int]=1       ,   _snake_case						:					Dict=0.0_2       ,   _snake_case						:					List[Any]=1e-5       ,   _snake_case						:					List[Any]="absolute"       ,   _snake_case						:					Any=4       ,   _snake_case						:					Union[str, Any]="full"       ,   _snake_case						:					Any=0       ,   _snake_case						:					int=0       ,   _snake_case						:					Dict=1       ,   _snake_case						:					List[str]=0       ,   _snake_case						:					Dict=2       ,   **_snake_case						:					Optional[Any]       ,   )      -> Union[str, Any]:







        """simple docstring"""
        super().__init__(pad_token_id=_snake_case       ,   bos_token_id=_snake_case       ,   eos_token_id=_snake_case       ,   **_snake_case	)

        A_				 =						vocab_size
        A_				 =						max_position_embeddings
        A_				 =						hidden_size
        A_				 =						num_hidden_layers
        A_				 =						num_attention_heads
        A_				 =						intermediate_size
        A_				 =						hidden_act
        A_				 =						hidden_dropout_prob
        A_				 =						attention_probs_dropout_prob
        A_				 =						initializer_range
        A_				 =						type_vocab_size
        A_				 =						layer_norm_eps
        A_				 =						position_embedding_type
        A_				 =						block_per_row
        A_				 =						approx_mode
        A_				 =						initial_prior_first_n_blocks
        A_				 =						initial_prior_diagonal_n_blocks






"""simple docstring"""





import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


UpperCamelCase_					:						int				= '''
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 __lowerCAmelCase				(					unittest.TestCase     ,				_lowercase      ):




			"""simple docstring"""







			def      lowerCamelCase__     (				self						:					str	)      -> Dict:







								"""simple docstring"""
								A_				 =						load_tool("text-question-answering"	)
								self.tool.setup()
								A_				 =						load_tool("text-question-answering"       ,   remote=_snake_case	)




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







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




			def      lowerCamelCase__     (				self						:					Union[str, Any]	)      -> int:







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




			def      lowerCamelCase__     (				self						:					Optional[Any]	)      -> Optional[Any]:







								"""simple docstring"""
								A_				 =						self.tool(text=_snake_case       ,   question="What did Hugging Face do in April 2021?"	)
								self.assertEqual(_snake_case       ,   "launched the BigScience Research Workshop"	)






			def      lowerCamelCase__     (				self						:					str	)      -> Optional[Any]:







								"""simple docstring"""
								A_				 =						self.remote_tool(text=_snake_case       ,   question="What did Hugging Face do in April 2021?"	)
								self.assertEqual(_snake_case       ,   "launched the BigScience Research Workshop"	)




