



"""simple docstring"""
from manim import *
class 					a	(  UpperCAmelCase__       ):



  def 	lowerCamelCase__       (						self :					Union[str, Any]		)     ->					List[Any]:


     '''simple docstring'''




     SCREAMING_SNAKE_CASE_: Union[str, Any]     			=Rectangle(height=0.5       ,		width=0.5		)
     SCREAMING_SNAKE_CASE_: int     			=Rectangle(height=0.4_6       ,		width=0.4_6		).set_stroke(width=0		)

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

     SCREAMING_SNAKE_CASE_: Any     			=[mem.copy() for i in range(1		)]
     SCREAMING_SNAKE_CASE_: Dict     			=VGroup(*lowerCAmelCase		).arrange(lowerCAmelCase       ,		buff=0		)
     SCREAMING_SNAKE_CASE_: Dict     			=Text("""GPU"""       ,		font_size=24		)
     SCREAMING_SNAKE_CASE_: str     			=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		)

     SCREAMING_SNAKE_CASE_: Tuple     			=[mem.copy() for i in range(6		)]
     SCREAMING_SNAKE_CASE_: Tuple     			=VGroup(*lowerCAmelCase		).arrange(lowerCAmelCase       ,		buff=0		)

     SCREAMING_SNAKE_CASE_: Union[str, Any]     			=Text("""Model"""       ,		font_size=24		)
     SCREAMING_SNAKE_CASE_: List[Any]     			=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		)       ,		)

     SCREAMING_SNAKE_CASE_: List[Any]     			=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_: Union[str, Any]     			=Square(side_length=2.2		)
     key.move_to([-5, 2, 0]		)

     SCREAMING_SNAKE_CASE_: 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(lowerCAmelCase       ,		run_time=2.5		)       ,		Write(lowerCAmelCase		)       ,		Write(lowerCAmelCase		)		)

     self.add(lowerCAmelCase		)

     SCREAMING_SNAKE_CASE_: int     			=[]
     SCREAMING_SNAKE_CASE_: Union[str, Any]     			=[]
     SCREAMING_SNAKE_CASE_: List[Any]     			=[]
     for i, rect in enumerate(lowerCAmelCase		):
        SCREAMING_SNAKE_CASE_: Dict     			=Rectangle(height=0.4_6       ,		width=0.4_6		).set_stroke(width=0.0		).set_fill(lowerCAmelCase       ,		opacity=0.7		)
        cpu_target.move_to(lowerCAmelCase		)
        cpu_target.generate_target()
        SCREAMING_SNAKE_CASE_: str     			=0.4_6 / 4
        SCREAMING_SNAKE_CASE_: Union[str, Any]     			=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=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"""
from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig


_UpperCAmelCase     =			{
    """albert-base-v1""": """https://huggingface.co/albert-base-v1/resolve/main/config.json""",
    """albert-large-v1""": """https://huggingface.co/albert-large-v1/resolve/main/config.json""",
    """albert-xlarge-v1""": """https://huggingface.co/albert-xlarge-v1/resolve/main/config.json""",
    """albert-xxlarge-v1""": """https://huggingface.co/albert-xxlarge-v1/resolve/main/config.json""",
    """albert-base-v2""": """https://huggingface.co/albert-base-v2/resolve/main/config.json""",
    """albert-large-v2""": """https://huggingface.co/albert-large-v2/resolve/main/config.json""",
    """albert-xlarge-v2""": """https://huggingface.co/albert-xlarge-v2/resolve/main/config.json""",
    """albert-xxlarge-v2""": """https://huggingface.co/albert-xxlarge-v2/resolve/main/config.json""",
}
class 					a	(  UpperCAmelCase__       ):
  UpperCamelCase	:				Any     						=					'albert'



  def __init__(						self :					Dict       ,		lowerCAmelCase :					List[str]=3_0000       ,		lowerCAmelCase :					List[Any]=128       ,		lowerCAmelCase :					List[str]=4096       ,		lowerCAmelCase :					str=12       ,		lowerCAmelCase :					str=1       ,		lowerCAmelCase :					Tuple=64       ,		lowerCAmelCase :					Dict=1_6384       ,		lowerCAmelCase :					int=1       ,		lowerCAmelCase :					str="gelu_new"       ,		lowerCAmelCase :					Dict=0       ,		lowerCAmelCase :					Optional[Any]=0       ,		lowerCAmelCase :					str=512       ,		lowerCAmelCase :					Optional[int]=2       ,		lowerCAmelCase :					List[Any]=0.0_2       ,		lowerCAmelCase :					Union[str, Any]=1E-12       ,		lowerCAmelCase :					Tuple=0.1       ,		lowerCAmelCase :					List[Any]="absolute"       ,		lowerCAmelCase :					List[Any]=0       ,		lowerCAmelCase :					int=2       ,		lowerCAmelCase :					Optional[int]=3       ,		**lowerCAmelCase :					int       ,		)     ->					Tuple:


     '''simple docstring'''




     super().__init__(pad_token_id=lowerCAmelCase       ,		bos_token_id=lowerCAmelCase       ,		eos_token_id=lowerCAmelCase       ,		**lowerCAmelCase		)

     SCREAMING_SNAKE_CASE_: List[str]     			=vocab_size
     SCREAMING_SNAKE_CASE_: Optional[int]     			=embedding_size
     SCREAMING_SNAKE_CASE_: Optional[int]     			=hidden_size
     SCREAMING_SNAKE_CASE_: Tuple     			=num_hidden_layers
     SCREAMING_SNAKE_CASE_: Any     			=num_hidden_groups
     SCREAMING_SNAKE_CASE_: List[Any]     			=num_attention_heads
     SCREAMING_SNAKE_CASE_: List[Any]     			=inner_group_num
     SCREAMING_SNAKE_CASE_: Optional[int]     			=hidden_act
     SCREAMING_SNAKE_CASE_: int     			=intermediate_size
     SCREAMING_SNAKE_CASE_: Any     			=hidden_dropout_prob
     SCREAMING_SNAKE_CASE_: Union[str, Any]     			=attention_probs_dropout_prob
     SCREAMING_SNAKE_CASE_: int     			=max_position_embeddings
     SCREAMING_SNAKE_CASE_: Any     			=type_vocab_size
     SCREAMING_SNAKE_CASE_: int     			=initializer_range
     SCREAMING_SNAKE_CASE_: List[Any]     			=layer_norm_eps
     SCREAMING_SNAKE_CASE_: Dict     			=classifier_dropout_prob
     SCREAMING_SNAKE_CASE_: int     			=position_embedding_type







class 					a	(  UpperCAmelCase__       ):



  @property
  def 	lowerCamelCase__       (						self :					Optional[int]		)     ->					Mapping[str, Mapping[int, str]]:


     '''simple docstring'''




     if self.task == "multiple-choice":
        SCREAMING_SNAKE_CASE_: str     			={0: """batch""", 1: """choice""", 2: """sequence"""}
     else:
        SCREAMING_SNAKE_CASE_: Dict     			={0: """batch""", 1: """sequence"""}
     return OrderedDict(
         [
             ("""input_ids""", dynamic_axis),
             ("""attention_mask""", dynamic_axis),
             ("""token_type_ids""", dynamic_axis),
         ]		)



