






'''simple docstring'''

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


UpperCAmelCase__						:Any          =			logging.get_logger(__name__)

UpperCAmelCase__						:List[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 	SCREAMING_SNAKE_CASE	(      _UpperCAmelCase  ):
       snake_case__    :     int   		=			'falcon'
       snake_case__    :     Tuple   		=			['past_key_values']




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


            """simple docstring"""







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

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

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




       @property
       def 					a_					(					self      : Tuple					):


            """simple docstring"""







            return self.hidden_size // self.num_attention_heads




       @property
       def 					a_					(					self      : List[Any]					):


            """simple docstring"""







            return not self.alibi











'''simple docstring'''

import math
def     __lowercase  ()   ->     None:


     """simple docstring"""
     __lowerCamelCase						:       Optional[int]				   =				input("""Enter message: """     )
     __lowerCamelCase						:       Optional[Any]				   =				int(input(f"Enter key [2-{len(_lowercase     ) - 1}]: "     )     )
     __lowerCamelCase						:       Dict				   =				input("""Encryption/Decryption [e/d]: """     )

     if mode.lower().startswith("""e"""     ):
          __lowerCamelCase						:       Any				   =				encrypt_message(_lowercase,						_lowercase     )
     elif mode.lower().startswith("""d"""     ):
          __lowerCamelCase						:       int				   =				decrypt_message(_lowercase,						_lowercase     )

     # Append pipe symbol (vertical bar) to identify spaces at the end.
     print(f"Output:\n{text + '|'}"     )
def     __lowercase  (_lowercase,						_lowercase     )   ->     str:


     """simple docstring"""
     __lowerCamelCase						:       int				   =				[""""""] * key
     for col in range(_lowercase     ):
          __lowerCamelCase						:       Optional[Any]				   =				col
          while pointer < len(_lowercase     ):
               cipher_text[col] += message[pointer]
               pointer += key
     return "".join(_lowercase     )
def     __lowercase  (_lowercase,						_lowercase     )   ->     str:


     """simple docstring"""
     __lowerCamelCase						:       List[str]				   =				math.ceil(len(_lowercase     ) / key     )
     __lowerCamelCase						:       List[str]				   =				key
     __lowerCamelCase						:       Tuple				   =				(num_cols * num_rows) - len(_lowercase     )
     __lowerCamelCase						:       List[str]				   =				[""""""] * num_cols
     __lowerCamelCase						:       List[str]				   =				0
     __lowerCamelCase						:       List[Any]				   =				0

     for symbol in message:
          plain_text[col] += symbol
          col += 1

          if (
              (col == num_cols)
              or (col == num_cols - 1)
              and (row >= num_rows - num_shaded_boxes)
          ):
               __lowerCamelCase						:       int				   =				0
               row += 1

     return "".join(_lowercase     )


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   main()



