Expand description
NeuronDump core: the only place analysis logic lives. Front ends (CLI, web) call this API and render its serializable results.
The native feature (default) adds everything that needs a filesystem, threads or the
trace runtime: the app / job system, config, analysis, slimming, edits, ablation and diff.
Without it the static inspection part (GGUF metadata, tensors, architecture, vocabulary,
chat template, graph, weight statistics) builds for wasm32-unknown-unknown.
Re-exports§
pub use analyze::AnalyzeOptions;pub use analyze::Candidate;pub use analyze::CandidateKind;pub use analyze::PrunePlan;pub use analyze::Risk;pub use app::App;pub use config::Config;pub use config::UiMode;pub use discovery::DiscoveryOptions;pub use discovery::Library;pub use discovery::ModelEntry;pub use discovery::ModelSummary;pub use discovery::SourceKind;pub use inspect::InspectOptions;pub use inspect::InspectReport;pub use jobs::JobInfo;pub use jobs::JobKind;pub use jobs::JobManager;pub use jobs::JobStatus;pub use model::ModelHandle;pub use slim::SlimOptions;pub use slim::SlimReport;pub use stats::StatsOptions;pub use stats::StatsReport;pub use trace::TraceReport;pub use trace::TraceRequest;pub use util::NoProgress;pub use util::Progress;pub use neurondump_gguf as gguf;
Modules§
- ablate
- “What happens if I cut this?”: static impact of removing or zeroing graph nodes, the
matching in-memory
Ablationfor simulation, sweeps, and conversion to aPrunePlan. - analyze
analyze: find removable or compressible parts and produce aPrunePlan.- api
- JSON responses of the read-only inspection endpoints, shared by the HTTP server and the in-browser (wasm) demo so both front ends see exactly the same shapes.
- app
- The facade both front ends talk to: library, opened-model cache, result cache, jobs.
- arch
- Architecture-agnostic structure inference from metadata and tensor names.
- chat
- Chat prompt rendering: a small evaluator for the subset of Go
text/templatethat Ollama templates use (if/else if/range/with, variables,eq/ne/and/or/not/len/slice/index, trim markers), plus built-in templates for the common families when a model has no Ollama template (raw GGUF files only carry Jinja). - compare
- Side-by-side comparison of several models.
- config
- User configuration (
~/.config/neurondump/config.toml,%APPDATA%\neurondump\config.toml). - diff
- Weight and metadata diff of two models. Tensors are matched by name and dequantized in bounded row chunks from both files at once, so any pair of types (Q4_K vs Q8_0 vs F16) compares without materializing either model. Results aggregate onto model A’s graph (sections, layers, blocks, experts) so the web UI can color it like a sweep.
- discovery
- Finding local GGUF models: Ollama stores, llama.cpp / Hugging Face / LM Studio / Jan
caches and user-configured directories (
--dir,scan_dirs,NEURONDUMP_MODEL_DIRS). - edits
- Live edits: an in-memory overlay on top of a model. The original GGUF is never
modified. An edit stack holds the edits (each can be toggled), with undo / redo /
restore and named snapshots;
compileturns the enabled edits into anInterventionfor the forward pass, andbakewrites them into a new GGUF. - export
- JSON / NDJSON / CSV renderings shared by the CLI
exportand the web download. - graph
- Structural graph of a model: Model → Sections → Layers → Blocks → Tensors → (lazy) heads / neuron buckets / experts, plus dataflow, tied and uses edges.
- inspect
inspect: everything inside a model file, as one serializable report.- jobs
- Long-running operations as jobs: status, progress, cancellation, on-disk results.
- model
- An opened model: weights GGUF plus Ollama side layers.
- search
- One query across models, and (for one model) tokens, tensors and metadata keys.
- slim
slim: apply (a subset of) aPrunePlanand write a new, validated GGUF.- stats
- Streaming weight statistics. Each tensor is dequantized in bounded row chunks (at most ~1M floats per thread) and reduced in two passes.
- template
- Chat templates as decision trees: Jinja (
tokenizer.chat_template*) and Ollama’s Gotext/templatelayer. Not an evaluator — a structural parser that extracts the branches, the variables they read and the special tokens they emit. - tokenizer
- Vocabulary extraction: readable token text, classification, special tokens, search.
- tokens
- Token inspector, static part (no inference): tokenization with the chat template, per-token embedding row statistics and nearest neighbours, and the 3D embedding map (token_embd rows projected with PCA).
- trace
- Runtime tracing types and the pluggable backend. The candle-based implementation
lives in
neurondump-traceand is registered by the binary when built with thetracefeature, so core stays free of inference dependencies. - util
- Small shared helpers.