






"""simple docstring"""







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


_UpperCamelCase					      =  logging.get_logger(__name__)

_UpperCamelCase					      =  {
    "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__ (	__lowerCAmelCase			):
    SCREAMING_SNAKE_CASE		=      "falcon"
    SCREAMING_SNAKE_CASE		=      ["past_key_values"]






    def __init__(			self     ,A=65_024     ,A=4_544     ,A=32     ,A=71     ,A=1e-5     ,A=0.02     ,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     ,):
          UpperCAmelCase          =	vocab_size
          # Backward compatibility with n_embed kwarg
          UpperCAmelCase          =	kwargs.pop("""n_embed"""     ,lowerCamelCase__ )
          UpperCAmelCase          =	hidden_size if n_embed is None else n_embed
          UpperCAmelCase          =	num_hidden_layers
          UpperCAmelCase          =	num_attention_heads
          UpperCAmelCase          =	layer_norm_epsilon
          UpperCAmelCase          =	initializer_range
          UpperCAmelCase          =	use_cache
          UpperCAmelCase          =	hidden_dropout
          UpperCAmelCase          =	attention_dropout

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

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






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






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











"""simple docstring"""







_UpperCamelCase					      =  [4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
_UpperCamelCase					      =  [3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
_UpperCamelCase					      =  {
    0: """Sunday""",
    1: """Monday""",
    2: """Tuesday""",
    3: """Wednesday""",
    4: """Thursday""",
    5: """Friday""",
    6: """Saturday""",
}

def _a			(		_snake_case				,	_snake_case				,	_snake_case							):







      """simple docstring"""






      assert len(str(_snake_case							)							) > 2, "year should be in YYYY format"
      assert 1 <= month <= 12, "month should be between 1 to 12"
      assert 1 <= day <= 31, "day should be between 1 to 31"

      # Doomsday algorithm:
      UpperCAmelCase          =	year // 100
      UpperCAmelCase          =	(5 * (century % 4) + 2) % 7
      UpperCAmelCase          =	year % 100
      UpperCAmelCase          =	centurian % 12
      UpperCAmelCase          =	(
          (centurian // 12) + centurian_m + (centurian_m // 4) + century_anchor
      ) % 7
      UpperCAmelCase          =	(
          DOOMSDAY_NOT_LEAP[month - 1]
          if (year % 4 != 0) or (centurian == 0 and (year % 400) == 0)
          else DOOMSDAY_LEAP[month - 1]
      )
      UpperCAmelCase          =	(dooms_day + day - day_anchor) % 7
      return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
  import doctest

  doctest.testmod()



