chore: use Times New Roman across all scenes, widen Transformer block to 2.4 for \'Transformer Block × 24\' label
This commit is contained in:
parent
57abefa47f
commit
c05a432e45
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
from manim import *
|
from manim import *
|
||||||
|
|
||||||
|
Text.set_default(font="Times New Roman")
|
||||||
|
|
||||||
|
|
||||||
class Architecture(Scene):
|
class Architecture(Scene):
|
||||||
"""Boxes on left, description text on right for each layer."""
|
"""Boxes on left, description text on right for each layer."""
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ with coloured batch tokens flowing through states, entering & leaving continuous
|
||||||
|
|
||||||
from manim import *
|
from manim import *
|
||||||
|
|
||||||
|
Text.set_default(font="Times New Roman")
|
||||||
|
|
||||||
# ── palette ──
|
# ── palette ──
|
||||||
PHASE_COLORS = {
|
PHASE_COLORS = {
|
||||||
"Cleanup": GRAY,
|
"Cleanup": GRAY,
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
from manim import *
|
from manim import *
|
||||||
|
|
||||||
|
Text.set_default(font="Times New Roman")
|
||||||
|
|
||||||
|
|
||||||
class PrefixCache(Scene):
|
class PrefixCache(Scene):
|
||||||
"""Animates the radix-tree prefix cache with multiple distinct branches."""
|
"""Animates the radix-tree prefix cache with multiple distinct branches."""
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ from manim import *
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
Text.set_default(font="Times New Roman")
|
||||||
|
|
||||||
|
|
||||||
class Transformer(Scene):
|
class Transformer(Scene):
|
||||||
"""Animates the GQA attention mechanism with orthogonal connection lines."""
|
"""Animates the GQA attention mechanism with orthogonal connection lines."""
|
||||||
|
|
@ -395,7 +397,7 @@ class Transformer(Scene):
|
||||||
# ── Layout constants ──
|
# ── Layout constants ──
|
||||||
BLK_W = 1.8
|
BLK_W = 1.8
|
||||||
BLK_H = 0.28
|
BLK_H = 0.28
|
||||||
TFR_H = 0.48
|
TFR_H = 0.55
|
||||||
CX_BLK = -1.0
|
CX_BLK = -1.0
|
||||||
Y_EMB = 1.40
|
Y_EMB = 1.40
|
||||||
Y_NORM1 = 0.95
|
Y_NORM1 = 0.95
|
||||||
|
|
@ -412,7 +414,7 @@ class Transformer(Scene):
|
||||||
|
|
||||||
emb_node = mkblk(BLK_W, BLK_H, Y_EMB, "Embedding", YELLOW, 9)
|
emb_node = mkblk(BLK_W, BLK_H, Y_EMB, "Embedding", YELLOW, 9)
|
||||||
norm1 = mkblk(BLK_W, BLK_H, Y_NORM1, "RMS Norm", GREEN, 9)
|
norm1 = mkblk(BLK_W, BLK_H, Y_NORM1, "RMS Norm", GREEN, 9)
|
||||||
tfr_node = mkblk(BLK_W, TFR_H, Y_TFR, "Transformer", PURPLE, 11)
|
tfr_node = mkblk(2.4, TFR_H, Y_TFR, "Transformer Block\n× 24", PURPLE, 9)
|
||||||
norm2 = mkblk(BLK_W, BLK_H, Y_NORM2, "RMS Norm", GREEN, 9)
|
norm2 = mkblk(BLK_W, BLK_H, Y_NORM2, "RMS Norm", GREEN, 9)
|
||||||
head = mkblk(BLK_W, BLK_H, Y_HEAD, "LM Head", RED, 9)
|
head = mkblk(BLK_W, BLK_H, Y_HEAD, "LM Head", RED, 9)
|
||||||
pipeline = VGroup(emb_node, norm1, tfr_node, norm2, head)
|
pipeline = VGroup(emb_node, norm1, tfr_node, norm2, head)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue