ml-debug

Diagnoses ML/AI failures like OOM errors and NaN values using official documentation and framework-specific knowledge bases.

192|18|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/Leeroo-AI/superml --skill ml-debug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ml-debug
Source: https://github.com/Leeroo-AI/superml/tree/main/skills/ml-debug
Command: npx skills add https://github.com/Leeroo-AI/superml --skill ml-debug

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill systematically diagnoses and resolves failures in ML/AI workflows, such as Out-of-Memory (OOM) errors, NaN values, divergence, crashes, poor throughput, incorrect outputs, and dependency conflicts, by leveraging framework-specific knowledge and grounding in documentation.

Core Features & Use Cases

  • Root Cause Analysis: Identifies the underlying cause of ML failures through systematic diagnosis.
  • Framework-Specific Debugging: Utilizes knowledge bases and web fetching to provide accurate, context-aware solutions for various ML frameworks (PyTorch, DeepSpeed, vLLM, Hugging Face Transformers, etc.).
  • Guided Fixes: Provides step-by-step instructions, including specific configuration changes, code patches, and verification scripts, to resolve identified issues.
  • Prevention Strategies: Offers actionable advice and runnable guardrails to prevent similar issues in the future.
  • Use Case: When a distributed training job fails with an OOM error on a specific GPU, this Skill can pinpoint whether it's due to activation memory, optimizer states, or KV cache, and provide a precise configuration adjustment to fix it.

Quick Start

Use the ml-debug skill to diagnose and fix an OOM error encountered during LLM fine-tuning.

Frequently Asked Questions about ml-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Out-of-Memory errors during LLM fine-tuning?

To fix Out-of-Memory errors during LLM fine-tuning, you must diagnose whether the memory bottleneck stems from activation memory, optimizer states, or KV cache, and apply precise framework configuration adjustments to resolve the issue.

Why does my machine learning model output NaN values and how do I resolve it?

Machine learning models output NaN values due to numerical instability or divergence; resolving NaN values requires systematic symptom and log analysis to identify the root cause and apply verifiable code patches.

Does this ML debugging approach provide framework-specific solutions for PyTorch and DeepSpeed?

Yes, this ML debugging approach provides framework-specific solutions for PyTorch, DeepSpeed, vLLM, and Hugging Face Transformers by grounding diagnoses in official documentation and knowledge bases to ensure accurate fixes.

What is the best way to diagnose performance bottlenecks and poor throughput in AI workflows?

The best way to diagnose performance bottlenecks and poor throughput in AI workflows is through systematic analysis of symptoms and logs, which isolates the underlying cause and provides actionable fixes with preventative guardrails.

Can I get step-by-step configuration changes to prevent ML training crashes?

Yes, you can get step-by-step configuration changes to prevent ML training crashes, as the diagnostic process provides guided fixes including specific code patches, verification scripts, and actionable prevention strategies.