






from manim import *







class 			UpperCAmelCase_						(					_lowerCamelCase ):



      """simple docstring"""
      def     UpperCAmelCase						(				self )				->      Optional[Any]:
          UpperCamelCase       :Any								=   Rectangle(height=0.5    ,				width=0.5 )
          UpperCamelCase       :str								=   Rectangle(height=0.46    ,				width=0.46 ).set_stroke(width=0 )

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

          UpperCamelCase       :Dict								=   [mem.copy() for i in range(4 )]
          UpperCamelCase       :List[str]								=   VGroup(*a_ ).arrange(a_    ,				buff=0 )
          UpperCamelCase       :Any								=   Text('''GPU'''    ,				font_size=24 )
          UpperCamelCase       :str								=   Group(a_    ,				a_ ).arrange(a_    ,				buff=0.5    ,				aligned_edge=a_ )
          gpu.move_to([-1, -1, 0] )
          self.add(a_ )

          UpperCamelCase       :Union[str, Any]								=   [mem.copy() for i in range(6 )]
          UpperCamelCase       :int								=   VGroup(*a_ ).arrange(a_    ,				buff=0 )

          UpperCamelCase       :Any								=   Text('''Model'''    ,				font_size=24 )
          UpperCamelCase       :List[str]								=   Group(a_    ,				a_ ).arrange(a_    ,				buff=0.5    ,				aligned_edge=a_ )
          model.move_to([3, -1.0, 0] )
          self.add(a_ )

          UpperCamelCase       :Tuple								=   []
          for i, rect in enumerate(a_ ):
              rect.set_stroke(a_ )
              # target = fill.copy().set_fill(YELLOW, opacity=0.7)
              # target.move_to(rect)
              # self.add(target)

              UpperCamelCase       :Union[str, Any]								=   Rectangle(height=0.46 / 4    ,				width=0.46 / 3 ).set_stroke(width=0.0 ).set_fill(a_    ,				opacity=0.7 )

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

          UpperCamelCase       :Tuple								=   [mem.copy() for i in range(6 )]
          UpperCamelCase       :Optional[Any]								=   VGroup(*a_ ).arrange(a_    ,				buff=0 )

          UpperCamelCase       :Optional[int]								=   Text('''Loaded Checkpoint'''    ,				font_size=24 )
          UpperCamelCase       :Dict								=   Group(a_    ,				a_ ).arrange(a_    ,				aligned_edge=a_    ,				buff=0.4 )
          checkpoint.move_to([3, 0.5, 0] )

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

          UpperCamelCase       :str								=   MarkupText(
              F'''<b>Key:</b>\n\n<span fgcolor=\'{YELLOW}\'>●</span> Empty Model'''    ,				font_size=18    ,				)

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

          self.add(a_    ,				a_ )

          UpperCamelCase       :List[str]								=   MarkupText(
              F'''<span fgcolor=\'{BLUE}\'>●</span> Checkpoint'''    ,				font_size=18    ,				)

          blue_text.next_to(a_    ,				DOWN * 2.4    ,				aligned_edge=key_text.get_left() )

          UpperCamelCase       :Optional[Any]								=   MarkupText(
              F'''Next, a <i><span fgcolor="{BLUE}">second</span></i> model is loaded into memory,\nwith the weights of a <span fgcolor="{BLUE}">single shard</span>.'''    ,				font_size=24    ,				)
          step_a.move_to([2, 2, 0] )
          self.play(Write(a_ )    ,				Write(a_ ) )

          self.play(Write(a_    ,				run_time=1 )    ,				Create(a_    ,				run_time=1 ) )

          UpperCamelCase       :List[Any]								=   []
          UpperCamelCase       :Optional[int]								=   []
          for i, rect in enumerate(a_ ):
              UpperCamelCase       :Tuple								=   fill.copy().set_fill(a_    ,				opacity=0.7 )
              target.move_to(a_ )
              first_animations.append(GrowFromCenter(a_    ,				run_time=1 ) )

              UpperCamelCase       :List[Any]								=   target.copy()
              cpu_target.generate_target()
              if i < 5:
                  cpu_target.target.move_to(cpu_left_col_base[i + 1] )
              else:
                  cpu_target.target.move_to(cpu_right_col_base[i - 5] )
              second_animations.append(MoveToTarget(a_    ,				run_time=1.5 ) )

          self.play(*a_ )
          self.play(*a_ )
          self.wait()










'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import _LazyModule


A_							: int						 =	{"""tokenization_bertweet""": ["""BertweetTokenizer"""]}


if TYPE_CHECKING:
   from .tokenization_bertweet import BertweetTokenizer

else:
   import sys

   A_							: int						 =	_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



