



"""simple docstring"""


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


snake_case_				     =       logging.get_logger(__name__)

snake_case_				     =       {
    """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       A_			(     SCREAMING_SNAKE_CASE_				):



						"""simple docstring"""
						__UpperCamelCase						=							"""dpr"""






						def __init__(					self :Optional[Any]   ,  lowercase_ :Tuple=3_05_22   ,  lowercase_ :Optional[int]=7_68   ,  lowercase_ :List[str]=12   ,  lowercase_ :Optional[int]=12   ,  lowercase_ :Union[str, Any]=30_72   ,  lowercase_ :int="gelu"   ,  lowercase_ :int=0.1   ,  lowercase_ :int=0.1   ,  lowercase_ :int=5_12   ,  lowercase_ :Union[str, Any]=2   ,  lowercase_ :str=0.02   ,  lowercase_ :Optional[int]=1E-12   ,  lowercase_ :List[str]=0   ,  lowercase_ :Any="absolute"   ,  lowercase_ :int = 0   ,  **lowercase_ :Dict   ,  )				->			int:
												super().__init__(pad_token_id=lowercase_   ,  **lowercase_					)

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






'''simple docstring'''





from transformers import DistilBertTokenizer, DistilBertTokenizerFast
from transformers.testing_utils import require_tokenizers, slow

from ..bert.test_tokenization_bert import BertTokenizationTest




@require_tokenizers
class        __A      ( UpperCamelCase__	):
    a__       :						Optional[Any]          =  DistilBertTokenizer
    a__       :						Any          =  DistilBertTokenizerFast
    a__       :						str          =  True



    @slow
    def 					_lowercase						(self    :    int ):
         UpperCAmelCase_           =   DistilBertTokenizer.from_pretrained("distilbert-base-uncased" )

         UpperCAmelCase_           =   tokenizer.encode("sequence builders"   ,			add_special_tokens=__a )
         UpperCAmelCase_           =   tokenizer.encode("multi-sequence build"   ,			add_special_tokens=__a )

         UpperCAmelCase_           =   tokenizer.build_inputs_with_special_tokens(__a )
         UpperCAmelCase_           =   tokenizer.build_inputs_with_special_tokens(__a   ,			__a )

         assert encoded_sentence == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id]
         assert encoded_pair == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_a + [
             tokenizer.sep_token_id
         ]




