google-ai-edge/model-explorer
A modern model graph visualizer and debugger
Model Explorer – Visual Tool for AI Model Graphs
What it is
- An open‑source visualizer that reads a neural‑network model (TensorFlow, TFLite, TensorFlow‑JS, MLIR, PyTorch‑Exported‑Program, etc.) and displays its computation graph as an interactive, hierarchical diagram.
Why it matters
- Large models can have hundreds of operations spread across many logical blocks. Model Explorer groups operations into nested layers, letting you expand or collapse sections so you can see the big picture or drill down to a single op.
- It helps developers debug shape mismatches, locate unexpected ops, and understand how a model is structured without reading raw code.
Key features (as described in the README)
- Hierarchical view – layers can be nested; click to expand/collapse.
- Highlight I/O – quickly spot input and output nodes.
- Metadata overlay – attach custom info (e.g., tensor shapes, data types) to nodes.
- Interactive pop‑ups – hover or click a node to see details.
- Search – find ops by name or type.
- Duplicate‑layer detection – shows identical sub‑graphs.
- GPU‑accelerated rendering – smooth navigation even for big graphs.
- Extension framework – developers can add adapters for new model formats.
- Command‑line & API – use the tool from a terminal (
model‑explorer) or embed it in Python code. - Web component – the visualizer core is also published as an npm package (
ai‑edge‑model‑explorer‑visualizer) for integration into web apps.
Supported model formats
- TensorFlow Lite (
.tflite) - TensorFlow (
SavedModel/graphdef) - TensorFlow.js (
.json) - MLIR (intermediate representation used by Google’s compiler stack)
- PyTorch Exported Program (the new TorchScript‑like format)
- Community adapters exist for ONNX, VGF, TOSA, and PTE.
Getting started
# Install the Python package
pip install ai-edge-model-explorer
# Launch the GUI
model-explorer path/to/your/model.tflite
- A web‑based version is also hosted on Hugging Face Spaces for quick uploads.
- Detailed step‑by‑step instructions are in the project Wiki (Installation, User Guide, CLI guide, API guide, Colab notebook, and how to write your own adapter).
Extensibility
- The repo encourages contributions of custom adapters. The "Develop Adapter Extension" wiki page explains the required interface, and the maintainers will add links to new adapters in the README.
- The visualizer component can be embedded in other front‑ends via the npm package, with demos provided in the
src/custom_element_demosfolder.
Community & resources
- Video introduction on YouTube and a blog post on the Google Research Blog give high‑level overviews.
- Users can join research studies about the tool via a Google Form.
Who should use it
- ML engineers who need to inspect or debug model architectures.
- Researchers building new model formats who want a quick way to visualise them.
- Front‑end developers building AI‑powered web apps who need a ready‑made graph visualizer.
Bottom line: Model Explorer is a practical, cross‑framework visual debugging aid for AI models, offering both a desktop GUI and a reusable web component, with a clear path for extending support to additional model formats.
Related
- Dispatch
- Project
- Project
- Dispatch
- Project