Retrieved article excerpt
Open article · Retrieved 2026-10-25T20:27:18.384752+00:00
# NeuronDump
Look inside any local LLM, find the parts it doesn't need, and make it smaller.
NeuronDump reads **GGUF** model files (the format used by **Ollama** and **llama.cpp**) and
shows what is inside: layers, attention heads, vocabulary, chat template, weight statistics.
It can then remove unused parts and write a smaller GGUF that still runs in Ollama and llama.cpp.
It works with any model. It reads each file's own metadata; nothing is hard-coded per model.
[The model graph of qwen3.8:27b in the web interface (3D city view)](https://github.com/aymen94/NeuronDump/blob/main/docs/images/model_graph.png)
## Install
**Download:** ready-made Windows and Linux builds are on the
**[releases page](https://github.com/aymen94/NeuronDump/releases)**. Unzip and run `neurondump list`.
Download steps and checks: **[install guide](https://github.com/aymen94/NeuronDump/blob/main/docs/install.md#download-a-ready-made-build)**.
**Build from source:** you need [Git](https://git-scm.com) and [Rust](https://rustup.rs) 1.88 or newer.
Step-by-step instructions: **[Windows and Linux install guide](https://github.com/aymen94/NeuronDump/blob/main/docs/install.md)**.
**Windows** (PowerShell):
```
winget install Git.Git
winget install Rustlang.Rustup # then reopen PowerShell
git clone https://github.com/aymen94/NeuronDump
cd NeuronDump
cargo install --path crates/neurondump
neurondump list
```
**Linux**:
```
sudo apt install build-essential git curl # or dnf / pacman
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh && source "$HOME/.cargo/env"
git clone https://github.com/aymen94/NeuronDump
cd NeuronDump
cargo install --path crates/neurondump
neurondump list
```
Add `--features trace` to `cargo install` to also run models and watch each layer.
## Quick start
```
neurondump list # every local model
neurondump inspect llama3.2:1b # what's inside a model
neurondump vocab llama3.2:1b --search hello
neurondump template llama3.2:1b # the chat template as a tree
neurondump analyze llama3.2:1b --out plan.json
neurondump slim llama3.2:1b --plan plan.json --only vocab --out small.gguf
neurondump web --open # the same, in your browser
```
Run `neurondump` with no arguments to choose between the interactive CLI and the web interface.
## Look inside, cut, and see the impact
The web interface draws the model as a graph you can open up, in 3D (tower, city or force
layout) or 2D. Everything is bundled, so it works offline.
- **Render inside any part:**
- double-click a layer to see its attention and feed-forward blocks;
- double-click attention to see its KV groups, then its individual heads;
- feed-forward opens into neuron buckets, and MoE into experts.
- **Inspect:**
- hover any part for its size and flag;
- click it for its path, contents, connections, weight statistics, activations, importance,
and whether it can be removed (`safe`, `risky` or `breaks_model`) and why.
- **Search inside:** type a tensor name like `blk.3.ffn_down`. Closed layers open to show it.
- **Cut (edit):** press **Cut this** on any part (a layer, a block, a head, a token range) to add
it to a cut selection. Cut parts get a red outline.
- **Direct impact, instantly:** the panel shows:
- parameters removed or zeroed, and the new file size;
- what gets disconnected and what depends on the cut;
- whether llama.cpp still loads the file;
- a verdict.
Dangerous cuts are refused unless you force them.
- **Simulated impact** (`--features trace`): the cut model runs in memory next to the original.
You compare their next tokens, KL divergence, generated text, the logit lens per layer and
perplexity. Nothing is written.
- **Sweep:** cuts each layer (or head) in turn, ranks them by damage, and colors the graph with it.
- **Save as plan → Slim:** writes the smaller GGUF and an Ollama Modelfile.
The same works from the command line:
```
neurondump graph llama3.2:1b --expand layer.7.attn # inside a layer's attention
neurondump node llama3.2:1b layer.7.attn.head.3 # inspect one head
neurondump ablate llama3.2:1b --cut layer.7 --static # direct impact
neurondump ablate llama3.2:1b --cut layer.7 --prompt "The capital of Italy is" # simulated impact
neurondump sweep llama3.2:1b --corpus texts.txt --save-plan plan.json --top 2
neurondump slim llama3.2:1b --plan plan.json --out llama-14.gguf
```
[Graph page: section level, grouped by layer](https://github.com/aymen94/NeuronDump/blob/main/docs/images/model_graph2.png)
Details: [Graph and ablation](https://github.com/aymen94/NeuronDump/blob/main/docs/graph-and-ablation.md).
## Documentation
| Page | What it covers |
| --- | --- |
| [Install and run](https://github.com/aymen94/NeuronDump/blob/main/docs/install.md) | Windows and Linux, step by step |
| [Getting started](https://github.com/aymen94/NeuronDump/blob/main/docs/getting-started.md) | find your models, first commands |
| [How it works](https://github.com/aymen94/NeuronDump/blob/main/docs/internals.md) | what NeuronDump reads, and how |
| [CLI reference](https://github.com/aymen94/NeuronDump/blob/main/docs/cli.md) | every command and flag, and the REPL |
| [Web interface](https://github.com/aymen94/NeuronDump/blob/main/docs/web.md) | the browser UI and the HTTP API |
| [Analyze and slim](https://github.com/aymen94/NeuronDump/blob/main/docs/analyze-and-slim.md) | making models smaller, safely |
| [Trace](https://github.com/aymen94/NeuronDump/blob/main/docs/trace.md) | running a model and looking at each layer |
| [Graph and ablation](https://github.com/aymen94/NeuronDump/blob/main/docs/graph-and-ablation.md) | the 3D / 2D graph: look inside layers, inspect, search, cut, direct and simulated impact |
| [What's inside real models](https://github.com/aymen94/NeuronDump/blob/main/docs/models.md) | Qwen3 8B vs DeepSeek-R1, and Qwen 3.8 |
| [Building](https://github.com/aymen94/NeuronDump/blob/main/docs/building.md) | build options and Windows notes |
| [Manual test plan](https://github.com/aymen94/NeuronDump/blob/main/TEST.md) | step-by-step checks |
A short illustrated explanation is on the [website](https://aymen94.github.io/NeuronDump/)
(source: [`docs/index.html`](https://github.com/aymen94/NeuronDump/blob/main/docs/index.html)).
## Status
Early version, tested on Windows with Ollama models. Known gaps are listed at the end of
[TEST.md](https://github.com/aymen94/NeuronDump/blob/main/TEST.md). Bug reports and ideas: [issues](https://github.com/aymen94/NeuronDump/issues).
## License
Licensed under the [MIT License](https://github.com/aymen94/NeuronDump/blob/main/LICENSE).