Modelmap: Interactive Visualizations of Hugging Face Model Architectures
Modelmap is a tool designed to provide an interactive, animated visualization of the network architecture of any model hosted on Hugging Face. By entering a Hugging Face model ID, users can generate a living map of the model's network without needing to download the actual model weights.
Technical Implementation of Architecture Mapping
Modelmap generates its architecture graphs using a combination of meta-device instantiation and traced fake forward passes. This approach allows the tool to determine the structural layout and tensor shapes of a model without the actual weights, making the visualization process nearly instant and bandwidth-efficient.
- Meta-device Instantiation: The tool instantiates the model structure on a meta-device, which allows it to define the architecture without allocating memory for the actual parameters.
- Traced Fake Forward Pass: The tool performs a trace of a simulated forward pass to determine the exact shapes of the tensors as they flow through the network.
Supported Model Types and Capabilities
Modelmap supports a wide range of architectures, including classic reference architectures and modern large language models (LLMs). Users can also compare two different models side-by-side using the same interface.
Reference Architectures
Modelmap provides instant access to visualizations for several foundational models, such as:
- GPT-2 (124M): A classic decoder-only architecture.
- BERT (base-uncased): The original bidirectional encoder-only transformer.
- T5/Qwen3-8B: Modern dense LLMs featuring Grouped-Query Attention (GQA), RMSNorm, and gated MLP layers.
- DeepSeek-V3.1 (671B): A massive Mixture-of-Experts (MoE) model with multi-head latent attention.
- Qwen3-235B-A22B: An MoE model with 128 experts per layer.
Advanced Model Categories
The tool also supports vision-language models, such as Qwen2.5-VL-3B-Instruct, where a vision tower feeds into an LLM, and various image-text-to-text models like Qwen3.8-27B and Muse-Glimmer-30B.
User Experience and Access Control
Modelmap provides a streamlined experience for debugging and understanding model structures. Users can actually use the tool to estimate the cost of serving a model based on its architecture.
- Public Repositories: Any public Hugging Face repository can be visualized immediately.
- Gated Repositories: For gated models, users can provide a Hugging Face token to gain access to the architecture map.
- Comparison Tool: The tool includes a comparison feature (triggered by ⌘K) that allows users to visualize the architecture of two models (e.g., Qwen2.5-7B vs Qwen3-8B) for direct structural comparison.
Community Feedback
The community has noted the tool's utility for debugging fine-tunes and LoRAs, as some users have previously relied on LLMs like Claude to "walk model architectures" to debugging purposes.
"I’ve had Claude walk model architectures to debug Loras and fine tunes, but this is delightful"
Other users have pointed to similar tools like hfviewer.com, noting differences in design aesthetics.
Sources
Related
- Dispatch
- Dispatch
- Dispatch
- Dispatch
- Project