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.
IndexToken TextVocabulary IDBytes
#0"Vecto"82145 B
#1"rized"247245 B
#2" "310321 B
#3"SIMD"307794 B
#4" "310321 B
#5"proce"433935 B
#6"ssing"239325 B
#7" "310321 B
#8"in"94822 B
#9" "310321 B
#10"Rust"444984 B
#11" "310321 B
#12"accel"52385 B
#13"erates"296366 B
#14" "310321 B
#15"Apa"43763 B
#16"che"368063 B
#17" "310321 B
#18"Arrow"129705 B
#19" "310321 B
#20"pipe"219624 B
#21"lines"3515 B
#22" "310321 B
#23"by"92762 B
#24" "310321 B
#25"4"310521 B
#26"."310461 B
#27"2"310501 B
#28"x"311201 B
#29"."310461 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 (4, 3)Vector B (2, 5)
Vector A (Target Embedding)Magnitude: 5.00
Vector B (Query Embedding)Magnitude: 5.39
Dot Product23.00
Angle (θ)31.3°
L2 Distance2.83