






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


lowerCamelCase : Optional[int]						   =       logging.get_logger(__name__)

lowerCamelCase : Any						   =       {
    "tiiuae/falcon-40b": "https://huggingface.co/tiiuae/falcon-40b/resolve/main/config.json",
    "tiiuae/falcon-7b": "https://huggingface.co/tiiuae/falcon-7b/resolve/main/config.json",
}

class 		lowerCAmelCase     ( __a			):

     '''simple docstring'''

     _A						:			Any									=      '''falcon'''
     _A						:			Optional[Any]									=      ['''past_key_values''']



     def __init__(  self				:	Optional[Any]		,     __a				:	Optional[int]=65024		,     __a				:	List[str]=4544		,     __a				:	Dict=32		,     __a				:	Optional[int]=71		,     __a				:	Dict=1E-5		,     __a				:	Union[str, Any]=0.02		,     __a				:	Dict=True		,     __a				:	Union[str, Any]=0.0		,     __a				:	Union[str, Any]=0.0		,     __a				:	Dict=None		,     __a				:	int=False		,     __a				:	List[str]=False		,     __a				:	Any=True		,     __a				:	Optional[int]=True		,     __a				:	List[str]=False		,     __a				:	List[Any]=11		,     __a				:	int=11		,     **__a				:	Dict		,     )			->  Dict:


            """simple docstring"""

            __lowercase      :							Optional[Any]				=     vocab_size
            # Backward compatibility with n_embed kwarg
            __lowercase      :							Any				=     kwargs.pop("""n_embed"""		,     UpperCAmelCase__							)
            __lowercase      :							Optional[Any]				=     hidden_size if n_embed is None else n_embed
            __lowercase      :							Tuple				=     num_hidden_layers
            __lowercase      :							Optional[Any]				=     num_attention_heads
            __lowercase      :							Optional[int]				=     layer_norm_epsilon
            __lowercase      :							List[str]				=     initializer_range
            __lowercase      :							List[str]				=     use_cache
            __lowercase      :							int				=     hidden_dropout
            __lowercase      :							Union[str, Any]				=     attention_dropout

            __lowercase      :							Dict				=     bos_token_id
            __lowercase      :							Optional[Any]				=     eos_token_id
            __lowercase      :							Tuple				=     num_attention_heads if num_kv_heads is None else num_kv_heads
            __lowercase      :							int				=     alibi
            __lowercase      :							List[Any]				=     new_decoder_architecture
            __lowercase      :							str				=     multi_query  # Ignored when new_decoder_architecture is True
            __lowercase      :							Optional[int]				=     parallel_attn
            __lowercase      :							Dict				=     bias

            super().__init__(bos_token_id=UpperCAmelCase__		,     eos_token_id=UpperCAmelCase__		,     **UpperCAmelCase__							)



     @property
     def       lowerCAmelCase				(  self				:	Dict							)			->  Dict:


            """simple docstring"""

            return self.hidden_size // self.num_attention_heads



     @property
     def       lowerCAmelCase				(  self				:	Optional[Any]							)			->  Tuple:


            """simple docstring"""

            return not self.alibi







import fire

from utils import calculate_rouge, save_json
def       snake_case_		(     lowerCAmelCase_       :						Any       ,       lowerCAmelCase_       :						str       ,       lowerCAmelCase_       :						str=None       ,       **lowerCAmelCase_       :						str      ):
							__lowercase      :							Tuple				=     [x.strip() for x in open(lowerCAmelCase_      ).readlines()]
							__lowercase      :							Dict				=     [x.strip() for x in open(lowerCAmelCase_      ).readlines()][: len(lowerCAmelCase_      )]
							__lowercase      :							Tuple				=     calculate_rouge(lowerCAmelCase_       ,       lowerCAmelCase_       ,       **lowerCAmelCase_      )
							if save_path is not None:
														save_json(lowerCAmelCase_       ,       lowerCAmelCase_       ,       indent=lowerCAmelCase_      )
							return metrics  # these print nicely


if __name__ == "__main__":
	fire.Fire(calculate_rouge_path)