Skip to main content
DragonBrain – Neural Net Explorer

DragonBrain – Neural Net Explorer

Interactive, browser-based explorer that compares the Baby Dragon Hatchling (BDH) post-transformer architecture against a GPT baseline in real time — all inference runs client-side via WebAssembly.

Client-Side
Inference
4 MB
BDH Memory
5–15%
Sparse Activation
SveltePyTorchONNX Runtime WebD3.jsWebAssemblyAI/ML
01

The Challenge

Post-transformer architectures like the Baby Dragon Hatchling (BDH) are fascinating but abstract — papers describe sparse activation and Hebbian memory, but you can't feel the difference from a GPT without running experiments. And any interactive explainer that phones home to a server for inference is slow, costly, and breaks the moment traffic spikes.

  • Novel architectures are hard to grasp from papers alone
  • No intuitive way to compare BDH against a GPT baseline
  • Server-side inference is slow, costly, and fragile
  • Abstract concepts like Hebbian memory stay invisible
02

The Approach

I trained both models small enough to ship (BDH ~229K params, GPT ~148K) and made a deliberate bet: run everything in the browser. Exporting the PyTorch models to ONNX and running them via ONNX Runtime Web on WebAssembly meant zero server calls — every neuron activation, attention flow, and memory update is computed live on the visitor's machine as they type.

  • Trained compact BDH and GPT models for the browser
  • PyTorch → ONNX → ONNX Runtime Web (WebAssembly)
  • 100% client-side inference, no backend required
  • Real-time visualization of internal model state
03

The Implementation

DragonBrain renders BDH and GPT side by side as you type: sparse activation grids (BDH lights up ~5-15% of neurons vs GPT's ~97-100%), a force-directed D3.js graph of emergent wiring, and a 64×64 Hebbian co-activation heatmap. A memory-scaling chart contrasts BDH's constant ~4 MB footprint against GPT's linearly-growing KV-cache, and a 'teach' experiment quantifies how repeated phrases strengthen memory. A 12-step guided tour walks through it all.

  • Side-by-side sparse activation panels (BDH vs GPT)
  • Force-directed D3.js graph of emergent internal wiring
  • 64×64 Hebbian memory co-activation heatmap
  • Memory-scaling: constant 4 MB vs growing KV-cache
  • Guided 12-step interactive tour of every panel
04

The Outcome

DragonBrain turns an abstract research architecture into something you can poke at and understand in seconds, running entirely in the browser. It makes the case for BDH's efficiency tangible — you watch it stay sparse and memory-flat while the GPT baseline saturates.

  • Complex architecture made intuitive and interactive
  • Runs anywhere, instantly — nothing to install or host
  • BDH's efficiency claims made visible and measurable
  • Educational tool that doubles as a research demo

Rajdeep
Singhio

Full Stack Developer & AI Engineer

© Copyright

RJDP-2026Built with Next.js & Tailwind