llmviz generates publication-quality LLM architecture figures from a model's config.json, without needing weights or a GPU.

Stars

26

7-day growth

No data

Forks

2

Open issues

0

License

Apache-2.0

Last updated

2026-07-04

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It produces accurate parameter counts and figures in the style of Sebastian Raschka's LLM Architecture Gallery instantly for any model, even those that didn't exist when the tool was created.

Who it is for

  • ML researchers documenting architectures
  • AI engineers evaluating model feasibility
  • Technical writers creating model explainers
  • Educators teaching transformer architectures

Use cases

  • Visualizing the architecture of a new model from its config alone
  • Comparing two architectures side-by-side with a diff table
  • Checking if a model can run on available hardware with quantized memory estimates
  • Generating social media cards or poster grids for multiple models

Strengths

  • Operates solely on config.json—no model weights, GPU, or transformers library required
  • Accurately reconstructs total/active parameters, KV-cache bytes, and VRAM from per-layer math, validated against published figures within 0.5-3%
  • Parser is generic-first: handles diverse architectures (MHA, GQA, MLA, MoE, hybrid mixers) with graceful degradation
  • Offers a rich set of commands—render, diff, lineage, fit, explain, MCP server—plus Python API and static gallery generation

Considerations

  • Requires Python 3.11+ and internet access to fetch configs from Hugging Face or Ollama
  • Some advanced features (PNG export, LLM explanations, MCP) require optional dependencies
  • Figures are algorithmically generated and may lack the explanatory commentary of hand-drawn originals

README quick start

llmviz

Publication-quality LLM architecture figures from config.json alone — no weights, no GPU, no transformers install.

Point it at any model — a Hugging Face id, a local GGUF file, or a model installed in Ollama — and get a hand-drawn-quality architecture figure in the visual language of Sebastian Raschka's LLM Architecture Gallery: the decoder tower with dotted-leader callouts, the MoE router inset, the SwiGLU module, and parameter counts computed from the config, not scraped from a model card.

Why

Hand-drawn galleries are wonderful and update episodically. llmviz generates the same figure in milliseconds, for any model, the day its config lands on the Hub — including architectures that didn't exist when this tool was written. The parser is generic-first (field-name synonyms, capability detection, graceful degradation), so hybrid Mamba mixers, linear attention, MLA, sandwich norms, and whatever ships next all render correctly or degrade honestly.

The numbers are the point: total and active parameters, KV-cache bytes per token, and VRAM footprints are reconstructed from per-layer math. The test suite pins them against published figures — Llama-3-8B at 8.03B, DeepSeek-V3 at 671B/37.5B, Qwen3-235B-A22B at 235B/22B — within 0.5–3%. When Kimi-Linear-48B-A3B (a model the code was never tuned for) parses to 48.9B total / 3.3B active, you know the math is doing the work.

Install

pip install llmviz                # SVG figures
pip install "llmviz[png]"         # + PNG export (cairosvg)
pip install "llmviz[explain]"     # + LLM-written notes (LiteLLM: Ollama, llama.cpp, any provider)
pip install "llmviz[mcp]"         # + MCP server for agents

Sixty seconds

llmviz render deepseek-ai/DeepSeek-V3            # the figure above → DeepSeek-V3.svg
llmviz render ollama:deepseek-r1                 # a model installed in YOUR Ollama
llmviz inspect ./model-q4.gguf                   # any local or remote .gguf (header-only read)
llmviz fit Qwen/Qwen3-235B-A22B -c 131072        # can I run it? fp16/q8/q4 + your GPU verdict
llmviz diff deepseek-ai/DeepSeek-V3 NousResearch/Meta-Llama-3-8B

Commands

| Command | What

Description

Publication-quality LLM architecture figures from config.json — Raschka-style towers, diffs, posters, VRAM math. No weights needed.

Related repositories

Similar projects matched by category, topics, and programming language.

makecindy
Featured
makecindy GitHub avatar

cindy

Cindy is an open-source AI agent that runs locally on your machine, integrates multiple AI harnesses and models, and provides memory, skills, and automation to perform real work in your projects and apps.

AI & Machine LearningLarge Language Models
958
uzairansaruzi
Featured
uzairansaruzi GitHub avatar

hermex

Hermex is a native SwiftUI iPhone app that lets you control a self-hosted Hermes AI agent directly from your phone, with no subscriptions, tracking, or third-party relay.

AI & Machine LearningLarge Language Models
941
hahhforest
Featured
hahhforest GitHub avatar

pi-textbook

A hands-on course that walks through building a Pi-style coding agent from scratch across 15 checkpoints, starting from an offline agent trajectory.

AI & Machine LearningLarge Language Models
625