




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


UpperCAmelCase__						:       Tuple							=    logging.get_logger(__name__)

UpperCAmelCase__						:       Dict							=    {
    '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      UpperCAmelCase						(			snake_case_   ):
   __SCREAMING_SNAKE_CASE		:							int							=					"splinter"






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

     _lowercase: List[Any]						     =    vocab_size
     _lowercase: Optional[Any]						     =    max_position_embeddings
     _lowercase: Tuple						     =    hidden_size
     _lowercase: Optional[Any]						     =    num_hidden_layers
     _lowercase: Tuple						     =    num_attention_heads
     _lowercase: int						     =    intermediate_size
     _lowercase: Union[str, Any]						     =    hidden_act
     _lowercase: Optional[int]						     =    hidden_dropout_prob
     _lowercase: Tuple						     =    attention_probs_dropout_prob
     _lowercase: List[Any]						     =    initializer_range
     _lowercase: Optional[Any]						     =    type_vocab_size
     _lowercase: Optional[Any]						     =    layer_norm_eps
     _lowercase: int						     =    use_cache
     _lowercase: Optional[int]						     =    question_token_id






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_torch_available


UpperCAmelCase__						:       Union[str, Any]							=    {'configuration_bert_generation': ['BertGenerationConfig']}

try:
   if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase__						:       str							=    ['BertGenerationTokenizer']

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase__						:       Tuple							=    [
       'BertGenerationDecoder',
       'BertGenerationEncoder',
       'BertGenerationPreTrainedModel',
       'load_tf_weights_in_bert_generation',
   ]


if TYPE_CHECKING:
   from .configuration_bert_generation import BertGenerationConfig

   try:
      if not is_sentencepiece_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_bert_generation import BertGenerationTokenizer

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_bert_generation import (
          BertGenerationDecoder,
          BertGenerationEncoder,
          BertGenerationPreTrainedModel,
          load_tf_weights_in_bert_generation,
      )

else:
   import sys

   UpperCAmelCase__						:       List[Any]							=    _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)
