code: from ...configuration_utils import PretrainedConfig
  from ...utils import logging
  
  
  a     :			str					    =						logging.get_logger(__name__)
  
  a     :			Union[str, Any]					    =						{
      """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 				_lowercase						(    UpperCAmelCase__ ):
  
  
  
  
  
  
      '''simple docstring'''
      SCREAMING_SNAKE_CASE:							Optional[Any]        =						'splinter'
  
  
  
  
      def __init__(						self					,	lowerCamelCase__=30_522					,	lowerCamelCase__=768					,	lowerCamelCase__=12					,	lowerCamelCase__=12					,	lowerCamelCase__=3_072					,	lowerCamelCase__="gelu"					,	lowerCamelCase__=0.1					,	lowerCamelCase__=0.1					,	lowerCamelCase__=512					,	lowerCamelCase__=2					,	lowerCamelCase__=0.0_2					,	lowerCamelCase__=1E-12					,	lowerCamelCase__=True					,	lowerCamelCase__=0					,	lowerCamelCase__=104					,	**lowerCamelCase__					,	):
         super().__init__(pad_token_id=lowerCamelCase__					,	**lowerCamelCase__   )
  
         lowerCAmelCase_:       Optional[int]         =  vocab_size
         lowerCAmelCase_:       List[Any]         =  max_position_embeddings
         lowerCAmelCase_:       List[str]         =  hidden_size
         lowerCAmelCase_:       Tuple         =  num_hidden_layers
         lowerCAmelCase_:       List[Any]         =  num_attention_heads
         lowerCAmelCase_:       Optional[int]         =  intermediate_size
         lowerCAmelCase_:       str         =  hidden_act
         lowerCAmelCase_:       List[str]         =  hidden_dropout_prob
         lowerCAmelCase_:       Tuple         =  attention_probs_dropout_prob
         lowerCAmelCase_:       Union[str, Any]         =  initializer_range
         lowerCAmelCase_:       List[str]         =  type_vocab_size
         lowerCAmelCase_:       Optional[int]         =  layer_norm_eps
         lowerCAmelCase_:       Optional[int]         =  use_cache
         lowerCAmelCase_:       Tuple         =  question_token_id
style_context: from ctypes import c_float, sizeof
  from enum import Enum
  from typing import TYPE_CHECKING, Optional, Union
  
  
  if TYPE_CHECKING:
   from .. import AutoFeatureExtractor, AutoProcessor, AutoTokenizer  # tests_ignore
  
  class 				_lowercase						(    UpperCAmelCase__ ):
  
  
  
  
  
  
      '''simple docstring'''
      SCREAMING_SNAKE_CASE:							Union[str, Any]        =						c_float
  
  
  
  
      @property
      def     _a						(						self   ):
         return sizeof(self.value   )
  
  
  
  
  
  def 		snake_case__  (		lowercase       ,							lowercase       ,							lowercase = 0				):
     # < 0 is possible if using a dynamic axis
     if dimension <= 0:
        lowerCAmelCase_:       int         =  fixed_dimension
  
     dimension -= num_token_to_add
     return dimension
  def 		snake_case__  (		lowercase       ,							lowercase				):
     return num_parameters * dtype.size
  
  
  
  
  
  
  
  def 		snake_case__  (		lowercase				):
     from .. import AutoFeatureExtractor, AutoProcessor, AutoTokenizer  # tests_ignore
  
     try:
        return AutoProcessor.from_pretrained(lowercase				)
     except (ValueError, OSError, KeyError):
        lowerCAmelCase_     ,  lowerCAmelCase_:       int         =  None, None
        try:
           lowerCAmelCase_:       Dict         =  AutoTokenizer.from_pretrained(lowercase				)
        except (OSError, KeyError):
           pass
        try:
           lowerCAmelCase_:       Optional[int]         =  AutoFeatureExtractor.from_pretrained(lowercase				)
        except (OSError, KeyError):
           pass
  
        if tokenizer is not None and feature_extractor is not None:
           raise ValueError(
               F'''Couldn\'t auto-detect preprocessor for {model_name}. Found both a tokenizer and a feature extractor.'''				)
        elif tokenizer is None and feature_extractor is None:
           return None
        elif tokenizer is not None:
           return tokenizer
        else:
           return feature_extractor