import timeit
class SCREAMING_SNAKE_CASE_		:







			def __init__(    self	:	Any      ,      lowerCamelCase_	:	Union[str, Any]							):





				"""simple docstring"""


				if isinstance(lowerCAmelCase__      ,      lowerCAmelCase__							):  # Initializes a matrix identical to the one provided.
					UpperCamelCase      =			arg
					UpperCamelCase      =			len(lowerCAmelCase__							)
				else:  # Initializes a square matrix of the given size and set values to zero.
					UpperCamelCase      =			arg
					UpperCamelCase      =			[[0 for _ in range(self.n							)] for _ in range(self.n							)]







			def __mul__(    self	:	str      ,      lowerCamelCase_	:	Dict							):





				"""simple docstring"""


				UpperCamelCase      =			Matrix(self.n							)
				for i in range(self.n							):
					for j in range(self.n							):
						for k in range(self.n							):
							matrix.t[i][j] += self.t[i][k] * b.t[k][j]
				return matrix





def  lowercase(  UpperCamelCase_       ,				UpperCamelCase_					)		->  str:







	'''simple docstring'''
	UpperCamelCase      =			Matrix([[1, 0], [0, 1]]					)
	while b > 0:
		if b & 1:
			matrix *= a
		a *= a
		b >>= 1
	return matrix





def  lowercase(  UpperCamelCase_       ,				UpperCamelCase_       ,				UpperCamelCase_					)		->  Optional[int]:







	'''simple docstring'''



	if n == 1:
		return fa
	elif n == 2:
		return fa
	UpperCamelCase      =			Matrix([[1, 1], [1, 0]]					)
	UpperCamelCase      =			modular_exponentiation(UpperCamelCase_       ,				n - 2					)
	return fa * matrix.t[0][0] + fa * matrix.t[0][1]





def  lowercase(  UpperCamelCase_       ,				UpperCamelCase_       ,				UpperCamelCase_					)		->  Optional[Any]:







	'''simple docstring'''



	if n == 1:
		return fa
	elif n == 2:
		return fa

	UpperCamelCase      =			fa
	UpperCamelCase      =			fa
	n -= 2

	while n > 0:
		UpperCamelCase      =			fn_a + fn_a, fn_a
		n -= 1

	return fn_a





def  lowercase(  )		->  Optional[Any]:







	'''simple docstring'''
	UpperCamelCase      =			"\nfrom random import randint\nfrom __main__ import fibonacci_with_matrix_exponentiation\n"
	UpperCamelCase      =			"fibonacci_with_matrix_exponentiation(randint(1,70000), 1, 1)"
	UpperCamelCase      =			timeit.timeit(setup=UpperCamelCase_       ,				stmt=UpperCamelCase_       ,				number=100					)
	print("""With matrix exponentiation the average execution time is """       ,				exec_time / 100					)
	return exec_time





def  lowercase(  )		->  Tuple:







	'''simple docstring'''
	UpperCamelCase      =			"\nfrom random import randint\nfrom __main__ import simple_fibonacci\n"
	UpperCamelCase      =			"simple_fibonacci(randint(1,70000), 1, 1)"
	UpperCamelCase      =			timeit.timeit(setup=UpperCamelCase_       ,				stmt=UpperCamelCase_       ,				number=100					)
	print(
	    """Without matrix exponentiation the average execution time is """       ,				exec_time / 100					)
	return exec_time





def  lowercase(  )		->  Optional[Any]:







	'''simple docstring'''
	matrix_exponentiation_time()
	simple_fibonacci_time()


if __name__ == "__main__":
					main()

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


_SCREAMING_SNAKE_CASE   		=			logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE   		=			{
    """tau/splinter-base""": """https://huggingface.co/tau/splinter-base/resolve/main/config.json""",
    """tau/splinter-base-qass""": """https://huggingface.co/tau/splinter-base-qass/resolve/main/config.json""",
    """tau/splinter-large""": """https://huggingface.co/tau/splinter-large/resolve/main/config.json""",
    """tau/splinter-large-qass""": """https://huggingface.co/tau/splinter-large-qass/resolve/main/config.json""",
    # See all Splinter models at https://huggingface.co/models?filter=splinter
}
class SCREAMING_SNAKE_CASE_		(			__lowerCAmelCase		):
   __lowerCAmelCase											=							"""splinter"""







   def __init__(    self	:	List[Any]      ,      lowerCamelCase_	:	int=3_0522      ,      lowerCamelCase_	:	Any=768      ,      lowerCamelCase_	:	List[Any]=12      ,      lowerCamelCase_	:	Tuple=12      ,      lowerCamelCase_	:	Tuple=3072      ,      lowerCamelCase_	:	Any="gelu"      ,      lowerCamelCase_	:	Union[str, Any]=0.1      ,      lowerCamelCase_	:	str=0.1      ,      lowerCamelCase_	:	int=512      ,      lowerCamelCase_	:	List[Any]=2      ,      lowerCamelCase_	:	List[Any]=0.0_2      ,      lowerCamelCase_	:	Dict=1E-12      ,      lowerCamelCase_	:	Tuple=True      ,      lowerCamelCase_	:	str=0      ,      lowerCamelCase_	:	Any=104      ,      **lowerCamelCase_	:	Dict      ,      ):





    """simple docstring"""


    super().__init__(pad_token_id=lowerCamelCase_      ,      **lowerCamelCase_							)

    UpperCamelCase      =			vocab_size
    UpperCamelCase      =			max_position_embeddings
    UpperCamelCase      =			hidden_size
    UpperCamelCase      =			num_hidden_layers
    UpperCamelCase      =			num_attention_heads
    UpperCamelCase      =			intermediate_size
    UpperCamelCase      =			hidden_act
    UpperCamelCase      =			hidden_dropout_prob
    UpperCamelCase      =			attention_probs_dropout_prob
    UpperCamelCase      =			initializer_range
    UpperCamelCase      =			type_vocab_size
    UpperCamelCase      =			layer_norm_eps
    UpperCamelCase      =			use_cache
    UpperCamelCase      =			question_token_id
