wetron.app - Browser-native inspector for neural network models and GGUF LLM files. Open a model file and explore its computation graph, metadata, tensor shapes, and weight statistics - fully in the browser, no upload, no server, no telemetry.
Existing model inspection tools either run as native desktop apps (Netron) or push files through hosted services. Neither is acceptable when the model itself is the sensitive artefact - proprietary weights, medical models, audited systems under the EU AI Act, or research code that can't leave a network.
Wetron is a model inspector that runs entirely client-side as an embeddable library. That makes it useful for:
- AI auditability - regulators, journalists, and civic-tech reviewers can inspect third-party models without exposing them to a SaaS.
- Privacy-sensitive ML - medical, defence, and on-device models can be inspected without leaving the host machine.
- FOSS infrastructure - the
@wetron/*packages are designed to be embedded by other open-source projects (model registries, dataset cards, scientific notebooks).
Parsing uses browser APIs such as ArrayBuffer, DataView, TextDecoder, and DecompressionStream, together with format libraries including protobufjs, flatbuffers, fflate, and h5wasm. Weight bytes are decoded lazily on demand for the property panel; they're never uploaded or persisted.
| Package | Description |
|---|---|
@wetron/core |
IR types, format detection, dtype utilities, Dagre layout |
@wetron/onnx |
ONNX parser (protobufjs) |
@wetron/tflite |
TFLite parser (flatbuffers) |
@wetron/keras |
Keras .keras archive parser |
@wetron/gguf |
GGUF metadata, quantized tensor, and weight parser |
@wetron/torchscript |
TorchScript Mobile and ZIP-based .pt parser |
@wetron/executorch |
ExecuTorch .pte parser (flatbuffers) |
@wetron/savedmodel |
TF SavedModel .pb parser + TF2 checkpoint loader |
@wetron/react |
React graph view and property panel |
@wetron/svelte |
Svelte graph view and property panel |
@wetron/tokens |
Theme constants (colors, CSS vars) - no dependencies |
@wetron/tokens is intentionally standalone: zero runtime or peer dependencies, usable without any other wetron package.
Keeping tokens in sync with core:
OpCategoryis defined in both@wetron/coreand@wetron/tokens. If you add a new category, update both - then updateCATEGORY_THEMEintokens/src/index.ts.pnpm exec vitest run packages/tokensenforces this at runtime.
# parse + render with React
pnpm add @wetron/react
# parse only (no UI)
pnpm add @wetron/core@wetron/react depends on @wetron/core, and @wetron/core depends on all parser packages.
Peer dependencies for @wetron/react: react >=18, @xyflow/react >=12, @phosphor-icons/react >=2, @base-ui/react >=1.
import { parseModel } from "@wetron/core";
const bytes = new Uint8Array(await file.arrayBuffer());
const graph = await parseModel(bytes, file.name); // auto-detects format from magic bytesimport { ModelGraphView } from "@wetron/react";
import "@wetron/react/styles.css";
<ModelGraphView graph={graph} colorMode="system" />;See the docs for the full API reference, Svelte examples, and theming tokens.
Select an initializer tensor and the property panel decodes its bytes on demand, then offers the views that fit the tensor: matrix, distribution, per-axis profile, sparsity, kernel gallery, quantization (GGUF Q4_0), diagnostics, and raw values.
matrix |
kernel gallery |
diagnostics |
git clone https://github.com/sultaniman/wetron
cd wetron
pnpm installpnpm run build # all packages (common/core libs -> parsers -> core index -> React/tokens + Svelte validation)pnpm exec vitest run # all packages
pnpm exec vitest run packages/core # one packagecd apps/demo && pnpm dev # React
cd apps/demo-svelte && pnpm dev # Sveltecd docs && pnpm run setup && pnpm run dev # Hugo site at localhost:1313The docs site is not a workspace package and needs a flat node_modules for Hugo's module mounts and Sass import paths, so install it with pnpm run setup (pnpm install --ignore-workspace) rather than a plain pnpm install.
- Guide - installation, quick start, architecture
- API Reference - parseModel, detectFormat, IR types
- Formats - ONNX, TFLite, Keras, GGUF, TorchScript, ExecuTorch
- Rendering - React, Svelte, theming tokens
- Contributing - adding a new parser
- Changelog - release notes per version
- Browser-only. All I/O uses
file.arrayBuffer(),fetch,TextDecoder,DataView. - Weight bytes are exposed via
WeightSourceand decoded lazily on demand - never uploaded, never persisted. - No patching of
DataView.prototypeorBigInt.prototype. detectFormatalways returns aFormatstring, never throws.
Netron by Lutz Roeder is used as a reference for schema field layouts and node-count parity across supported formats. The parsers and rendering layers in wetron are independent implementations.