Open-source developer tools

Making neural networks and C++ less opaque.

I'm Kristjan Kongas. I build tools that show what software is really doing: a PyTorch debugger you can pause a training run with, a C++ library that turns a function signature into a command line interface, and experiments where physics meets reinforcement learning.

4 projects below, written in Python, C++ and a little WebAssembly — 460+ GitHub stars between them.

Projects

All open source — the code lives on GitHub.

NaNsense

An interactive PyTorch debugger that looks deep inside your neural net, with just a few lines of code.

PythonPyTorchMCPMIT

  • Pause a run, step batch by batch, and time-travel to another epoch while training continues.
  • Click through layers to see activations, gradients, weights, optimizer state and per-channel statistics.
  • Spot dying channels, insufficient receptive fields, padding artifacts and fp16 gradient underflow.
  • Speaks MCP, so a coding agent can inspect the network alongside you.
The NaNsense UI: click layers to see activations and gradients, measure receptive fields, collect per-channel statistics, and run deep dream mid-training.

fire-hpp

A single-header C++ library that builds a command line interface straight from a function signature.

C++11 and upHeader-onlyBoost licence

  • Declare arguments as parameter defaults; parsing, conversion and error checking happen before your code runs.
  • --help, type checking and usage errors come for free — no parser object, no boilerplate.
  • Flags, named and positional parameters, variadics, optionals, defaults and constraints.
  • Builds on Linux, Windows and macOS, tested against C++11 through C++23.
#include <iostream>
#include <fire-hpp/fire.hpp>

int fired_main(int x = fire::arg("-x"),
               int y = fire::arg("-y")) {
    std::cout << x + y << std::endl;
    return 0;
}

FIRE(fired_main)
# the whole program — no parse(), no argument map
$ ./add -x=1 -y=2
3

stable-entropy

An experimental, thermodynamics-inspired regularizer for reinforcement learning.

PythonReinforcement learningGymnasiumApache-2.0

  • Reward plays the role of negative energy, so high-reward action sequences settle into high total probability — a Boltzmann distribution over trajectories.
  • Policy annealing implementation with CartPole and Lunar Lander experiments, plus tooling to plot and compare runs.
  • Closely related to Path Consistency Learning and MaxEnt RL, arrived at from the physics side.
Agents trained with policy annealing bringing the lunar lander to a safe stop.

Phase Transition

A 2D particle simulator compiled to WebAssembly, where solid, liquid and gas-like states emerge from the physics — in your browser.

C++WebAssemblySimulationMIT

  • Create, spray, push and heat particles with the mouse, and watch the system condense or boil.
  • Live readout of particle count, average velocity and temperature inside the range of influence.
  • The native build has been watched 70k+ times on YouTube.
Spraying particles into the simulation box.