NeuronDump öffnet lokale LLMs und macht sie kleiner
Das Tool NeuronDump zerlegt GGUF-Dateien von Ollama oder llama.cpp und zeigt Layer, Attention Heads, Vokabular und Chat-Template. So lässt sich ermitteln, welche Modellteile sich entfernen lassen, um das Modell zu verkleinern.

Wenn man Modelle lokal mit Ollama oder llama.cpp betreibt, hat man wahrscheinlich schon einige Gigabyte GGUF heruntergeladen und sie als Black Box behandelt. Ich wollte diese Box öffnen: die Layer sehen, die Attention Heads, das Vokabular, das Chat Template, und dann eine einfache Frage stellen: welche Teile braucht dieses Modell eigentlich nicht, und was geht kaputt, wenn ich sie entferne?
Deshalb habe ich NeuronDump gebaut, eine einzelne Rust-Binärdatei (MIT) mit CLI und lokalem Web UI. Sie liest GGUF-Dateien direkt, ohne dass irgendetwas pro Modell fest einprogrammiert ist.
👉 Repository: https://github.com/aymen94/NeuronDump 👉 Dokumentation und illustrierte Einführung: https://aymen.xyz/NeuronDump/
neurondump web --open Enter fullscreen mode Exit fullscreen mode Hier ist qwen3.8:27b in der 3D-City-Ansicht. Jeder Teil ist danach eingefärbt, ob man ihn entfernen kann: sicher, riskant oder das Modell bricht.
Man kann auf jeden Block klicken, um seine Größe, Quantisierung und Wichtigkeit zu sehen, ihn in seine Kinder aufklappen oder ihn zur Schnittauswahl hinzufügen.
neurondump list # jedes lokale Modell, das es findet neurondump inspect llama3.2:1b # was in einem Modell steckt neurondump vocab llama3.2:1b --search hello neurondump template llama3.2:1b # das Chat Template als Baum Enter fullscreen mode Exit fullscreen mode Das Verschlanken ist ein zweistufiger Prozess: zuerst analysieren, dann einen Plan anwenden, den man prüfen kann.
neurondump analyze llama3.2:1b --out plan.json neurondump slim llama3.2:1b --plan plan.json --only vocab --out small.gguf Enter fullscreen mode Exit fullscreen mode Der Plan ist eine einfache JSON-Datei, die man prüfen oder bearbeiten kann, bevor irgendetwas geschrieben wird. Mit --only lässt sich einschränken, was entfernt wird (hier nur das Vokabular).
Baut man mit der Trace-Funktion, führt NeuronDump das beschnittene Modell im Speicher neben dem Original aus. Es vergleicht nächste Tokens, KL-Divergenz, generierten Text, Perplexity und den Logit Lens pro Layer.
cargo install --path crates/neurondump --features trace Enter fullscreen mode Exit fullscreen mode Einige Dinge, die es mir zeigte: DeepSeek-R1 8B ist Qwen3 8B mit jedem Gewicht leicht verändert. Es hat dieselben Neuronen an denselben Stellen, darunter ein Neuron in Layer 6, das den internen Zustand etwa 33-fach vergrößert. Entfernt man diesen Layer, erzeugen beide Modelle nur noch Rauschen.
Bei llama3.2:1b machte das Entfernen des letzten Layers das Modell bei einem Prompt selbstsicherer, obwohl, abgesehen von den ersten zwei Layern, kein Layer die Perplexity auf echtem Text stärker verschlechtert. DeepSeeks Chat Template gibt Tool-Call-Marker aus, die nicht im Vokabular enthalten sind, sodass jeder davon in 11 gewöhnliche Tokens aufgeteilt wird. Installation Vorgefertigte Windows- und Linux-Binärdateien gibt es auf der Releases-Seite: entpacken und neurondump list ausführen.
git clone https://github.com/aymen94/NeuronDump cd NeuronDump cargo install --path crates/neurondump neurondump list Enter fullscreen mode Exit fullscreen mode Ruft man neurondump ohne Argumente auf, kann man zwischen der interaktiven CLI und dem Web UI wählen.
Das Projekt ist früh, und es wurde hauptsächlich unter Windows mit Ollama-Modellen getestet.
Bekannte Lücken sind in TEST.md aufgelistet. Wer es mit einem Modell ausprobiert, das ich nicht getestet habe, dem bin ich für einen Bericht dankbar: https://github.com/aymen94/NeuronDump/issues
Automatisch übersetzt. Das Original auf Englisch ist unten aufklappbar.
Original (Englisch) anzeigen
If you run models locally with Ollama or llama.cpp, you've probably downloaded a few gigabytes of GGUF and treated it as a black box. I wanted to open that box: see the layers, the attention heads, the vocabulary, the chat template, and then ask a simple question: which parts does this model not actually need, and what breaks if I remove them?
So I built NeuronDump, a single Rust binary (MIT) with a CLI and a local web UI. It reads GGUF files directly, with nothing hard-coded per model.
👉 Repo: https://github.com/aymen94/NeuronDump 👉 Docs & illustrated intro: https://aymen.xyz/NeuronDump/
neurondump web --open Enter fullscreen mode Exit fullscreen mode Here's qwen3.8:27b in the 3D city view. Every part is coloured by whether you can remove it: safe, risky, or breaks the model.
Click any block to see its size, quantization and importance, expand it into its children, or add it to the cut selection.
neurondump list # every local model it can find 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 Enter fullscreen mode Exit fullscreen mode Slimming is a two-step process: analyze first, then apply a plan you can review.
neurondump analyze llama3.2:1b --out plan.json neurondump slim llama3.2:1b --plan plan.json --only vocab --out small.gguf Enter fullscreen mode Exit fullscreen mode The plan is a plain JSON file, so you can inspect or edit it before anything gets written. --only lets you restrict what gets cut (here, just the vocabulary).
Build with the trace feature and NeuronDump runs the cut model in memory next to the original. It compares next tokens, KL divergence, generated text, perplexity and the logit lens per layer.
cargo install --path crates/neurondump --features trace Enter fullscreen mode Exit fullscreen mode Some things it showed me DeepSeek-R1 8B is Qwen3 8B with every weight slightly changed. It has the same neurons in the same places, including one neuron in layer 6 that makes the internal state about 33× larger. Cut that layer and both models produce noise. On llama3.2:1b, cutting the last layer made the model more confident on one prompt, even though, apart from the first two layers, no layer hurts perplexity on real text more. DeepSeek's chat template emits tool-call markers that aren't in its vocabulary, so each one gets split into 11 ordinary tokens. Install Prebuilt Windows and Linux binaries are on the releases page: unzip and run neurondump list.
git clone https://github.com/aymen94/NeuronDump cd NeuronDump cargo install --path crates/neurondump neurondump list Enter fullscreen mode Exit fullscreen mode Run neurondump with no arguments to choose between the interactive CLI and the web UI.
It's early, and it has been tested mostly on Windows with Ollama models.
Known gaps are listed in TEST.md. If you try it on a model I haven't, I'd love to hear what you find: https://github.com/aymen94/NeuronDump/issues