Residual / Pulse
Dashboard ↗
residual ml · pulse

Debug ML while it trains.

Pulse watches a run while it trains, computes the relevant quantities directly, and when something breaks, finds the cause, applies a minimal patch, and verifies it.

loss stuck at 0.5 ∇ ≈ 2.4e-5 loss step − 0.5 · line 12 1:1 φ 0 fig. I — a run, observed
Residual ML
Watch Demo ↓
$ pip install pulseml
Drag across the page to sketch with ink
pulse — train.py
OpenRouter · DeepSeek V4 Flash
❯ why did the loss stop moving?
The loss is flat at 0.5 because of the + 0.5 on line 12.
demo · watch pulse in action

See it catch a failure live.

residual_pulse_demo.mp4
MUTED
benchmark · 11 injected faults

Measured on eleven injected faults.

cases fixed
11 / 11
Claude Code: 9 / 11
mean time
1.3 min
Claude Code: 3.9 min
cost / task
$0.19
Claude Code Opus: $0.39
run overhead
0 s
Stream mode, 20k steps
Pulse (DeepSeek v4.1) vs. Claude Code (Opus) Residual internal benchmark
Pulse
1.3 min
Claude Code
3.9 min
architecture

Separating computation from conjecture.

Dashboards plot what you chose to log; general agents see what you paste. Pulse attaches to the running process with no changes to your training code.

i · observe
CPU-first live tracking

Watches tensors, gradients, activations, loss, and metrics in a separate stream process. GPU data stays untouched unless you opt in with /gputrack.

ii · diagnose
Computed, not estimated

Deterministic checks compute gradient/update ratios and NaN/Inf status directly, then hand verified numbers to the agent alongside your source code.

iii · intervene
Minimal patch + /undo

Proposes the smallest diff first, checks it through you or an approver model, verifies recovery, and keeps every change one /undo away.

team · residual ml

Built by engineers who broke runs at 3 AM.

We met in the 1517 Discord, where a challenge turned into a collaboration.

ceo · co-founder
Yash Patel

Built a 380M-parameter language model from scratch—and turned the pain of debugging silent training failures into Pulse.

cto · co-founder
Paul Guillemette

Building a custom architecture that reduces VRAM consumption by 600x.

getting started · track → diagnose → verify → patch

Debug ML while it's training.

Pulse catches the bug while the run is still training: about 1.3 minutes to a fix and $0.19 per task in our benchmark. Built for terminals, SSH, containers, Colab, remote servers and cloud GPUs. Requires Python 3.9+, a supported backend, and OpenRouter sign-in (free models available) or your own API key.

○install ○start pulse ○ask the agent
your os:

What are you trying to do?

getting started · try it

Simulated terminal

Click a command or type one below to tick off the getting-started checklist.

zsh — sandbox
interactive
$ _
$
getting started · the pulse app

What Pulse looks like in your terminal

The run on the left, the agent on the right. Click any thought, tool line, or edit to inspect it.

PULSE · / DEBUG train.py
OpenRouter · DeepSeek V4 Flash
train.py ● live ~/experiments step 4,124 · 19.8/s · 3m 28s loss 0.5002 █▅▃▂▁▁▁▁ grad_norm 2.4e-5 █▆▄▂▁▁▁▁ Findings 2 ▲ loss stopped improving Tensors X 256x8 float32
❯ why did the loss stop moving?
The loss is flat at 0.5 because of the + 0.5 on line 12.
launching

Start Pulse

One command handles setup, running scripts, watching runs, and the agent.

pulse
Opens the Pulse app. Setup comes first (account, workspace, agent model, key), then type what you want built, fixed, or explained.
/run train.py
Inside Pulse: starts a script under Pulse and opens it immediately.
/monitor
Inside Pulse: lists every run on this machine (live first, then finished, then external Python processes) and attaches to the one you pick.
backends

Supported backends


core concepts

How Pulse works

Pulse separates AI reasoning from exact numerical calculation—computing ratios and norms directly instead of asking a model to guess. Click any stage.

detection & auditing

What Pulse watches automatically

Findings (deduplicated & thresholded)
Each finding carries a check id, variable, severity, exact numbers, and confidence. Deduplicated on (check, variable) so "spiked to 4.12" and "4.13" aren't two alerts. Checks require two consecutive evaluations except NaN/Inf, which fire immediately.
Adaptive agent scheduling
After each turn, the brain schedules its next look: minutes if a fix just landed or a metric is drifting, or an hour if the run is smoothly descending. NaN or critical findings pull the next look forward immediately.
The audit pass
Receives the full run downsampled into min/mean/max buckets (preserving 2-step spikes), current findings, tensors, past fixes, and dropped sample counts to catch subtle issues like slow loss or disagreeing metrics.
ML lint (mllint)
Deterministic static checks for incompatible loss/metric pairs, redundant activations, backward() without optimizer steps, train/eval mode mistakes, and suspicious learning rates.
benchmark

Measured on 11 injected ML faults

Pulse runs on DeepSeek v4.1; Claude Code on Opus. Mean over fixed cases: Pulse 1.3 min (11/11) vs Claude Code 3.9 min (9/11).

How the benchmark changed Pulse
Expanded mllint checks · minimal-fix-first behaviour · whitespace-tolerant patch matching · retry-on-mismatch patching · stronger verification of correctness and patch scope · more agentic debugging workflows.
tracking · cpu-first

Variable & GPU tracking


shapedtypedevicestatisticsNaN / Infhistory

GPU tracking (opt-in)

If nobody asks Pulse to touch the GPU, Pulse doesn't touch the GPU.

gpu_tracking
opt-in

        
cli reference

Command explorer


ai agents & auto-fix

Choose your agent & approver


Auto-fix & approver

01 Problem detected02 Pause03 Agent investigates04 Proposed diff05 Approver y/N06 Apply07 /undo
Who approves commands? (auto mode)
Risky shell commands (deleting files, rewriting git state, reaching outside the project, overwriting files) and proposed diffs are reviewed by an approver model by default. Set "approver": "off" in pulse_config.json to answer yourself, or "approver": "<model>" to pick another model.
What the approver sees & decides
Only the command or diff, why it was flagged, the project folder, and the current task—never the agent's reasoning. It is instructed to deny destructive actions, external files, credentials, or sudo. Every applied edit stays one /undo away.
cloud workspaces & offline

Workspaces, sync & offline mode

Pulse works without Pulse Cloud. Choose the scope that fits: the environment variable and config file apply while set; pulse config cloud off is remembered on this machine; CLI and Python flags turn cloud off for a single start.

PULSE_OFFLINE=1 # env var for current session {"offline": true} # or set "cloud": false in pulse_config.json pulse config cloud off # remembered on this machine /config cloud off # inside the Pulse app pulse --offline … # one start pulse run --offline train.py # one start offline # Or in Python before auto_track(): import pulse; pulse.disable_cloud(); pulse.auto_track()
CapabilityCloud-connectedOffline
Training monitoring & numerical detectionYesYes
Local agent debuggingYesYes
Cloud dashboard & workspace syncYesNo

What gets synced?

Dashboard

Workspaces can be named and managed from the CLI; members can leave, and admins can delete one. A run opened in the app (via /run, /monitor, or attached) gets its own session with metric snapshots, findings and crashes as incidents, agent turns, and uptime synced in the background. Runs count as live if they had activity in the last 5 minutes. Secret projects appear only to workspace admins and members who joined with the project's join code.

PULSE_TELEMETRY=off
advanced · stream mode

Two processes: Monitor & Brain

For most cases, just use pulse. Stream mode is for when you want a run to keep going with nobody attached. Measured on a 20k-step loop, single-process PulseCLI.update() held the training thread for 84% of the wall clock, almost all of it two blocking model calls.

training process
pulse_monitor.Monitor

Samples local variables a few times per second and writes append-only frames. Lossy under backpressure so the loop never stalls.

brain process
pulse_brain.Brain

Runs history, detection, audits, and the agent separately. Can attach late, crash, or restart without interrupting training.

pulse run --stream train.py python -m pulse.brain # newest session python -m pulse.brain <session-dir> --model openrouter/deepseek/deepseek-v4.1-flash python -m pulse.brain <session-dir> --once # one pass over a finished run

Measured overhead (20k-step loop)

What the training process pays
Nothing is installed into the loop: no sys.settrace, no callback into user code. A background thread samples local variables and holds no references, so tracking a tensor never keeps it alive.
Why the stream is lossy on purpose
Under backpressure, the oldest frame is dropped and the loss is recorded so the brain knows its view has a gap rather than slowing down training.
advanced · keras

Keras

Keras metrics live in the callback logs dict, not in local variables, so the stream monitor can't see them by sampling. Streaming needs one line of setup, documented in docs/streaming-keras.md. In-process modes (cli, ui) patch Model.fit and need nothing.

reference

Troubleshooting

pulse not found
Add Python's scripts folder to your PATH, or run python3 -m pulse directly.
The app doesn't open
Pulse falls back to line-by-line mode in pipes, CI, or very small terminals. On Windows, use Windows Terminal (Windows 10+).
Keys and secrets
Never commit API keys in source code. A pasted key is never written to disk; OpenRouter tokens live in ~/.pulse/openrouter.json.
Was this page helpful?
download · wheels

Get the build for your machine.

Pick your OS, CPU, and Python version—or paste pip debug --verbose for an exact match.

01 · system
02 · cpu
03 · python