# llmviz

A command-line tool that generates publication-quality LLM architecture diagrams directly from a model's config.json, computing parameter counts and VRAM footprints from the config rather than scraping them from a model card.

llmviz generates publication-quality LLM architecture figures from a model's config.json alone, needing no model weights, no GPU and no transformers install. Pointed at a Hugging Face model id, a local GGUF file, or a model installed in Ollama, it produces a hand-drawn-style architecture figure in the visual language of Sebastian Raschka's LLM Architecture Gallery, including the decoder tower, an MoE router inset and the SwiGLU module, with parameter counts computed from the config rather than scraped from a model card.

Its parser is generic-first, using field-name synonyms and capability detection so that architectures it was not specifically tuned for still render correctly or degrade honestly, including hybrid Mamba mixers, linear attention, multi-head latent attention and sandwich norms. Total and active parameter counts, KV-cache bytes per token and VRAM footprints are reconstructed from per-layer math and checked in the test suite against published figures for models such as Llama-3-8B, DeepSeek-V3 and Qwen3-235B-A22B. Commands can render a single figure, diff two model towers side by side, show a family's lineage of changes, produce a social-card image, build a poster grid of several models, or generate a searchable static HTML gallery, optionally deployed to a Hugging Face Space.

It is written in Python, installed with pip, and licensed under Apache-2.0.

Website: https://github.com/h9-tec/llmviz
