Repository navigation
Visualization System Geometry
Geometry refers to the actual 3D shapes (vertices, edges, faces) drawn in the canvas. In TokenPrint, geometry is entirely data-driven.
If you draw a generic box and label it "MLP," you are making an illustration. If you draw a funnel whose volume is strictly proportional to ffn_size / hidden_size, you are making an instrument. TokenPrint is an instrument.
TokenPrint maps specific tensor properties directly to geometric parameters in Three.js primitives (like CylinderGeometry, BoxGeometry, or custom shapes).
| Component | Geometry Source | Formula |
|---|---|---|
| Attention Blades | Query Heads | Count = num_heads, Grouping = num_kv_heads
|
| MLP Funnel | FFN Ratio | Radius = ffn_size / hidden_size
|
| LayerNorm | Scaling factor | Rendered as a pinched waist |
| Residual Stream | Layer count | A continuous spine through the stack |
In the Architecture Explorer, the TensorCloud does not use instanced meshes. It uses a single THREE.Points object.
- The Density of points in a cluster is calculated directly from the tensor's
n_params. - The parser builds a single
BufferGeometry, enabling smooth 60fps rendering of millions of points on integrated GPUs.
flowchart LR
ModelMeta[Metadata: num_heads = 14] --> GeoEngine[React Component: AttentionBlock]
GeoEngine --> Math[Math: 360 / 14 degrees]
Math --> Mesh[InstancedMesh: 14 Blades]
Mesh --> WebGL[Draw Call]
| Previous | Home | Next |
|---|---|---|
| Scene Graph | Home | Materials |
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