Repository navigation
Developer Guide Repository Structure
Sudharsan Selvaraj edited this page Jul 20, 2026
·
1 revision
The TokenPrint repository is divided into two primary workspaces: backend and frontend.
Knowing where to find files is the first step to contributing. This structure enforces the decoupling of the rendering engine from the machine learning engine.
Token-Print/
├── backend/ # Python FastAPI & PyTorch
├── frontend/ # TypeScript Next.js & React Three Fiber
├── docs/ # Technical documentation
├── scripts/ # Shared CI/CD scripts
├── wiki/ # The GitHub Wiki markdown files (you are here)
├── README.md # Project overview
└── ROADMAP.md # Future plans
backend/
├── app/
│ ├── main.py # FastAPI entrypoint & WebSockets
│ ├── model.py # PyTorch ModelEngine (Loads Qwen2.5)
│ ├── trace.py # Serialization for Record & Replay
│ ├── debug.py # Stepped inspection logic
│ ├── ablation.py # Forward hooks for zeroing heads
│ ├── reduce.py # PCA and dimensionality reduction
│ └── schemas.py # Pydantic models for JSON APIs
├── scripts/ # Verification scripts (verify_real_data.py)
└── requirements.txt # Python dependencies
frontend/
├── app/ # Next.js App Router (page.tsx)
├── components/
│ ├── scenes/ # R3F 3D Components (TransformerStack.tsx)
│ ├── ui/ # Standard React UI Panels (BottomBar.tsx)
│ └── SceneLoader.tsx # WebGL Context boundary
├── lib/
│ ├── gguf/ # Client-side .gguf parser & dequantization
│ ├── store.ts # Zustand State Management
│ ├── formulas.ts # KaTeX LaTeX strings
│ ├── playback.ts # Autoplay pacing and layer logic
│ └── sceneColors.ts# Canonical color mapping
├── public/ # Static assets
└── package.json # Node dependencies
| Previous | Home | Next |
|---|---|---|
| Developer Guide | Home | Building From Source |
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