
"""simple docstring"""






from manim import *

class 					__a     ( __a       ):



							'''simple docstring'''







							def   SCREAMING_SNAKE_CASE						(     self       )			->							List[str]:




										'''simple docstring'''
										__lowercase       =       Rectangle(height=0.5  ,    width=0.5       )
										__lowercase       =       Rectangle(height=0.46  ,    width=0.46       ).set_stroke(width=0       )

										__lowercase       =       [mem.copy() for i in range(6       )]
										__lowercase       =       [mem.copy() for i in range(6       )]
										__lowercase       =       VGroup(*_lowerCamelCase       ).arrange(_lowerCamelCase  ,    buff=0       )
										__lowercase       =       VGroup(*_lowerCamelCase       ).arrange(_lowerCamelCase  ,    buff=0       )
										__lowercase       =       VGroup(_lowerCamelCase  ,    _lowerCamelCase       ).arrange(_lowerCamelCase  ,    buff=0       )
										__lowercase       =       Text("CPU"  ,    font_size=24       )
										__lowercase       =       Group(_lowerCamelCase  ,    _lowerCamelCase       ).arrange(_lowerCamelCase  ,    buff=0.5  ,    aligned_edge=_lowerCamelCase       )
										cpu.move_to([-2.5, -0.5, 0]       )
										self.add(_lowerCamelCase       )

										__lowercase       =       [mem.copy() for i in range(1       )]
										__lowercase       =       VGroup(*_lowerCamelCase       ).arrange(_lowerCamelCase  ,    buff=0       )
										__lowercase       =       Text("GPU"  ,    font_size=24       )
										__lowercase       =       Group(_lowerCamelCase  ,    _lowerCamelCase       ).arrange(_lowerCamelCase  ,    buff=0.5  ,    aligned_edge=_lowerCamelCase       )
										gpu.align_to(_lowerCamelCase  ,    _lowerCamelCase       )
										gpu.set_x(gpu.get_x() - 1       )

										self.add(_lowerCamelCase       )

										__lowercase       =       [mem.copy() for i in range(6       )]
										__lowercase       =       VGroup(*_lowerCamelCase       ).arrange(_lowerCamelCase  ,    buff=0       )

										__lowercase       =       Text("Model"  ,    font_size=24       )
										__lowercase       =       Group(_lowerCamelCase  ,    _lowerCamelCase       ).arrange(_lowerCamelCase  ,    buff=0.5  ,    aligned_edge=_lowerCamelCase       )
										model.move_to([3, -1.0, 0]       )

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

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

										__lowercase       =       Square(side_length=2.2       )
										key.move_to([-5, 2, 0]       )

										__lowercase       =       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(_lowerCamelCase  ,    run_time=2.5       )  ,    Write(_lowerCamelCase       )  ,    Write(_lowerCamelCase       )       )

										self.add(_lowerCamelCase       )

										__lowercase       =       []
										__lowercase       =       []
										__lowercase       =       []
										for i, rect in enumerate(_lowerCamelCase       ):
													__lowercase       =       Rectangle(height=0.46  ,    width=0.46       ).set_stroke(width=0.0       ).set_fill(_lowerCamelCase  ,    opacity=0.7       )
													cpu_target.move_to(_lowerCamelCase       )
													cpu_target.generate_target()
													__lowercase       =       0.46 / 4
													__lowercase       =       0.46 / 3

													if i == 0:
																cpu_target.target.next_to(cpu_left_col_base[0].get_corner(DOWN + LEFT       )  ,    buff=0.02  ,    direction=_lowerCamelCase       )
																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=_lowerCamelCase  ,    buff=0.0       )
													else:
																cpu_target.target.next_to(cpu_targs[i - 1].target  ,    direction=_lowerCamelCase  ,    buff=0.0       )
													cpu_targs.append(_lowerCamelCase       )

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

										self.play(*_lowerCamelCase       )
										self.play(*_lowerCamelCase       )

										self.wait()







"""simple docstring"""






_lowercase							=				'''
# Installazione di Transformers
! pip install transformers datasets
# Per installare dalla fonte invece dell\'ultima versione rilasciata, commenta il comando sopra e
# rimuovi la modalità commento al comando seguente.
# ! pip install git+https://github.com/huggingface/transformers.git
'''

_lowercase							=				[{'''type''': '''code''', '''content''': INSTALL_CONTENT}]
_lowercase							=				{
    '''{processor_class}''': '''FakeProcessorClass''',
    '''{model_class}''': '''FakeModelClass''',
    '''{object_class}''': '''FakeObjectClass''',
}





