Google introduced a new tool for visualization of Model Explorer graphs, which allows us to explore, debug, and optimize ML models by visualizing them in an intuitive hierarchical format.
Visualization of graphs plays a key role in the process of developing models. It helps to find and correct conversion and quantification errors, identify bottlenecks in performance, find patterns for optimization, and better understand the architecture of the model. These functions are particularly useful when deploying models on devices with limited resources such as mobile devices.
However, the growth of the scale and complexity of modern models, such as Transformers and Diffusers, creates significant difficulties for existing visualization tools. Large Transformer models often overload traditional visualizers, leading to failures in display or excessive complexity of visualization.
Model Explorer is designed to solve such problems. The tool is capable of visualizing large models and providing hierarchical information, such as the names of functions and visibility areas.
Model Explorer supports many graph formats, including those used in Jax, Pytorch, Tensorflow, and Tensorflow Lite. Initially developed by Google for researchers and engineers, Model Explorer is now available as part of the Google AI Edge product line.
Model Explorer is especially useful for deploying large models on devices where visualization of data on conversion, quantification, and optimization is crucial. The tool combines graphic techniques used in the production of 3D games and animations, adapting them for graph visualization. This enables users to comprehend the model’s architecture, debug conversion errors, and identify performance issues.
GPU-accelerated rendering based on WebGL and Three.js ensures smooth operation at 60 FPS, providing realistic movement and interaction even with columns containing tens of thousands of nodes. The tool also uses instancing to display many copies of objects simultaneously in various areas of the scene. Smooth performance has been demonstrated on a 2019 MacBook Pro with integrated graphics while visualizing a graph with 50,000 nodes and 5,000 edges.
To debug conversion errors, Model Explorer offers a side-by-side comparison mode, allowing users to identify conversion errors by comparing the shapes and types of input and output layers.
Another important feature of Model Explorer is the ability to apply data to column nodes, enabling users to sort, search, and stylize nodes based on this data. When combined with the hierarchical view, users can quickly pinpoint performance issues or numerical errors