interactive_experiments.ts
Engineering Lab
Live, browser-based interactive experiments, deep learning simulations, and mathematical tooling.
LAB-01•Transformer Attention Mechanics
Interactive Attention Matrix & Softmax Heatmap
Computes scaled dot-product attention scores Softmax(QK^T / (τ √d_k)).
AI
systems
scale
through
memory
efficiency
AI
18%
8%
15%
31%
12%
17%
systems
13%
17%
31%
11%
6%
21%
scale
18%
19%
6%
32%
16%
9%
through
11%
7%
36%
9%
11%
25%
memory
16%
18%
22%
21%
6%
18%
efficiency
18%
15%
8%
30%
18%
11%
Attention Intensity:Low (0%)High (100%)
LAB-02•Subword Tokenization & Byte-Pair Encoding
Subword Tokenizer & Byte-Pair Encoding Sandbox
Simulates subword tokenization, vocabulary mapping, and compression metrics.
Tokens30
Chars / Token2.60
Bytes78
Vectorized␣SIMD␣processing␣in␣Rust␣accelerates␣Apache␣Arrow␣pipelines␣by␣4.2x.
| Index | Token Text | Vocabulary ID | Bytes |
|---|---|---|---|
| #0 | "Vecto" | 8214 | 5 B |
| #1 | "rized" | 24724 | 5 B |
| #2 | " " | 31032 | 1 B |
| #3 | "SIMD" | 30779 | 4 B |
| #4 | " " | 31032 | 1 B |
| #5 | "proce" | 43393 | 5 B |
| #6 | "ssing" | 23932 | 5 B |
| #7 | " " | 31032 | 1 B |
| #8 | "in" | 9482 | 2 B |
| #9 | " " | 31032 | 1 B |
| #10 | "Rust" | 44498 | 4 B |
| #11 | " " | 31032 | 1 B |
| #12 | "accel" | 5238 | 5 B |
| #13 | "erates" | 29636 | 6 B |
| #14 | " " | 31032 | 1 B |
| #15 | "Apa" | 4376 | 3 B |
| #16 | "che" | 36806 | 3 B |
| #17 | " " | 31032 | 1 B |
| #18 | "Arrow" | 12970 | 5 B |
| #19 | " " | 31032 | 1 B |
| #20 | "pipe" | 21962 | 4 B |
| #21 | "lines" | 351 | 5 B |
| #22 | " " | 31032 | 1 B |
| #23 | "by" | 9276 | 2 B |
| #24 | " " | 31032 | 1 B |
| #25 | "4" | 31052 | 1 B |
| #26 | "." | 31046 | 1 B |
| #27 | "2" | 31050 | 1 B |
| #28 | "x" | 31120 | 1 B |
| #29 | "." | 31046 | 1 B |
LAB-03•Embedding Geometry & Metric Spaces
Vector Cosine Similarity & Distance Simulator
Visualizes semantic embedding vector geometry, cosine metrics, and geometric distances.
Cosine Similarity0.8542
Vector A (Target Embedding)Magnitude: 5.00
Vector B (Query Embedding)Magnitude: 5.39
Dot Product23.00
Angle (θ)31.3°
L2 Distance2.83