



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


lowerCamelCase__	=       logging.get_logger(__name__)

lowerCamelCase__	=       {
    "facebook/dpr-ctx_encoder-single-nq-base": (
        "https://huggingface.co/facebook/dpr-ctx_encoder-single-nq-base/resolve/main/config.json"
    ),
    "facebook/dpr-question_encoder-single-nq-base": (
        "https://huggingface.co/facebook/dpr-question_encoder-single-nq-base/resolve/main/config.json"
    ),
    "facebook/dpr-reader-single-nq-base": (
        "https://huggingface.co/facebook/dpr-reader-single-nq-base/resolve/main/config.json"
    ),
    "facebook/dpr-ctx_encoder-multiset-base": (
        "https://huggingface.co/facebook/dpr-ctx_encoder-multiset-base/resolve/main/config.json"
    ),
    "facebook/dpr-question_encoder-multiset-base": (
        "https://huggingface.co/facebook/dpr-question_encoder-multiset-base/resolve/main/config.json"
    ),
    "facebook/dpr-reader-multiset-base": (
        "https://huggingface.co/facebook/dpr-reader-multiset-base/resolve/main/config.json"
    ),
}






class       SCREAMING_SNAKE_CASE	(							lowercase__    ):
							__lowerCamelCase		:		Any			='dpr'





							def __init__(      self						:						int					, __lowercase						:						int=30522					, __lowercase						:						int=768					, __lowercase						:						Optional[Any]=12					, __lowercase						:						Optional[int]=12					, __lowercase						:						Optional[int]=3072					, __lowercase						:						int="gelu"					, __lowercase						:						Union[str, Any]=0.1					, __lowercase						:						Any=0.1					, __lowercase						:						int=512					, __lowercase						:						Tuple=2					, __lowercase						:						Optional[int]=0.02					, __lowercase						:						int=1E-12					, __lowercase						:						str=0					, __lowercase						:						int="absolute"					, __lowercase						:						int = 0					, **__lowercase						:						Dict					, ):

											'''simple docstring'''
											super().__init__(pad_token_id=__lowercase					, **__lowercase		)

											__a        =						vocab_size
											__a        =						hidden_size
											__a        =						num_hidden_layers
											__a        =						num_attention_heads
											__a        =						hidden_act
											__a        =						intermediate_size
											__a        =						hidden_dropout_prob
											__a        =						attention_probs_dropout_prob
											__a        =						max_position_embeddings
											__a        =						type_vocab_size
											__a        =						initializer_range
											__a        =						layer_norm_eps
											__a        =						projection_dim
											__a        =						position_embedding_type








from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

a		:       Dict			     = typing.Union[Iterable[float], Iterable[int], np.ndarray]  # noqa: UP007
a		:       Any			     = typing.Union[np.floataa, int, float]  # noqa: UP007






def 				lowerCamelCase__      (    __lowerCamelCase			:     Vector  ,		__lowerCamelCase			:     Vector		):
  return np.sqrt(np.sum((np.asarray(__lowerCamelCase		) - np.asarray(__lowerCamelCase		)) ** 2		)		)






def 				lowerCamelCase__      (    __lowerCamelCase			:     Vector  ,		__lowerCamelCase			:     Vector		):
  return sum((va - va) ** 2 for va, va in zip(__lowerCamelCase  ,		__lowerCamelCase		)		) ** (1 / 2)


if __name__ == "__main__":






       def 				lowerCamelCase__      (    ):
         from timeit import timeit

         print("""Without Numpy"""		)
         print(
             timeit(
                 """euclidean_distance_no_np([1, 2, 3], [4, 5, 6])"""  ,		number=10000  ,		globals=globals()  ,		)		)
         print("""With Numpy"""		)
         print(
             timeit(
                 """euclidean_distance([1, 2, 3], [4, 5, 6])"""  ,		number=10000  ,		globals=globals()  ,		)		)







       benchmark()


