What it does
TrainTools provides small diagnostic tools that answer practical questions during a training run. They cover whether batch size wastes compute (Gradient Noise Scale), whether a network is losing its ability to learn (PlasticityProbe), whether to stop training (TrainGuard), and whether gradients or batches are unhealthy. Example trackers flag forgotten, ambiguous or likely mislabeled examples. The methods follow published papers, which the documentation cites.
Use it while a run is in progress, when a loss curve or batch looks wrong and a specific signal is needed. An optional local, read-only MCP server lets AI coding assistants pick the diagnostic that fits a problem and insert the smallest snippet into an existing loop.
Running it means adding the diagnostic objects to a PyTorch or Hugging Face training loop. GradientHealthMonitor is called after backward() and before optimizer.step(). The example trackers need stable dataset ids, logits and labels from a normal classification run. Diagnostic results can be written to versioned JSON.
Limitations and requirements
The project is alpha software. Thresholds are heuristics and should be read as training signals, not automatic truth. The MCP server runs locally and is read-only.
Safety
Our team has not reviewed this resource. Only automated rules checked it; resources with high-risk signals are not published. These are signals, not a guarantee that installing it is safe. Try it in a sandbox project first.
- Runs code or changes an assistant's behaviour
Sources
- Official MCP Registry first seen 13 Nov 2026 · last seen 13 Nov 2026 · its page on the source
TrainTools
Recommend paper-backed diagnostics for PyTorch and Hugging Face training problems.
v0.6.2As shown on registry.modelcontextprotocol.io when we last read it