Teachable Machine, re-imagined as a terminal TUI on modern foundation models. Wire a dataset into a CLIP or DINOv2 backbone, train a classifier head, and export it — without leaving the shell. Auto-detects CUDA · MPS · MLX · ROCm · DirectML · XPU · CPU.
One line. Installs uv if needed, then installs WireML as an isolated global tool.
curl -fsSL https://raw.githubusercontent.com/tejasnaladala/wireml/main/install.sh | shOr, if you already have uv:
uv tool install git+https://github.com/tejasnaladala/wiremlTo pull the ML extras (CLIP / DINOv2 / Torch / Transformers):
WIREML_EXTRAS=ml curl -fsSL https://raw.githubusercontent.com/tejasnaladala/wireml/main/install.sh | sh
# or
uv tool install "git+https://github.com/tejasnaladala/wireml" --with "wireml[ml]"wireml # launch the TUI
wireml device # show the detected compute device
wireml templates # list built-in templates
wireml run demo-synthetic # headless run, no downloads needed
wireml run export-onnx # train a head and write wireml-model.onnx (wireml[deploy])demo-synthetic finishes in well under a second on CPU and trains a linear head to ~1.0 accuracy on three well-separated synthetic classes — enough to confirm the engine, the device detection, and the TUI all work before you download a 335 MB CLIP checkpoint.
A dark, tight, single-binary-feel terminal workbench:
┌─ WireML · node-graph ML on foundation models — terminal edition ──────────────┐
│ │
│ ┌ TEMPLATES ─────────────────┐ ┌ DEVICE ────────────────────┐ │
│ │ ▸ Synthetic demo │ │ CUDA RTX 4090 │ │
│ │ Image classifier │ │ 24.0 GB VRAM │ │
│ │ k-NN (no training) │ │ sm_89 │ │
│ └────────────────────────────┘ │ │ │
│ │ SHORTCUTS │ │
│ │ ↑↓ move selection │ │
│ │ Enter open template │ │
│ │ r run synthetic demo │ │
│ │ q quit │ │
│ └─────────────────────────────┘ │
│ │
└─ wireml 0.2.0 ───────────────────────────────────────────────────────────────┘
Every template opens a pipeline view with a run log and a results table.
WireML is a linear-pipeline executor on top of a small node catalog. Templates are pre-wired pipelines of stages; each stage delegates to a Python runner:
data.synthetic → backbone.identity → head.linear → eval.accuracy
The engine walks stages in order, routes outputs by port name, and reports progress via a callback the TUI renders live.
Node catalog (v1):
| Category | Nodes |
|---|---|
| Data | data.synthetic · data.upload |
| Backbone | backbone.clip.vit-b-32 · backbone.clip.vit-l-14 · backbone.dinov2.small · backbone.identity |
| Head | head.linear · head.knn |
| Eval | eval.accuracy · eval.confusion |
| Deploy | deploy.export-onnx |
wireml[ml] adds the CLIP / DINOv2 backbones via PyTorch + Transformers. wireml[deploy] adds ONNX export. The synthetic and k-NN templates run with neither.
deploy.export-onnx only handles the linear head — it lowers to a single Gemm, embeds the class names as graph metadata, and runs onnx.checker before writing. k-NN carries its training set at inference time, so it has no fixed-weight graph and is rejected with a clear error rather than a broken file.
wireml device reports the best backend the current machine exposes. Detection priority:
- CUDA (NVIDIA)
- MLX (Apple Silicon) — fastest path on M-series Macs (
wireml[mlx]) - MPS (Apple Silicon fallback) — PyTorch native Metal
- ROCm (AMD) — auto-detected when torch has
version.hipset - DirectML (Windows) — via
onnxruntime-directml(wireml[directml]) - XPU (Intel) — via
torch.xpu - CPU (always available)
git clone https://github.com/tejasnaladala/wireml
cd wireml
uv sync --extra dev
uv run pytest # tests (no model downloads)
uv run ruff check wireml tests
uv run wireml # launch TUI against your checkoutwireml/
├── wireml/ the Python package
│ ├── cli.py typer entry (launches TUI by default)
│ ├── device.py CUDA / MPS / MLX / ROCm / DirectML autodetect
│ ├── engine.py linear pipeline executor + runner registry
│ ├── registry.py NodeSchema catalog
│ ├── templates.py canonical pre-wired pipelines
│ ├── schema.py data types (DeviceInfo, NodeSchema, Pipeline…)
│ ├── nodes/ runner implementations (data, backbones, heads, eval, deploy)
│ └── tui/ Textual app, screens, and theme
├── tests/ pytest suite (no model downloads in CI)
├── install.sh one-line installer
├── pyproject.toml hatchling package
└── README.md
MIT — see LICENSE.