



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


UpperCAmelCase							=       logging.get_logger(__name__)

UpperCAmelCase							=       {
    "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 			__snake_case   ( _a):







							'''simple docstring'''






							UpperCamelCase__					:   Optional[int]       =       "splinter"


							def __init__(				self	,	a_=30_522	,	a_=768	,	a_=12	,	a_=12	,	a_=3_072	,	a_="gelu"	,	a_=0.1	,	a_=0.1	,	a_=512	,	a_=2	,	a_=0.02	,	a_=1E-1_2	,	a_=True	,	a_=0	,	a_=104	,	**a_	,	):
											super().__init__(pad_token_id=a_	,	**a_		)

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





'''simple docstring'''



import os
import unittest

import pytest
from parameterized import parameterized

from transformers.testing_utils import require_torch, require_torch_gpu, slow, torch_device


# skipping in unittest tests

__UpperCAmelCase     :Tuple												=  [(1,)]




def       _a      (		):





     '''simple docstring'''






     __UpperCAmelCase      :					Any    				=     bool(os.getenv('''RUN_SLOW'''     ,   0    )    )
     if run_slow:
          assert True
     else:
          assert False, "should have been skipped"




def       _a      (		):





     '''simple docstring'''






     __UpperCAmelCase      :					str    				=     bool(os.getenv('''RUN_SLOW'''     ,   0    )    )
     if run_slow and torch_device == "cuda":
          assert True
     else:
          assert False, "should have been skipped"



@require_torch
class       a							(						unittest.TestCase			):


     """simple docstring"""






     @slow
     @require_torch_gpu
     def 					lowerCamelCase__					(							self	:						Tuple     )		->				str:
          check_slow_torch_cuda()

     @require_torch_gpu
     @slow
     def 					lowerCamelCase__					(							self	:						Any     )		->				List[Any]:
          check_slow_torch_cuda()






     @parameterized.expand(snake_case     )
     @slow
     def 					lowerCamelCase__					(							self	:						Union[str, Any]				,					snake_case	:						int=None     )		->				Union[str, Any]:
          check_slow()




@slow
@require_torch_gpu
def       _a      (		):





     '''simple docstring'''






     check_slow_torch_cuda()




@require_torch_gpu
@slow
def       _a      (		):





     '''simple docstring'''






     check_slow_torch_cuda()




@slow
@pytest.mark.parametrize('''param'''     ,   [1]    )
def       _a      (		_lowercase   :      Union[str, Any]    ):





     '''simple docstring'''






     check_slow()




@pytest.mark.parametrize('''param'''     ,   [1]    )
@slow
def       _a      (		_lowercase   :      Dict    ):





     '''simple docstring'''






     check_slow()