

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


A_	:			str  	=      logging.get_logger(__name__)

A_	:			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    _a						(__magic_name__    ):


					'''simple docstring'''






					UpperCAmelCase__:       Dict  							=	'''falcon'''
					UpperCAmelCase__:       Any  							=	['''past_key_values''']






					def __init__(			self   ,	A__=6_5024   ,	A__=4544   ,	A__=32   ,	A__=71   ,	A__=1e-5   ,	A__=0.0_2   ,	A__=True   ,	A__=0.0   ,	A__=0.0   ,	A__=None   ,	A__=False   ,	A__=False   ,	A__=True   ,	A__=True   ,	A__=False   ,	A__=11   ,	A__=11   ,	**A__   ,	):
						A__							:   Dict					       =		vocab_size
						# Backward compatibility with n_embed kwarg
						A__							:   Union[str, Any]					       =		kwargs.pop("""n_embed"""   ,	A__      )
						A__							:   Optional[Any]					       =		hidden_size if n_embed is None else n_embed
						A__							:   Any					       =		num_hidden_layers
						A__							:   Any					       =		num_attention_heads
						A__							:   Optional[Any]					       =		layer_norm_epsilon
						A__							:   Tuple					       =		initializer_range
						A__							:   Tuple					       =		use_cache
						A__							:   str					       =		hidden_dropout
						A__							:   List[str]					       =		attention_dropout

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

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






					@property
					def   __A      (			self      ):
						return self.hidden_size // self.num_attention_heads






					@property
					def   __A      (			self      ):
						return not self.alibi






from argparse import ArgumentParser

from . import BaseTransformersCLICommand

def 						UpperCamelCase (lowercase_:			int )					->				str:
	return DownloadCommand(args.model   ,				args.cache_dir   ,				args.force   ,				args.trust_remote_code )



class    _a						(__magic_name__    ):


					'''simple docstring'''






					@staticmethod
					def   __A      (			A__      ):
						A__							:   Any					       =		parser.add_parser("""download"""      )
						download_parser.add_argument(
						    """--cache-dir"""   ,	type=A__   ,	default=A__   ,	help="""Path to location to store the models"""      )
						download_parser.add_argument(
						    """--force"""   ,	action="""store_true"""   ,	help="""Force the model to be download even if already in cache-dir"""      )
						download_parser.add_argument(
						    """--trust-remote-code"""   ,	action="""store_true"""   ,	help="""Whether or not to allow for custom models defined on the Hub in their own modeling files. Use only if you've reviewed the code as it will execute on your local machine"""   ,	)
						download_parser.add_argument("""model"""   ,	type=A__   ,	help="""Name of the model to download"""      )
						download_parser.set_defaults(func=A__      )






					def __init__(			self   ,	A__   ,	A__   ,	A__   ,	A__      ):
						A__							:   Union[str, Any]					       =		model
						A__							:   Dict					       =		cache
						A__							:   str					       =		force
						A__							:   Tuple					       =		trust_remote_code






					def   __A      (			self      ):
						from ..models.auto import AutoModel, AutoTokenizer

						AutoModel.from_pretrained(
						    self._model   ,	cache_dir=self._cache   ,	force_download=self._force   ,	trust_remote_code=self._trust_remote_code      )
						AutoTokenizer.from_pretrained(
						    self._model   ,	cache_dir=self._cache   ,	force_download=self._force   ,	trust_remote_code=self._trust_remote_code      )



