LLM Architecture Cards
What is inside an open-weight model, in one page, without downloading its weights. Each card is built from the model\x27s Hugging Face config: the model is instantiated on torch\x27s meta device (shapes only), parameters are counted per module, one decoder layer is drawn as a block diagram with its weight shapes, and the total is cross-checked against the safetensors metadata on the Hub. Memory numbers are arithmetic, not measurements.
Cards
Make your own
git clone https://github.com/kaihuan-huang/llm-arch-viz && cd llm-arch-viz
uv venv .venv --python 3.12 && uv pip install --python .venv/bin/python torch transformers huggingface_hub
.venv/bin/python llm_arch_viz.py Qwen/Qwen2.5-7B-Instruct # -> out/Qwen__Qwen2.5-7B-Instruct.html
.venv/bin/python llm_arch_viz.py Qwen/Qwen2.5-7B-Instruct --json # facts + memory as JSON, for checking a hypothesis
Why meta device: from_config under torch.device("meta") allocates no storage, so a 27B model takes seconds and zero bytes; only config.json is fetched. The layer diagram orders modules by name (input norm → attention → post-attention norm → MLP), so a model with unusual names may draw out of order; the module tree is exact.