code: 
  
  
  
  
  
  
  from ...configuration_utils import PretrainedConfig
  from ...utils import logging
  
  
  __snake_case							      =						logging.get_logger(__name__)
  
  __snake_case							      =						{
      """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     UpperCAmelCase_		(      lowercase				):
  
  
  
        """simple docstring"""
        UpperCamelCase_       :      List[str]     ='opt'
        UpperCamelCase_       :      Optional[Any]     =['past_key_values']
        def __init__(       self					,       SCREAMING_SNAKE_CASE_=5_0272					,       SCREAMING_SNAKE_CASE_=768					,       SCREAMING_SNAKE_CASE_=12					,       SCREAMING_SNAKE_CASE_=3072					,       SCREAMING_SNAKE_CASE_=2048					,       SCREAMING_SNAKE_CASE_=True					,       SCREAMING_SNAKE_CASE_=False					,       SCREAMING_SNAKE_CASE_=None					,       SCREAMING_SNAKE_CASE_=0.1					,       SCREAMING_SNAKE_CASE_=0.0					,       SCREAMING_SNAKE_CASE_=12					,       SCREAMING_SNAKE_CASE_="relu"					,       SCREAMING_SNAKE_CASE_=0.0					,       SCREAMING_SNAKE_CASE_=0.02					,       SCREAMING_SNAKE_CASE_=True					,       SCREAMING_SNAKE_CASE_=1					,       SCREAMING_SNAKE_CASE_=2					,       SCREAMING_SNAKE_CASE_=2					,       SCREAMING_SNAKE_CASE_=True					,       SCREAMING_SNAKE_CASE_=True					,       **SCREAMING_SNAKE_CASE_					,       )       ->   Any:
            super().__init__(
                pad_token_id=SCREAMING_SNAKE_CASE_					,       bos_token_id=SCREAMING_SNAKE_CASE_					,       eos_token_id=SCREAMING_SNAKE_CASE_					,       **SCREAMING_SNAKE_CASE_					,       )
            UpperCamelCase :Dict										=     vocab_size
            UpperCamelCase :Any										=     max_position_embeddings
            UpperCamelCase :Optional[Any]										=     num_attention_heads
            UpperCamelCase :List[str]										=     word_embed_proj_dim if word_embed_proj_dim is not None else hidden_size
            UpperCamelCase :Union[str, Any]										=     ffn_dim
            UpperCamelCase :Tuple										=     hidden_size
            UpperCamelCase :str										=     num_hidden_layers
            UpperCamelCase :Union[str, Any]										=     dropout
            UpperCamelCase :int										=     attention_dropout
            UpperCamelCase :List[str]										=     activation_function
            UpperCamelCase :Any										=     init_std
            UpperCamelCase :Optional[Any]										=     layerdrop
            UpperCamelCase :Union[str, Any]										=     use_cache
            UpperCamelCase :Tuple										=     do_layer_norm_before
            # We keep these variables at `True` for backward compatibility.
            UpperCamelCase :int										=     enable_bias
            UpperCamelCase :Any										=     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 :str										=     _remove_final_layer_norm
  
  
  
  
  
  
style_context: 
  
  
  
  
  
  
  from __future__ import annotations
  
  
  
  
  
  
  
  class     UpperCAmelCase_		:
  
  
  
        """simple docstring"""
        def __init__(       self					,       SCREAMING_SNAKE_CASE_				)       ->   None:
            UpperCamelCase :Tuple										=     value
            UpperCamelCase :Node | None										=     None
            UpperCamelCase :Node | None										=     None
  
  
  
  
  
  
  
  class     UpperCAmelCase_		:
  
  
  
        """simple docstring"""
        UpperCamelCase_       :      int
        def __init__(       self				)       ->   None:
            UpperCamelCase :List[Any]										=     0
        def 					UpperCAmelCase		(       self					,       SCREAMING_SNAKE_CASE_					,       SCREAMING_SNAKE_CASE_				)       ->   None:
            if node is None:
                return
  
            if path_sum == self.target:
                self.paths += 1
  
            if node.left:
                self.depth_first_search(node.left					,       path_sum + node.left.value				)
            if node.right:
                self.depth_first_search(node.right					,       path_sum + node.right.value				)
  
  
  
  
        def 					UpperCAmelCase		(       self					,       SCREAMING_SNAKE_CASE_					,       SCREAMING_SNAKE_CASE_ = None				)       ->   int:
            if node is None:
                return 0
            if target is not None:
                UpperCamelCase :Tuple										=     target
  
            self.depth_first_search(SCREAMING_SNAKE_CASE_					,       node.value				)
            self.path_sum(node.left				)
            self.path_sum(node.right				)
  
            return self.paths
  
  
  if __name__ == "__main__":
   import doctest
  
   doctest.testmod()
  
  
  
  
  
  