Skip to main content

tensorplot

Neural network architecture diagrams for papers — CNNs to LLMs. Inspired by PlotNeuralNet (MIT), rewritten in Rust, same visual style, no LaTeX required (but TikZ output when you want it).

VGG16 DeepSeek-V3 from its config.json

Install

cargo install tensorplot-rs       # crates.io
uv tool install tensorplot-rs     # PyPI (or: pip install tensorplot-rs)

Both install the tensorplot CLI binary.

Usage

tensorplot examples/vgg16.toml -o vgg16.svg              # SVG
tensorplot examples/vgg16.toml -o vgg16.png              # PNG
tensorplot examples/vgg16.toml -o vgg16.pdf              # vector PDF, fonts embedded
tensorplot examples/vgg16.toml -o vgg16.tex              # standalone TikZ (pdflatex)
tensorplot examples/vgg16.toml -o fig.tex --snippet      # bare tikzpicture for \input
tensorplot examples/hf/deepseek-v3.json -o ds.svg        # Hugging Face config.json
tensorplot examples/onnx/tiny-resnet.onnx -o resnet.svg  # ONNX model

The snippet needs \usepackage{tikz} and \usetikzlibrary{arrows.meta} in your preamble.

Playground: docs/playground/ runs the same renderer as WASM in the browser: edit a spec, open a .json / .onnx, download SVG or TikZ. Serve it with python3 -m http.server -d docs and open /playground/. Rebuild with docs/playground/build.sh (needs the wasm32-unknown-unknown target).

Spec

Layers are laid out left to right; sizes are derived from the dimensions.

[[layer]]
kind = "conv"            # see kinds below
name = "conv1"           # caption
channels = [64, 64]      # one box per conv
size = 224               # spatial size; conv inherits, pool halves
relu = true              # activation band

[[layer]]
kind = "pool"
kind needs draws
conv channels, size one box per channel entry
pool size (inherited) attached slab, halves size
fc units long bar
softmax — attached bar
embed dim, optional seq, units (vocab) token embedding
norm dim; rms = true for RMSNorm thin slab
attention heads, dim; kv_heads (GQA/MQA), kv_rank (MLA) Q, (latent), K, V, O; box width shows head count
ffn hidden, dim; act = "swiglu" | "gelu" | "relu" gate/up/down projections
moe experts, hidden, dim; top_k, shared router, shared and routed experts, active ones banded
repeat times, nested [[layer.layer]] dashed frame labelled ×N

dim and seq are inherited like size. See examples/llama3-8b.toml.

Graph: every layer can take

  • id — reference name (defaults to name)
  • from = ["a", "b"] — inputs (default: previous layer). A second consumer of the same input branches onto a new row; several inputs merge (examples/inception.toml)
  • skip = ["a"] — residual: a's output is added to this layer's input, drawn as an arc (examples/resnet18.toml)
  • row — explicit vertical offset in cm

Optional per layer: gap (cm before the layer), label (depth label, "" hides), height / depth / width (raw PlotNeuralNet units).

Importers

  • Hugging Face config.json (decoder-only LLMs): Llama, Mistral/Mixtral, Qwen, DeepSeek (MLA, dense-then-MoE layers), GPT-2 key aliases, and multimodal text_config.
  • ONNX: Conv, pooling, Gemm/MatMul, Softmax and LayerNorm become layers; activations add the band; Add of an identity becomes a skip, other Adds and Concat merge. Other ops pass through. Shapes come from the weight initializers and the graph input; no onnxruntime needed.

Metadata

Release files for tensorplot-rs 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tensorplot-rs 0.1.0
File Size Uploaded Provenance Actions
tensorplot_rs-0.1.0.tar.gz 40.9 kB With provenance Details for tensorplot_rs-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for tensorplot-rs 0.1.0
File Actions
tensorplot_rs-0.1.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for tensorplot_rs-0.1.0-py3-none-win_amd64.whl
tensorplot_rs-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for tensorplot_rs-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
tensorplot_rs-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for tensorplot_rs-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
tensorplot_rs-0.1.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for tensorplot_rs-0.1.0-py3-none-macosx_11_0_arm64.whl
tensorplot_rs-0.1.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for tensorplot_rs-0.1.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 12.2 MB

Release files / tensorplot_rs-0.1.0.tar.gz

Download URL tensorplot_rs-0.1.0.tar.gz
Size 40.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a526299881e06ec8131aef4858fb7e96e5752c38d4c4f0a6c0a7552bf3288b6d
BLAKE2b-256 checksum
How to use checksums
ac367206d95c68669c6ec8b725829af07c06b0fe4b4ba1d56ca7758393afa3b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / tensorplot_rs-0.1.0-py3-none-win_amd64.whl

Download URL tensorplot_rs-0.1.0-py3-none-win_amd64.whl
Size 2.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
007832dfd2e439477401b128dbbe04b31d35b621842fa5225f6e64a1f5196b41
BLAKE2b-256 checksum
How to use checksums
8bc9a21d0b868e603397f1759e8f8001cd6348e709e3ba8578c0ae8127c449a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / tensorplot_rs-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL tensorplot_rs-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.6 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
baf9b0886e90930e06727ef084f11f4bd15be1cc57cead5752d2fa24dc7042c6
BLAKE2b-256 checksum
How to use checksums
15c105fceb9acb8b13fdb7cc96d88d4f2ae43a6e16d82ac8acecb901b1844aa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / tensorplot_rs-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL tensorplot_rs-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 2.4 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
0aabfcabd1b220b6d2464cfc840351e9900b83d40193d5c0dc26d8e584bc7077
BLAKE2b-256 checksum
How to use checksums
9a2c8e102ee83c64b5b94bbffca56bce99da8e460309104efd9eed041b16ce49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / tensorplot_rs-0.1.0-py3-none-macosx_11_0_arm64.whl

Download URL tensorplot_rs-0.1.0-py3-none-macosx_11_0_arm64.whl
Size 2.3 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
515afaf939e40e16d9f5e4a17e2241e40e9d077a14797d56a3164abb5c4d9f49
BLAKE2b-256 checksum
How to use checksums
e32cc7db826484de0126a466dcf2d8a250b93d7b6c9b41fe141c3cf94f24ca06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / tensorplot_rs-0.1.0-py3-none-macosx_10_12_x86_64.whl

Download URL tensorplot_rs-0.1.0-py3-none-macosx_10_12_x86_64.whl
Size 2.4 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d8f13adbfae9f6099d5116e55973890c1304db46d74b0ec297ad7155cd5a733e
BLAKE2b-256 checksum
How to use checksums
0898efe5ee6284fa6f1096f3422dabcfd8ec811594e79d5f178e6e7f7a1dc171
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for tensorplot-rs 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for tensorplot_rs-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

6 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page