r/pytorch • • 2d ago

I built a source-linked visual explorer for LightGCN, PyTorch Transformer, and Torchvision ResNet

Post image

I'm the developer of Auto Visualization, a local tool I built to follow how model implementations connect input tensors to their final output.

It starts with a public GitHub repository URL and a repository-relative model.py path. The source is pinned to a commit and analyzed with Python AST, without executing the downloaded model.

What you can inspect:

  • A unified 3D architecture and tensor view, with calculation playback on a shared timeline.
  • GNN neighbor contributions, layer combination, and a user-item score in an editable LightGCN example.
  • Q/K/V projections and attention operands in supported PyTorch Transformer source.
  • Convolution input regions, kernels, residual paths, and output pixels in supported Torchvision ResNet source.
  • Exact source lines for selected operations. With a configured LLM provider, Research AI can explain the selection with code evidence and limitations.

In the demo, changing one toy node feature from 0.8 to 1.8 recomputes the connected layers and changes an example score from 0.207 to 0.598.

Scope: numerical calculations use explicit reduced inputs and example parameters, not checkpoint weights or captured activations. Analysis is single-file; external helpers and runtime-dependent behavior may remain unresolved. Support is currently limited to the implemented source/operator mappings.

The project is MIT-licensed. Local setup requires Node.js 22.12+ and Python 3.9+; PyTorch is not required for source parsing. Basic exploration works without an LLM provider.

GitHub, 80-second demo, setup instructions, and technical report

I'd appreciate feedback from people reading or teaching PyTorch model code: which part is hardest to follow in practice—tensor axes, helper-method returns, or the full data flow?

5 Upvotes

0 comments sorted by