
"""simple docstring"""



import math
class        _SCREAMING_SNAKE_CASE  :






				'''simple docstring'''



				def __init__(					self	:			List[Any]				,     UpperCAmelCase_	:			str=0  )		->  Any:  # a graph with Node 0,1,...,N-1







											"""simple docstring"""




											_lowerCAmelCase  	=			n
											_lowerCAmelCase  	=			[
											    [math.inf for j in range(0				,     __lowerCamelCase  )] for i in range(0				,     __lowerCamelCase  )
											]  # adjacency matrix for weight
											_lowerCAmelCase  	=			[
											    [math.inf for j in range(0				,     __lowerCamelCase  )] for i in range(0				,     __lowerCamelCase  )
											]  # dp[i][j] stores minimum distance from i to j


				def 				__lowerCamelCase	(					self	:			Optional[int]				,     UpperCAmelCase_	:			Optional[Any]				,     UpperCAmelCase_	:			Dict				,     UpperCAmelCase_	:			Dict  )		->  List[Any]:







											"""simple docstring"""




											_lowerCAmelCase  	=			w


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







											"""simple docstring"""




											for k in range(0				,     self.n  ):
																		for i in range(0				,     self.n  ):
																									for j in range(0				,     self.n  ):
																																_lowerCAmelCase  	=			min(self.dp[i][j]				,     self.dp[i][k] + self.dp[k][j]  )







				def 				__lowerCamelCase	(					self	:			Optional[Any]				,     UpperCAmelCase_	:			Any				,     UpperCAmelCase_	:			Tuple  )		->  Dict:







											"""simple docstring"""




											return self.dp[u][v]


if __name__ == "__main__":
							_snake_case          =						Graph(5)
							graph.add_edge(0, 2, 9)
							graph.add_edge(0, 4, 1_0)
							graph.add_edge(1, 3, 5)
							graph.add_edge(2, 3, 7)
							graph.add_edge(3, 0, 1_0)
							graph.add_edge(3, 1, 2)
							graph.add_edge(3, 2, 1)
							graph.add_edge(3, 4, 6)
							graph.add_edge(4, 1, 3)
							graph.add_edge(4, 2, 4)
							graph.add_edge(4, 3, 9)
							graph.floyd_warshall()
							graph.show_min(1, 4)
							graph.show_min(0, 3)








"""simple docstring"""



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


_snake_case          =						logging.get_logger(__name__)

_snake_case          =						{
    '''abeja/gpt-neox-japanese-2.7b''': '''https://huggingface.co/abeja/gpt-neox-japanese-2.7b/resolve/main/config.json''',
}
class        _SCREAMING_SNAKE_CASE  (  UpperCAmelCase							):






				'''simple docstring'''



				SCREAMING_SNAKE_CASE_:							Dict							=					"gpt_neox_japanese"


				def __init__(					self	:			Optional[Any]				,     UpperCAmelCase_	:			Any=32_000				,     UpperCAmelCase_	:			Dict=2_560				,     UpperCAmelCase_	:			Union[str, Any]=32				,     UpperCAmelCase_	:			Any=32				,     UpperCAmelCase_	:			Optional[Any]=4				,     UpperCAmelCase_	:			int="gelu"				,     UpperCAmelCase_	:			Union[str, Any]=1.00				,     UpperCAmelCase_	:			Any=10_000				,     UpperCAmelCase_	:			Optional[int]=2_048				,     UpperCAmelCase_	:			Optional[Any]=0.02				,     UpperCAmelCase_	:			Tuple=1E-5				,     UpperCAmelCase_	:			int=True				,     UpperCAmelCase_	:			Tuple=31_996				,     UpperCAmelCase_	:			List[Any]=31_999				,     UpperCAmelCase_	:			str=0.1				,     UpperCAmelCase_	:			List[Any]=0.0				,     **UpperCAmelCase_	:			str				,     )		->  int:







											"""simple docstring"""




											super().__init__(bos_token_id=UpperCAmelCase_				,     eos_token_id=UpperCAmelCase_				,     **UpperCAmelCase_  )
											_lowerCAmelCase  	=			vocab_size
											_lowerCAmelCase  	=			max_position_embeddings
											_lowerCAmelCase  	=			hidden_size
											_lowerCAmelCase  	=			num_hidden_layers
											_lowerCAmelCase  	=			num_attention_heads
											_lowerCAmelCase  	=			intermediate_multiple_size
											_lowerCAmelCase  	=			hidden_act
											_lowerCAmelCase  	=			rotary_pct
											_lowerCAmelCase  	=			rotary_emb_base
											_lowerCAmelCase  	=			initializer_range
											_lowerCAmelCase  	=			layer_norm_eps
											_lowerCAmelCase  	=			use_cache
											_lowerCAmelCase  	=			attention_dropout
											_lowerCAmelCase  	=			hidden_dropout






