diff --git a/architecture.py b/architecture.py index 263ad3f..4240e9c 100644 --- a/architecture.py +++ b/architecture.py @@ -2,6 +2,8 @@ from manim import * +Text.set_default(font="Times New Roman") + class Architecture(Scene): """Boxes on left, description text on right for each layer.""" diff --git a/continuous_batching.py b/continuous_batching.py index fda8ada..e9c48e8 100644 --- a/continuous_batching.py +++ b/continuous_batching.py @@ -6,6 +6,8 @@ with coloured batch tokens flowing through states, entering & leaving continuous from manim import * +Text.set_default(font="Times New Roman") + # ── palette ── PHASE_COLORS = { "Cleanup": GRAY, diff --git a/prefix_cache.py b/prefix_cache.py index 45d94b5..d40edf2 100644 --- a/prefix_cache.py +++ b/prefix_cache.py @@ -2,6 +2,8 @@ from manim import * +Text.set_default(font="Times New Roman") + class PrefixCache(Scene): """Animates the radix-tree prefix cache with multiple distinct branches.""" diff --git a/transformer.py b/transformer.py index 353fbc0..b52e771 100644 --- a/transformer.py +++ b/transformer.py @@ -8,6 +8,8 @@ from manim import * import numpy as np import math +Text.set_default(font="Times New Roman") + class Transformer(Scene): """Animates the GQA attention mechanism with orthogonal connection lines.""" @@ -395,7 +397,7 @@ class Transformer(Scene): # ── Layout constants ── BLK_W = 1.8 BLK_H = 0.28 - TFR_H = 0.48 + TFR_H = 0.55 CX_BLK = -1.0 Y_EMB = 1.40 Y_NORM1 = 0.95 @@ -412,7 +414,7 @@ class Transformer(Scene): emb_node = mkblk(BLK_W, BLK_H, Y_EMB, "Embedding", YELLOW, 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) head = mkblk(BLK_W, BLK_H, Y_HEAD, "LM Head", RED, 9) pipeline = VGroup(emb_node, norm1, tfr_node, norm2, head)