

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


UpperCamelCase__  :      Optional[Any]			=    logging.get_logger(__name__)

UpperCamelCase__  :      str			=    {
    "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       __snake_case  (    lowerCAmelCase__       ):
  __lowerCAmelCase     :	List[Any]						 =  'falcon'
  __lowerCAmelCase     :	str						 =  ['past_key_values']

  def __init__(					self						,		_A=65024						,		_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						,		):
      SCREAMING_SNAKE_CASE_									=						vocab_size
      # Backward compatibility with n_embed kwarg
      SCREAMING_SNAKE_CASE_									=						kwargs.pop('n_embed'						,		_A)
      SCREAMING_SNAKE_CASE_									=						hidden_size if n_embed is None else n_embed
      SCREAMING_SNAKE_CASE_									=						num_hidden_layers
      SCREAMING_SNAKE_CASE_									=						num_attention_heads
      SCREAMING_SNAKE_CASE_									=						layer_norm_epsilon
      SCREAMING_SNAKE_CASE_									=						initializer_range
      SCREAMING_SNAKE_CASE_									=						use_cache
      SCREAMING_SNAKE_CASE_									=						hidden_dropout
      SCREAMING_SNAKE_CASE_									=						attention_dropout

      SCREAMING_SNAKE_CASE_									=						bos_token_id
      SCREAMING_SNAKE_CASE_									=						eos_token_id
      SCREAMING_SNAKE_CASE_									=						num_attention_heads if num_kv_heads is None else num_kv_heads
      SCREAMING_SNAKE_CASE_									=						alibi
      SCREAMING_SNAKE_CASE_									=						new_decoder_architecture
      SCREAMING_SNAKE_CASE_									=						multi_query  # Ignored when new_decoder_architecture is True
      SCREAMING_SNAKE_CASE_									=						parallel_attn
      SCREAMING_SNAKE_CASE_									=						bias

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

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


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





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


UpperCamelCase__  :      List[Any]			=    logging.get_logger(__name__)

UpperCamelCase__  :      List[str]			=    {
    "microsoft/biogpt": "https://huggingface.co/microsoft/biogpt/resolve/main/config.json",
    # See all BioGPT models at https://huggingface.co/models?filter=biogpt
}



class       __snake_case  (    lowerCAmelCase__       ):
  __lowerCAmelCase     :	Any						 =  'biogpt'

  def __init__(					self						,		_A=42384						,		_A=1024						,		_A=24						,		_A=16						,		_A=4096						,		_A="gelu"						,		_A=0.1						,		_A=0.1						,		_A=1024						,		_A=0.0_2						,		_A=1E-12						,		_A=True						,		_A=True						,		_A=0.0						,		_A=0.0						,		_A=1						,		_A=0						,		_A=2						,		**_A						,		):
      SCREAMING_SNAKE_CASE_									=						vocab_size
      SCREAMING_SNAKE_CASE_									=						max_position_embeddings
      SCREAMING_SNAKE_CASE_									=						hidden_size
      SCREAMING_SNAKE_CASE_									=						num_hidden_layers
      SCREAMING_SNAKE_CASE_									=						num_attention_heads
      SCREAMING_SNAKE_CASE_									=						intermediate_size
      SCREAMING_SNAKE_CASE_									=						hidden_act
      SCREAMING_SNAKE_CASE_									=						hidden_dropout_prob
      SCREAMING_SNAKE_CASE_									=						attention_probs_dropout_prob
      SCREAMING_SNAKE_CASE_									=						initializer_range
      SCREAMING_SNAKE_CASE_									=						layer_norm_eps
      SCREAMING_SNAKE_CASE_									=						scale_embedding
      SCREAMING_SNAKE_CASE_									=						use_cache
      SCREAMING_SNAKE_CASE_									=						layerdrop
      SCREAMING_SNAKE_CASE_									=						activation_dropout
      super().__init__(pad_token_id=_A						,		bos_token_id=_A						,		eos_token_id=_A						,		**_A)


