CLI tool
google-ai-edge/model-explorer avatar
google-ai-edge/model-explorer

Model Explorer: reading a compiled model graph as nested layers

A modern model graph visualizer and debugger

1,562 stars171 forksJavaScriptApache-2.0

At a glance

What is it?
A Google AI Edge visualizer that turns a TFLite, TensorFlow, MLIR or exported PyTorch program into a collapsible graph, with an adapter framework for formats it does not ship with.
Who is it for?
Model Explorer is worth the install the moment a compiled model does something you cannot explain from the source, because collapsing a five-thousand-node graph down to named layers is the one thing it does better than a generic graph viewer. What it does not do is tell you why the graph looks wrong, since the debugging workflow still depends on you knowing what the operators ought to be.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 26 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 20, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Starting the visualizer after a pip install

The whole quickstart in the README is two commands:

bash
$ pip install ai-edge-model-explorer
$ model-explorer

There is no server to configure, no port to pick and no model argument in that form. The value of that simplicity is that it also removes the usual failure mode of a tool like this, which is getting it running at all before you find out whether the graph view helps. If you want to look at a model without installing anything, the README points at a Hugging Face space, with the honest caveat that it only visualizes models you upload there.

The package name on PyPI is ai-edge-model-explorer, and there is a second, separate distribution on npm for the front end alone. The README is clear that the visualizer component is published as ai-edge-model-explorer-visualizer, with usage notes under src/ui/custom_element_npm/README.md and runnable demos under src/custom_element_demos/. So the browser piece is a genuine embeddable custom element rather than a screenshot of a web app, which matters if you want the graph inside your own tooling rather than in a separate browser tab.

Nested layers instead of a flat operator list

The design decision that defines this tool is that operations are not presented as a flat list. Model Explorer organizes them into nested layers that expand and collapse on demand, and the README lists the rest of the feature set on top of that: highlighting input and output operations, overlaying metadata on nodes, interactive pop-ups for layer details, search, and a mode that shows identical layers.

That last one matters more than it sounds. When a converted model contains the same convolution or the same attention projection forty times, the useful question is usually which instances share a shape and which differ, and a view built around grouping makes that visible instead of leaving you to compare labels by eye. Search plus metadata overlays cover the other half of the workflow, which is narrowing a large graph down to the handful of nodes where a tensor shape or an attribute value looks wrong.

Rendering is GPU accelerated, per the README, which is the difference between a graph being explorable and a graph being a slideshow when it has tens of thousands of nodes. The releases also show the visualizer treating label legibility as a real constraint rather than an afterthought: version 0.1.32 added SVG text rendering for crisper small text and non-ASCII characters, adjustable font sizes for op and layer labels, and a cap on edge label character counts.

Five formats built in, adapters for the rest

The supported list is TFLite, TensorFlow, TensorFlow.js, MLIR and PyTorch in its Exported Program form. That set is a deliberate spread across the formats a converted model actually arrives in, and the PyTorch entry is the one to notice: it reads the exported program rather than a pickled checkpoint, which means the graph you inspect is the graph that was exported.

Everything beyond that list goes through an adapter framework, and the README treats third-party adapters as a first-class path rather than a hack. Three exist at the time of writing, all pointing at the same extension mechanism: an ONNX adapter from justinchuby, plus VGF and TOSA adapters from Arm. The VGF and TOSA pair is a good signal about who this is for, since both formats come out of the Arm ML infrastructure and neither is otherwise convenient to read as a graph.

The contribution path is documented as a wiki page, Develop Adapter Extension, and the README says pull requests adding a link to an adapter's repository and PyPI package will be considered. There is also an example_colabs directory at the top level of the tree, which is where the Colab notebook workflow lives. The overall shape is a small core with a plugin surface, and the cost of that choice is that a format you care about may still need someone else to write the adapter.

The C++ adapter moved to a C-ABI in v0.1.33

The most consequential change in the release history is not a visual feature. Version 0.1.33, published on 2026-08-24, modernized the C++ adapter packaging around a stable C-ABI with Python ctypes FFI, and the stated reason is worth repeating because it explains a whole class of build failure: the previous packaging depended on matching C++ standard library and compiler ABIs, which broke portability across operating systems and open source builds.

If you have ever installed this tool and hit a native extension that would not import, that is the cause, and the fix arrived in this release. Two other changes in the same version matter for anyone working with Google's newer formats: official support for LiteRT-LM .litertlm models through built-in section range reading, and an optional subgraphIndex field on the C++ subgraph schema so subgraphs are identified rather than numbered by accident.

The adapter work also shows up in the incremental API changes. Version 0.1.31 in November 2025 moved extension methods to keyword arguments, added watch support to the API, fixed registration for extensions that themselves use other extensions, and allowed a single extension call to return multiple node data items. Those are the small changes that decide whether the extension framework is pleasant to build against, and they cluster around the idea that an adapter can compute derived facts about nodes rather than only parse them.

The rendering choices the release notes admit are tradeoffs

The 0.1.32 notes are unusually candid about a cost, which is a good sign for a tool people rely on. SVG text rendering gives better quality for small text and supports non-ASCII characters, and the documentation states plainly that rendering performance may be slower for large graphs. It is enabled in Advanced Settings rather than on by default, so the default stays fast and the sharp option is a deliberate choice. The same release notes mention a WebGL fallback alongside fixed node width and label wrapping in 0.1.33, which together suggest the renderer has more than one path and degrades rather than failing.

Layout details like fixed node width with wrapping are small individually and significant together, because a graph view that reflows as you expand a layer forces you to re-find your place. Input and output tracking also gained the ability to work at layer level in 0.1.32, so selecting a layer highlights the input and output nodes of the ops inside it, which is exactly the operation you perform when tracing data flow through a block rather than a single node.

The honest read is that this is a viewer's feature set being refined by people who open large graphs daily. Nothing in the release history suggests a change of direction; the cadence is roughly every two to three months, and the repository's last push was on 2026-09-11.

The README is an index, the wiki is the manual

Everything beyond the two-line quickstart lives in the project wiki, and the README's job is to route you there. The wiki is organised as seven numbered pages: Installation, User Guide, Command Line Guide, API Guide, Run in Colab Notebook, Develop Adapter Extension, and Limitations and Known Issues.

That last page is the one to read first, and its existence is a better signal about this project than any feature list. A graph viewer that silently mis-renders a subgraph would be far worse than one that documents what it cannot represent, and the presence of a known-issues page, kept as a standing document rather than a section buried in a release note, suggests the team expects edge cases and prefers to write them down. The Command Line Guide and API Guide also matter for anything beyond a one-off look, since scripting the export of a graph view is how you would build a regression check around a converted model.

Two supporting links round out the picture: an introduction video and a blog post on the Google Research blog, which is where the design rationale for the nested-layer view is most likely explained at length. The tree itself is small and predictable, with src holding the implementation, test for the suite, ci for automation and screenshots for the images in the README. This is an Apache-2.0 project, which matters for teams wiring a visualization step into a build pipeline.

Editorial conclusion

Model Explorer is worth the install the moment a compiled model does something you cannot explain from the source, because collapsing a five-thousand-node graph down to named layers is the one thing it does better than a generic graph viewer. What it does not do is tell you why the graph looks wrong, since the debugging workflow still depends on you knowing what the operators ought to be. Before adopting it as a review step, check the Limitations and Known Issues page in the wiki against your model, because the C++ adapter path is the part most likely to need local building after the v0.1.33 packaging change. For formats outside the five built in, read the Develop Adapter Extension guide first and decide whether writing an adapter beats reading the graph as text.

Frequently asked questions

Which model formats can Model Explorer open?

The built-in adapters cover TFLite, TensorFlow, TensorFlow.js, MLIR and PyTorch in its Exported Program form. Anything else goes through the adapter extension framework, and the README lists existing third-party adapters for ONNX, VGF and TOSA.

How do I run Model Explorer without installing Python packages?

There is a Hugging Face space linked from the README, and it works on models you upload to it. The README notes the limitation plainly: the hosted version only visualizes uploaded models, so local files and private models need the pip install instead.

Can the Model Explorer visualizer be embedded outside the Python tool?

Yes. The front end is published on npm as ai-edge-model-explorer-visualizer, as a custom element, with usage notes in the repository under src/ui and demos under src/custom_element_demos.

What changed in Model Explorer version 0.1.33?

Three things led the release: official support for LiteRT-LM .litertlm models, subgraph indexing for LiteRT and LiteRT-LM formats, and a C++ adapter repackaged around a stable C-ABI with Python ctypes FFI, which removed compiler and standard library ABI mismatches. Visualizer work included fixed node width with label wrapping and WebGL fallback.

Official sources

  1. google-ai-edge/model-explorer on GitHub
  2. Issues
  3. License: Apache-2.0
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/google-ai-edge-model-explorer.svg)](https://hysenlabs.com/projects/google-ai-edge-model-explorer)