🧪 AI Advanced Transformer Architecture Simulation
Interactive 3D visualization of transformer self-attention: watch Query/Key/Value projections turn into softmax(QKᵀ/√d) attention weights, drawn as live connections between tokens with a synced attention-matrix heatmap.
Transformer models decide how much each word in a sentence should "listen" to every other word through scaled dot-product self-attention. This simulator computes the real mechanism on a small toy sequence: random token embeddings are projected into Query, Key and Value vectors, dot products between the selected query and every key are scaled by √d and a temperature control, passed through softmax, and rendered as glowing 3D beams whose thickness and color encode the resulting attention weight — with a synchronized heatmap showing the full token-by-token attention matrix at once.
This simulation demonstrates the core principles of transformer architecture in artificial intelligence. It explores how attention mechanisms allow models to weigh the importance of different parts of an input sequence, a key element in modern natural language processing and other AI applications.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install