






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        __snake_case(					__UpperCamelCase      ):
 lowercase :       List[Any]		      =		'''opt'''
 lowercase :       Dict		      =		['''past_key_values''']



 def __init__(	self   :   Optional[Any] ,		UpperCAmelCase__   :   Optional[Any]=50_272 ,		UpperCAmelCase__   :   Dict=768 ,		UpperCAmelCase__   :   Optional[Any]=12 ,		UpperCAmelCase__   :   List[str]=3_072 ,		UpperCAmelCase__   :   Optional[Any]=2_048 ,		UpperCAmelCase__   :   List[Any]=True ,		UpperCAmelCase__   :   str=False ,		UpperCAmelCase__   :   Any=None ,		UpperCAmelCase__   :   Optional[int]=0.1 ,		UpperCAmelCase__   :   List[Any]=0.0 ,		UpperCAmelCase__   :   Union[str, Any]=12 ,		UpperCAmelCase__   :   Union[str, Any]="relu" ,		UpperCAmelCase__   :   Optional[int]=0.0 ,		UpperCAmelCase__   :   Any=0.02 ,		UpperCAmelCase__   :   Optional[Any]=True ,		UpperCAmelCase__   :   Optional[Any]=1 ,		UpperCAmelCase__   :   Tuple=2 ,		UpperCAmelCase__   :   Optional[Any]=2 ,		UpperCAmelCase__   :   Dict=True ,		UpperCAmelCase__   :   List[str]=True ,		**UpperCAmelCase__   :   List[Any] ,		):

    """simple docstring"""






    super().__init__(
        pad_token_id=UpperCAmelCase__ ,		bos_token_id=UpperCAmelCase__ ,		eos_token_id=UpperCAmelCase__ ,		**UpperCAmelCase__ ,		)
    lowercase__						:	List[str]         = vocab_size
    lowercase__						:	Any         = max_position_embeddings
    lowercase__						:	Tuple         = num_attention_heads
    lowercase__						:	str         = word_embed_proj_dim if word_embed_proj_dim is not None else hidden_size
    lowercase__						:	Optional[int]         = ffn_dim
    lowercase__						:	Tuple         = hidden_size
    lowercase__						:	Tuple         = num_hidden_layers
    lowercase__						:	str         = dropout
    lowercase__						:	Dict         = attention_dropout
    lowercase__						:	Union[str, Any]         = activation_function
    lowercase__						:	int         = init_std
    lowercase__						:	Union[str, Any]         = layerdrop
    lowercase__						:	Dict         = use_cache
    lowercase__						:	List[str]         = do_layer_norm_before
    # We keep these variables at `True` for backward compatibility.
    lowercase__						:	Tuple         = enable_bias
    lowercase__						:	List[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
    lowercase__						:	Optional[Any]         = _remove_final_layer_norm










def       a__						(  A					):

   if not isinstance(A		,				A					) or number < 0:
      raise ValueError("""Input must be a non-negative integer"""					)

   lowercase__						:	str         = number & ~(number - 1)
   lowercase__						:	Optional[int]         = 0
   while intermediate:
      intermediate >>= 1
      index += 1
   return index - 1


if __name__ == "__main__":
 import doctest

 doctest.testmod(verbose=True)


