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


A__       :   Any   						=					logging.get_logger(__name__)

A__       :   int   						=					{
    """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       (  __UpperCamelCase					):
					__a					=    """opt"""
					__a					=    ["""past_key_values"""]
					def __init__(		self ,	SCREAMING_SNAKE_CASE__=50272 ,	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__ ,	):
								"""simple docstring"""







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





# tests directory-specific settings - this file is run automatically
# by pytest before any tests are run

import sys
import warnings
from os.path import abspath, dirname, join


# allow having multiple repository checkouts and not needing to remember to rerun
# 'pip install -e .[dev]' when switching between checkouts and running tests.
A__       :   Optional[Any]   						=					abspath(join(dirname(dirname(dirname(__file__))), """src"""))
sys.path.insert(1, git_repo_path)


# silence FutureWarning warnings in tests since often we can't act on them until
# they become normal warnings - i.e. the tests still need to test the current functionality
warnings.simplefilter(action="""ignore""", category=FutureWarning)



def      _a     (   __UpperCamelCase       :  Tuple    ):
			from transformers.testing_utils import pytest_addoption_shared

			pytest_addoption_shared(__UpperCamelCase    )



def      _a     (   __UpperCamelCase       :  int    ):
			from transformers.testing_utils import pytest_terminal_summary_main

			lowerCAmelCase__ :    int				      =			terminalreporter.config.getoption('''--make-reports'''    )
			if make_reports:
						pytest_terminal_summary_main(__UpperCamelCase	,id=__UpperCamelCase    )



