





"""simple docstring"""



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


a_				=    logging.get_logger(__name__)

a_				=    {
    """uw-madison/yoso-4096""": """https://huggingface.co/uw-madison/yoso-4096/resolve/main/config.json""",
    # See all YOSO models at https://huggingface.co/models?filter=yoso
}






class 	__snake_case      (	SCREAMING_SNAKE_CASE__  ):





 """simple docstring"""


 _lowerCamelCase				 =  """yoso"""

 def __init__(					self      ,		__lowerCamelCase=5_0265      ,		__lowerCamelCase=768      ,		__lowerCamelCase=12      ,		__lowerCamelCase=12      ,		__lowerCamelCase=3072      ,		__lowerCamelCase="gelu"      ,		__lowerCamelCase=0.1      ,		__lowerCamelCase=0.1      ,		__lowerCamelCase=4096      ,		__lowerCamelCase=1      ,		__lowerCamelCase=0.0_2      ,		__lowerCamelCase=1e-1_2      ,		__lowerCamelCase="absolute"      ,		__lowerCamelCase=True      ,		__lowerCamelCase=9      ,		__lowerCamelCase=64      ,		__lowerCamelCase=None      ,		__lowerCamelCase=True      ,		__lowerCamelCase=True      ,		__lowerCamelCase=1      ,		__lowerCamelCase=0      ,		__lowerCamelCase=2      ,		**__lowerCamelCase      ,		):



     '''simple docstring'''




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

     __A					:		str						=  vocab_size
     __A					:		Optional[Any]						=  max_position_embeddings
     __A					:		List[str]						=  hidden_size
     __A					:		Union[str, Any]						=  num_hidden_layers
     __A					:		List[str]						=  num_attention_heads
     __A					:		int						=  intermediate_size
     __A					:		str						=  hidden_act
     __A					:		Tuple						=  hidden_dropout_prob
     __A					:		Tuple						=  attention_probs_dropout_prob
     __A					:		Optional[Any]						=  initializer_range
     __A					:		Any						=  type_vocab_size
     __A					:		Union[str, Any]						=  layer_norm_eps
     __A					:		List[Any]						=  position_embedding_type
     __A					:		Dict						=  use_expectation
     __A					:		str						=  hash_code_len
     __A					:		Any						=  num_hash
     __A					:		str						=  conv_window
     __A					:		str						=  use_fast_hash
     __A					:		Any						=  lsh_backward











"""simple docstring"""



import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


a_				=    """
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 	__snake_case      (	unittest.TestCase							,							SCREAMING_SNAKE_CASE__  ):





 """simple docstring"""


 def       UpperCamelCase__(					self						):



     '''simple docstring'''




     __A					:		Optional[Any]						=  load_tool('''summarization'''						)
     self.tool.setup()
     __A					:		Tuple						=  load_tool('''summarization'''      ,		remote=__lowerCamelCase						)

 def       UpperCamelCase__(					self						):



     '''simple docstring'''




     __A					:		List[str]						=  self.tool(__lowerCamelCase						)
     self.assertEqual(
         __lowerCamelCase      ,		'''Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. 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. In 2022, the workshop concluded with the announcement of BLOOM.'''      ,		)

 def       UpperCamelCase__(					self						):



     '''simple docstring'''




     __A					:		int						=  self.remote_tool(__lowerCamelCase						)
     self.assertEqual(
         __lowerCamelCase      ,		'''Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. 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. In 2022, the workshop concluded with the announcement of BLOOM.'''      ,		)

 def       UpperCamelCase__(					self						):



     '''simple docstring'''




     __A					:		List[Any]						=  self.tool(text=__lowerCamelCase						)
     self.assertEqual(
         __lowerCamelCase      ,		'''Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. 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. In 2022, the workshop concluded with the announcement of BLOOM.'''      ,		)







 def       UpperCamelCase__(					self						):



     '''simple docstring'''




     __A					:		Optional[int]						=  self.remote_tool(text=__lowerCamelCase						)
     self.assertEqual(
         __lowerCamelCase      ,		'''Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. 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. In 2022, the workshop concluded with the announcement of BLOOM.'''      ,		)




