
class 		lowercase_							:

 class 		lowercase_							:
  A__    :					Tuple    =     """_prev""", """_data""", """_next"""

  def __init__(   self  ,						__UpperCamelCase  ,						__UpperCamelCase  ,						__UpperCamelCase  ):




         """simple docstring"""


         UpperCamelCase_											=							link_p
         UpperCamelCase_											=							element
         UpperCamelCase_											=							link_n

  def lowerCamelCase_					(   self  ):




         """simple docstring"""


         return (
             f''' Prev -> {self._prev is not None}, Next -> {self._next is not None}'''
         )



 def __init__(   self  ):




        """simple docstring"""


        UpperCamelCase_											=							self._Node(__UpperCamelCase  ,						__UpperCamelCase  ,						__UpperCamelCase  )
        UpperCamelCase_											=							self._Node(__UpperCamelCase  ,						__UpperCamelCase  ,						__UpperCamelCase  )
        UpperCamelCase_											=							self._trailer
        UpperCamelCase_											=							self._header
        UpperCamelCase_											=							0

 def __len__(   self  ):




        """simple docstring"""


        return self._size

 def lowerCamelCase_					(   self  ):




        """simple docstring"""


        return self.__len__() == 0

 def lowerCamelCase_					(   self  ,						__UpperCamelCase  ,						__UpperCamelCase  ,						__UpperCamelCase  ):




        """simple docstring"""


        UpperCamelCase_											=							self._Node(__UpperCamelCase  ,						__UpperCamelCase  ,						__UpperCamelCase  )
        UpperCamelCase_											=							new_node
        UpperCamelCase_											=							new_node
        self._size += 1
        return self

 def lowerCamelCase_					(   self  ,						__UpperCamelCase  ):




        """simple docstring"""


        UpperCamelCase_											=							node._prev
        UpperCamelCase_											=							node._next

        UpperCamelCase_											=							successor
        UpperCamelCase_											=							predecessor
        self._size -= 1
        UpperCamelCase_											=							node._data
        UpperCamelCase_											=							UpperCamelCase_											=							UpperCamelCase_											=							None
        del node
        return temp



class 		lowercase_							(							_DoublyLinkedBase					):

 def lowerCamelCase_					(   self  ):




        """simple docstring"""


        if self.is_empty():
               raise Exception("""List is empty"""  )
        return self._header._next._data

 def lowerCamelCase_					(   self  ):




        """simple docstring"""


        if self.is_empty():
               raise Exception("""List is empty"""  )
        return self._trailer._prev._data

 def lowerCamelCase_					(   self  ,						__UpperCamelCase  ):




        """simple docstring"""


        return self._insert(self._header  ,						__UpperCamelCase  ,						self._header._next  )

 def lowerCamelCase_					(   self  ,						__UpperCamelCase  ):




        """simple docstring"""


        return self._insert(self._trailer._prev  ,						__UpperCamelCase  ,						self._trailer  )

 def lowerCamelCase_					(   self  ):




        """simple docstring"""


        if self.is_empty():
               raise IndexError("""remove_first from empty list"""  )
        return self._delete(self._header._next  )

 def lowerCamelCase_					(   self  ):




        """simple docstring"""


        if self.is_empty():
               raise IndexError("""remove_first from empty list"""  )
        return self._delete(self._trailer._prev  )





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


_A							=       logging.get_logger(__name__)

_A							=       {
    '''facebook/opt-125m''': '''https://huggingface.co/facebook/opt-125m/blob/main/config.json''',
    '''facebook/opt-350m''': '''https://huggingface.co/facebook/opt-350m/blob/main/config.json''',
    '''facebook/opt-1.3b''': '''https://huggingface.co/facebook/opt-1.3b/blob/main/config.json''',
    '''facebook/opt-2.7b''': '''https://huggingface.co/facebook/opt-2.7b/blob/main/config.json''',
    '''facebook/opt-6.7b''': '''https://huggingface.co/facebook/opt-6.7b/blob/main/config.json''',
    '''facebook/opt-13b''': '''https://huggingface.co/facebook/opt-13b/blob/main/config.json''',
}

class 		lowercase_							(							__SCREAMING_SNAKE_CASE					):
 A__    :					Dict    =     """opt"""
 A__    :					int    =     ["""past_key_values"""]

 def __init__(   self  ,						__UpperCamelCase=5_0_2_7_2  ,						__UpperCamelCase=7_6_8  ,						__UpperCamelCase=1_2  ,						__UpperCamelCase=3_0_7_2  ,						__UpperCamelCase=2_0_4_8  ,						__UpperCamelCase=True  ,						__UpperCamelCase=False  ,						__UpperCamelCase=None  ,						__UpperCamelCase=0.1  ,						__UpperCamelCase=0.0  ,						__UpperCamelCase=1_2  ,						__UpperCamelCase="relu"  ,						__UpperCamelCase=0.0  ,						__UpperCamelCase=0.02  ,						__UpperCamelCase=True  ,						__UpperCamelCase=1  ,						__UpperCamelCase=2  ,						__UpperCamelCase=2  ,						__UpperCamelCase=True  ,						__UpperCamelCase=True  ,						**__UpperCamelCase  ,						):




        """simple docstring"""


        super().__init__(
            pad_token_id=__UpperCamelCase  ,						bos_token_id=__UpperCamelCase  ,						eos_token_id=__UpperCamelCase  ,						**__UpperCamelCase  ,						)
        UpperCamelCase_											=							vocab_size
        UpperCamelCase_											=							max_position_embeddings
        UpperCamelCase_											=							num_attention_heads
        UpperCamelCase_											=							word_embed_proj_dim if word_embed_proj_dim is not None else hidden_size
        UpperCamelCase_											=							ffn_dim
        UpperCamelCase_											=							hidden_size
        UpperCamelCase_											=							num_hidden_layers
        UpperCamelCase_											=							dropout
        UpperCamelCase_											=							attention_dropout
        UpperCamelCase_											=							activation_function
        UpperCamelCase_											=							init_std
        UpperCamelCase_											=							layerdrop
        UpperCamelCase_											=							use_cache
        UpperCamelCase_											=							do_layer_norm_before
        # We keep these variables at `True` for backward compatibility.
        UpperCamelCase_											=							enable_bias
        UpperCamelCase_											=							layer_norm_elementwise_affine

        # Note that the only purpose of `_remove_final_layer_norm` is to keep backward compatibility
        # with checkpoints that have been fine-tuned before transformers v4.20.1
        # see https://github.com/facebookresearch/metaseq/pull/164
        UpperCamelCase_											=							_remove_final_layer_norm



