From c05a432e45fda74b3d9a25fe817ff5db5b4ec000 Mon Sep 17 00:00:00 2001 From: ViperEkura <3081035982@qq.com> Date: Thu, 7 May 2026 14:59:27 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20use=20Times=20New=20Roman=20across=20a?= =?UTF-8?q?ll=20scenes,=20widen=20Transformer=20block=20to=202.4=20for=20\?= =?UTF-8?q?'Transformer=20Block=20=C3=97=2024\'=20label?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- architecture.py | 2 ++ continuous_batching.py | 2 ++ prefix_cache.py | 2 ++ transformer.py | 6 ++++-- 4 files changed, 10 insertions(+), 2 deletions(-) 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)