

'''simple docstring'''



from collections import deque
def 						__lowerCamelCase	(       __snake_case					:		Optional[int]	)	->							Tuple:






						"""simple docstring"""





						A__					:       Optional[int]     =len(__snake_case	)
						A__					:       str     =deque()
						A__					:       Dict     =[False for _ in range(__snake_case	)]
						A__					:       Union[str, Any]     =[-1 for _ in range(__snake_case	)]
						A__					:       Tuple     =index_of[:]

						def strong_connect(__snake_case					:		Tuple,		__snake_case					:		Optional[int],		__snake_case					:		Tuple	):
												A__					:       List[str]     =index  # the number when this node is seen
												A__					:       List[Any]     =index  # lowest rank node reachable from here
												index += 1
												stack.append(__snake_case	)
												A__					:       Dict     =True

												for w in g[v]:
																		if index_of[w] == -1:
																								A__					:       Optional[int]     =strong_connect(__snake_case,		__snake_case,		__snake_case	)
																								A__					:       int     =(
																								    lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
																								)
																		elif on_stack[w]:
																								A__					:       Tuple     =(
																								    lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
																								)

												if lowlink_of[v] == index_of[v]:
																		A__					:       str     =[]
																		A__					:       str     =stack.pop()
																		A__					:       int     =False
																		component.append(__snake_case	)
																		while w != v:
																								A__					:       str     =stack.pop()
																								A__					:       Optional[Any]     =False
																								component.append(__snake_case	)
																		components.append(__snake_case	)
												return index

						A__					:       Optional[Any]     =[]
						for v in range(__snake_case	):
												if index_of[v] == -1:
																		strong_connect(__snake_case,		0,		__snake_case	)

						return components
def 						__lowerCamelCase	(       __snake_case					:		Tuple,		__snake_case					:		List[Any]	)	->							Any:






						"""simple docstring"""





						A__					:       int     =[[] for _ in range(__snake_case	)]
						for u, v in edges:
												g[u].append(__snake_case	)
						return g


if __name__ == "__main__":
		# Test
		__snake_case			:     List[str]										=      7
		__snake_case			:     Optional[Any]										=      [0, 0, 1, 2, 3, 3, 4, 4, 6]
		__snake_case			:     List[str]										=      [1, 3, 2, 0, 1, 4, 5, 6, 5]
		__snake_case			:     List[str]										=      [(u, v) for u, v in zip(source, target)]
		__snake_case			:     str										=      create_graph(n_vertices, edges)

		assert [[5], [6], [4], [3, 2, 1, 0]] == tarjan(g)




'''simple docstring'''



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


__snake_case			:     Union[str, Any]										=      logging.get_logger(__name__)

__snake_case			:     Optional[int]										=      {
    'bigcode/gpt_bigcode-santacoder': 'https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json',
}



class lowerCamelCase			(  lowercase_						):



			'''simple docstring'''






			__snake_case        =	'gpt_bigcode'
			__snake_case        =	['past_key_values']
			__snake_case        =	{
			    'hidden_size': 'n_embd',
			    'max_position_embeddings': 'n_positions',
			    'num_attention_heads': 'n_head',
			    'num_hidden_layers': 'n_layer',
			}


			def __init__(				self	:						Optional[Any]		,      lowerCAmelCase_	:						List[str]=5_02_57		,      lowerCAmelCase_	:						str=10_24		,      lowerCAmelCase_	:						str=7_68		,      lowerCAmelCase_	:						str=12		,      lowerCAmelCase_	:						int=12		,      lowerCAmelCase_	:						Dict=None		,      lowerCAmelCase_	:						List[Any]="gelu_pytorch_tanh"		,      lowerCAmelCase_	:						Union[str, Any]=0.1		,      lowerCAmelCase_	:						Optional[Any]=0.1		,      lowerCAmelCase_	:						Optional[int]=0.1		,      lowerCAmelCase_	:						Dict=1e-5		,      lowerCAmelCase_	:						str=0.02		,      lowerCAmelCase_	:						List[Any]=True		,      lowerCAmelCase_	:						str=True		,      lowerCAmelCase_	:						str=5_02_56		,      lowerCAmelCase_	:						Dict=5_02_56		,      lowerCAmelCase_	:						Union[str, Any]=True		,      lowerCAmelCase_	:						str=True		,      lowerCAmelCase_	:						Optional[Any]=True		,      **lowerCAmelCase_	:						Optional[Any]		,      )      ->		Tuple:





									'''simple docstring'''
									A__					:       Optional[Any]     =vocab_size
									A__					:       Optional[Any]     =n_positions
									A__					:       List[str]     =n_embd
									A__					:       str     =n_layer
									A__					:       Optional[int]     =n_head
									A__					:       Optional[int]     =n_inner
									A__					:       int     =activation_function
									A__					:       int     =resid_pdrop
									A__					:       int     =embd_pdrop
									A__					:       Dict     =attn_pdrop
									A__					:       Any     =layer_norm_epsilon
									A__					:       List[Any]     =initializer_range
									A__					:       Dict     =scale_attn_weights
									A__					:       Any     =use_cache
									A__					:       List[Any]     =attention_softmax_in_fpaa
									A__					:       Optional[int]     =scale_attention_softmax_in_fpaa
									A__					:       Dict     =multi_query

									A__					:       List[str]     =bos_token_id
									A__					:       Any     =eos_token_id

									super().__init__(bos_token_id=lowerCAmelCase_		,      eos_token_id=lowerCAmelCase_		,      **lowerCAmelCase_			)

