gitmyhub

llmviz

Python ★ 28 updated 1mo ago

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

A Python tool that generates publication-quality diagrams of LLM architectures straight from a model's config.json, no weights or GPU needed.

PythonPyPIsetup: easycomplexity 2/5

llmviz generates publication quality diagrams of large language model architectures directly from a model's config.json file. It does not need the model's weights, a GPU, or even the transformers library installed. Point it at a Hugging Face model id, a local GGUF file, or a model already installed in Ollama, and it produces a hand drawn style architecture figure in the visual language popularized by Sebastian Raschka's LLM Architecture Gallery, including the decoder tower with labeled callouts, the mixture of experts router, and the SwiGLU module, with parameter counts calculated directly from the config file rather than pulled from a model card.

The README explains the motivation: hand drawn architecture galleries are valuable references but they are made by hand and only cover a snapshot of models. llmviz instead generates the same style of figure automatically, in milliseconds, for any model, as soon as its config file becomes available, even for architectures that did not exist when the tool was written. The parser is described as generic first, meaning it looks for field name synonyms and detects model capabilities automatically rather than hard coding support for specific known models, so it can degrade gracefully on unfamiliar architectures including hybrid Mamba mixers, linear attention, multi head latent attention, and sandwich normalization.

The project is written in Python, distributed as a PyPI package, requires Python 3.11 or newer, is licensed under Apache 2.0, and has continuous integration configured through GitHub Actions. Given the audience of the README, this tool is aimed at machine learning researchers, engineers, and anyone writing about or teaching LLM architectures who wants clear, consistent diagrams without manually drawing them in a design tool.

Where it fits