




"""simple docstring"""





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


_lowercase		 =      logging.get_logger(__name__)

_lowercase		 =      {
    'microsoft/mpnet-base': 'https://huggingface.co/microsoft/mpnet-base/resolve/main/config.json',
}

class  __lowercase    (     lowerCAmelCase__		):


				'''simple docstring'''


				_lowerCAmelCase		     ="""mpnet"""

				def __init__(				self				:       int ,SCREAMING_SNAKE_CASE_				:       Union[str, Any]=3_0_5_2_7 ,SCREAMING_SNAKE_CASE_				:       Optional[Any]=7_6_8 ,SCREAMING_SNAKE_CASE_				:       Any=1_2 ,SCREAMING_SNAKE_CASE_				:       Any=1_2 ,SCREAMING_SNAKE_CASE_				:       Tuple=3_0_7_2 ,SCREAMING_SNAKE_CASE_				:       str="gelu" ,SCREAMING_SNAKE_CASE_				:       List[Any]=0.1 ,SCREAMING_SNAKE_CASE_				:       List[str]=0.1 ,SCREAMING_SNAKE_CASE_				:       Dict=5_1_2 ,SCREAMING_SNAKE_CASE_				:       int=0.02 ,SCREAMING_SNAKE_CASE_				:       Dict=1E-12 ,SCREAMING_SNAKE_CASE_				:       Any=3_2 ,SCREAMING_SNAKE_CASE_				:       str=1 ,SCREAMING_SNAKE_CASE_				:       Union[str, Any]=0 ,SCREAMING_SNAKE_CASE_				:       Tuple=2 ,**SCREAMING_SNAKE_CASE_				:       Optional[Any] ,):
										super().__init__(pad_token_id=UpperCamelCase__ ,bos_token_id=UpperCamelCase__ ,eos_token_id=UpperCamelCase__ ,**UpperCamelCase__ )

										snake_case__    :   Dict							     =   vocab_size
										snake_case__    :   Tuple							     =   hidden_size
										snake_case__    :   List[str]							     =   num_hidden_layers
										snake_case__    :   Optional[int]							     =   num_attention_heads
										snake_case__    :   str							     =   hidden_act
										snake_case__    :   int							     =   intermediate_size
										snake_case__    :   Union[str, Any]							     =   hidden_dropout_prob
										snake_case__    :   Union[str, Any]							     =   attention_probs_dropout_prob
										snake_case__    :   Any							     =   max_position_embeddings
										snake_case__    :   Any							     =   initializer_range
										snake_case__    :   Union[str, Any]							     =   layer_norm_eps
										snake_case__    :   Optional[int]							     =   relative_attention_num_buckets








"""simple docstring"""





class  __lowercase    :


				'''simple docstring'''


				class  __lowercase    :


								'''simple docstring'''


								_lowerCAmelCase		     ="_prev", "_data", "_next"

								def __init__(				self				:       List[Any] ,SCREAMING_SNAKE_CASE_				:       int ,SCREAMING_SNAKE_CASE_				:       Union[str, Any] ,SCREAMING_SNAKE_CASE_				:       Any ):
														snake_case__    :   Any							     =   link_p
														snake_case__    :   List[str]							     =   element
														snake_case__    :   str							     =   link_n





								def  _lowerCamelCase   (				self				:       Optional[Any] ):
														return (
														    F''' Prev -> {self._prev is not None}, Next -> {self._next is not None}'''
														)







				def __init__(				self				:       Any ):
										snake_case__    :   int							     =   self._Node(SCREAMING_SNAKE_CASE_ ,SCREAMING_SNAKE_CASE_ ,SCREAMING_SNAKE_CASE_ )
										snake_case__    :   Optional[int]							     =   self._Node(SCREAMING_SNAKE_CASE_ ,SCREAMING_SNAKE_CASE_ ,SCREAMING_SNAKE_CASE_ )
										snake_case__    :   Union[str, Any]							     =   self._trailer
										snake_case__    :   Union[str, Any]							     =   self._header
										snake_case__    :   Any							     =   0

				def __len__(				self				:       str ):
										return self._size

				def  _lowerCamelCase   (				self				:       Union[str, Any] ):
										return self.__len__() == 0

				def  _lowerCamelCase   (				self				:       Any ,SCREAMING_SNAKE_CASE_				:       List[Any] ,SCREAMING_SNAKE_CASE_				:       List[str] ,SCREAMING_SNAKE_CASE_				:       Dict ):
										# Create new_node by setting it's prev.link -> header
										# setting it's next.link -> trailer
										snake_case__    :   Dict							     =   self._Node(SCREAMING_SNAKE_CASE_ ,SCREAMING_SNAKE_CASE_ ,SCREAMING_SNAKE_CASE_ )
										snake_case__    :   Any							     =   new_node
										snake_case__    :   str							     =   new_node
										self._size += 1
										return self





				def  _lowerCamelCase   (				self				:       Union[str, Any] ,SCREAMING_SNAKE_CASE_				:       Dict ):
										snake_case__    :   Union[str, Any]							     =   node._prev
										snake_case__    :   Union[str, Any]							     =   node._next

										snake_case__    :   List[Any]							     =   successor
										snake_case__    :   Dict							     =   predecessor
										self._size -= 1
										snake_case__    :   Dict							     =   node._data
										snake_case__    :   List[str]							     =   None
										del node
										return temp







class  __lowercase    (     _DoublyLinkedBase		):


				'''simple docstring'''


				def  _lowerCamelCase   (				self				:       Optional[int] ):
										if self.is_empty():
																raise Exception('''List is empty''' )
										return self._header._next._data

				def  _lowerCamelCase   (				self				:       Union[str, Any] ):
										if self.is_empty():
																raise Exception('''List is empty''' )
										return self._trailer._prev._data

				def  _lowerCamelCase   (				self				:       Any ,SCREAMING_SNAKE_CASE_				:       Dict ):
										return self._insert(self._header ,SCREAMING_SNAKE_CASE_ ,self._header._next )

				def  _lowerCamelCase   (				self				:       Dict ,SCREAMING_SNAKE_CASE_				:       Union[str, Any] ):
										return self._insert(self._trailer._prev ,SCREAMING_SNAKE_CASE_ ,self._trailer )

				def  _lowerCamelCase   (				self				:       Optional[int] ):
										if self.is_empty():
																raise IndexError('''remove_first from empty list''' )
										return self._delete(self._header._next )





				def  _lowerCamelCase   (				self				:       Optional[Any] ):
										if self.is_empty():
																raise IndexError('''remove_first from empty list''' )
										return self._delete(self._trailer._prev )


