Repository navigation
Visualization System
TokenPrint's Visualization System is built on React Three Fiber (R3F) and Three.js. It is responsible for translating the raw, numeric output of a language model into an interactive, 60fps 3D environment in the browser.
Translating abstract mathematics into geometry requires rigorous discipline. If the visualization system uses arbitrary placeholder shapes, it stops being an educational tool and becomes mere decoration. The architecture of the rendering engine must guarantee a strict 1-to-1 mapping between data and visuals.
The rendering pipeline is split into explicit sub-components that manage different aspects of the 3D scene:
- Scene Graph: The hierarchy of React components that dictates what is rendered based on the active mode.
- Geometry: The data-driven shapes (blades, funnels, waists) that build the Transformer Stack.
- Materials: How light and color interact with the geometry to convey activation strength.
- Animation System: The headless ticker that drives playback pacing without fabricating frames.
- Color Mapping: The strict, monochrome-plus-accent ruleset for assigning meaning to hues.
- Camera System: The logic governing the cinematic follow-camera and orbit controls.
- Interaction Model: How mouse hovers and clicks map from 3D space back to tensor data.
flowchart TD
Backend[Data Source] --> Store[Zustand Store]
subgraph Visualization Engine
Store --> Graph[Scene Graph]
Graph --> Geo[Geometry Generator]
Graph --> Mat[Material Updater]
Geo --> Canvas[WebGL Canvas]
Mat --> Canvas
Camera[Camera System] --> Canvas
Anim[Animation Ticker] --> Store
end
| Previous | Home | Next |
|---|---|---|
| Supported Models | Home | Scene Graph |
TokenPrint Wiki | Home | Getting Started | User Guide | Concepts | Architecture | API | GitHub
TokenPrint is an interactive 3D visualization platform for exploring transformer architectures, tensors, and real-time LLM inference.
- User Guide
- Architecture Explorer
- Live Inference
- Tensor Inspector
- Camera Controls
- HUD
- Timeline
- Scene Navigation
- Transformer Concepts
- Tokenization
- Embeddings
- Positional Encoding
- RoPE
- Multi-Head Attention
- KV Cache
- LayerNorm
- Feed Forward Network
- Residual Connections
- Logits
- Softmax
- Sampling
- Autoregressive Generation
- Visualization System
- Scene Graph
- Geometry
- Materials
- Animation System
- Color Mapping
- Camera System
- Interaction Model
- Architecture
- Overall Architecture
- Frontend
- Backend
- WebSocket Protocol
- Data Pipeline
- Renderer
- Event System