





"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCamelCase_								=		logging.get_logger(__name__)

lowerCamelCase_								=		{
    "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(   A  ):
       SCREAMING_SNAKE_CASE_   :      Tuple							=  '''falcon'''
       SCREAMING_SNAKE_CASE_   :      Dict							=  ['''past_key_values''']




       def __init__(						self		,SCREAMING_SNAKE_CASE__=6_50_24		,SCREAMING_SNAKE_CASE__=45_44		,SCREAMING_SNAKE_CASE__=32		,SCREAMING_SNAKE_CASE__=71		,SCREAMING_SNAKE_CASE__=1E-5		,SCREAMING_SNAKE_CASE__=0.0_2		,SCREAMING_SNAKE_CASE__=True		,SCREAMING_SNAKE_CASE__=0.0		,SCREAMING_SNAKE_CASE__=0.0		,SCREAMING_SNAKE_CASE__=None		,SCREAMING_SNAKE_CASE__=False		,SCREAMING_SNAKE_CASE__=False		,SCREAMING_SNAKE_CASE__=True		,SCREAMING_SNAKE_CASE__=True		,SCREAMING_SNAKE_CASE__=False		,SCREAMING_SNAKE_CASE__=11		,SCREAMING_SNAKE_CASE__=11		,**SCREAMING_SNAKE_CASE__		,)			->      Union[str, Any]:





             """simple docstring"""






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

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

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




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





             """simple docstring"""






             return self.hidden_size // self.num_attention_heads




       @property
       def     _UpperCamelCase     (						self							)			->      Dict:





             """simple docstring"""






             return not self.alibi






"""simple docstring"""
from manim import *






class 					_SCREAMING_SNAKE_CASE(   A  ):




       def     _UpperCamelCase     (						self							)			->      str:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  Rectangle(height=0.5		,width=0.5							)
             __SCREAMING_SNAKE_CASE   :List[str]						=  Rectangle(height=0.4_6		,width=0.4_6							).set_stroke(width=0							)

             __SCREAMING_SNAKE_CASE   :List[str]						=  [mem.copy() for i in range(6							)]
             __SCREAMING_SNAKE_CASE   :List[str]						=  [mem.copy() for i in range(6							)]
             __SCREAMING_SNAKE_CASE   :Optional[int]						=  VGroup(*SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0							)
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  VGroup(*SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0							)
             __SCREAMING_SNAKE_CASE   :Any						=  VGroup(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0							)
             __SCREAMING_SNAKE_CASE   :Tuple						=  Text('''CPU'''		,font_size=24							)
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  Group(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0.5		,aligned_edge=SCREAMING_SNAKE_CASE__							)
             cpu.move_to([-2.5, -0.5, 0]							)
             self.add(SCREAMING_SNAKE_CASE__							)

             __SCREAMING_SNAKE_CASE   :List[Any]						=  [mem.copy() for i in range(1							)]
             __SCREAMING_SNAKE_CASE   :str						=  VGroup(*SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0							)
             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  Text('''GPU'''		,font_size=24							)
             __SCREAMING_SNAKE_CASE   :int						=  Group(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0.5		,aligned_edge=SCREAMING_SNAKE_CASE__							)
             gpu.align_to(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							)
             gpu.set_x(gpu.get_x() - 1							)

             self.add(SCREAMING_SNAKE_CASE__							)

             __SCREAMING_SNAKE_CASE   :str						=  [mem.copy() for i in range(6							)]
             __SCREAMING_SNAKE_CASE   :int						=  VGroup(*SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0							)

             __SCREAMING_SNAKE_CASE   :List[Any]						=  Text('''Model'''		,font_size=24							)
             __SCREAMING_SNAKE_CASE   :int						=  Group(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							).arrange(SCREAMING_SNAKE_CASE__		,buff=0.5		,aligned_edge=SCREAMING_SNAKE_CASE__							)
             model.move_to([3, -1.0, 0]							)

             self.play(
                 Create(SCREAMING_SNAKE_CASE__		,run_time=1							)		,Create(SCREAMING_SNAKE_CASE__		,run_time=1							)		,Create(SCREAMING_SNAKE_CASE__		,run_time=1							)		,)

             __SCREAMING_SNAKE_CASE   :List[str]						=  MarkupText(
                 f'''First, an empty model skeleton is loaded\ninto <span fgcolor=\'{YELLOW}\'>memory</span> without using much RAM.'''		,font_size=24		,)

             __SCREAMING_SNAKE_CASE   :List[Any]						=  Square(side_length=2.2							)
             key.move_to([-5, 2, 0]							)

             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  MarkupText(
                 f'''<b>Key:</b>\n\n<span fgcolor=\'{YELLOW}\'>●</span> Empty Model'''		,font_size=18		,)

             key_text.move_to([-5, 2.4, 0]							)

             step_a.move_to([2, 2, 0]							)
             self.play(Write(SCREAMING_SNAKE_CASE__		,run_time=2.5							)		,Write(SCREAMING_SNAKE_CASE__							)		,Write(SCREAMING_SNAKE_CASE__							)							)

             self.add(SCREAMING_SNAKE_CASE__							)

             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  []
             __SCREAMING_SNAKE_CASE   :int						=  []
             __SCREAMING_SNAKE_CASE   :List[Any]						=  []
             for i, rect in enumerate(SCREAMING_SNAKE_CASE__							):
                   __SCREAMING_SNAKE_CASE   :Any						=  Rectangle(height=0.4_6		,width=0.4_6							).set_stroke(width=0.0							).set_fill(SCREAMING_SNAKE_CASE__		,opacity=0.7							)
                   cpu_target.move_to(SCREAMING_SNAKE_CASE__							)
                   cpu_target.generate_target()
                   __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  0.4_6 / 4
                   __SCREAMING_SNAKE_CASE   :Tuple						=  0.4_6 / 3

                   if i == 0:
                         cpu_target.target.next_to(cpu_left_col_base[0].get_corner(DOWN + LEFT							)		,buff=0.0_2		,direction=SCREAMING_SNAKE_CASE__							)
                         cpu_target.target.set_x(cpu_target.target.get_x() + 0.1							)
                   elif i == 3:
                         cpu_target.target.next_to(cpu_targs[0].target		,direction=SCREAMING_SNAKE_CASE__		,buff=0.0							)
                   else:
                         cpu_target.target.next_to(cpu_targs[i - 1].target		,direction=SCREAMING_SNAKE_CASE__		,buff=0.0							)
                   cpu_targs.append(SCREAMING_SNAKE_CASE__							)

                   first_animations.append(rect.animate(run_time=0.5							).set_stroke(SCREAMING_SNAKE_CASE__							)							)
                   second_animations.append(MoveToTarget(SCREAMING_SNAKE_CASE__		,run_time=1.5							)							)

             self.play(*SCREAMING_SNAKE_CASE__							)
             self.play(*SCREAMING_SNAKE_CASE__							)

             self.wait()