Stack Doctor
Stack Doctor is an RL environment (OpenEnv) that trains LLMs to diagnose GPU inference stack failures.
Core trick
Multi-component reward (JSON validity, investigation, failure-family credit) trains GRPO to query logs before diagnosing.
Description
Stack Doctor is an RL environment (OpenEnv) that trains LLMs to diagnose GPU inference stack failures. 73 scenarios across vLLM, SGLang, FlashInfer, and TensorRT-LLM on NVIDIA H100/B200/SM121 and AMD MI300X/MI355X.
The agent gets an incident ticket, logs, and opinions from 4 specialist sub-agents — at least one deliberately lies per incident. The model must investigate (inspect logs, query specialists, apply fixes) and submit a justified diagnosis.
Six reward functions shape behavior: valid JSON, environment interaction, investigation quality (penalizes blind guessing), partial credit for correct failure family, justification quality, and efficiency. Trained Qwen2.5-1.5B with GRPO via Unsloth + TRL on H100. The 9B base scored +19.5 (near-oracle) with zero training, proving environment quality. The 1.5B starts at -4.9 and learns to investigate before diagnosing.
README excerpt
--- title: Stack Doctor Environment Server emoji: 🩺 colorFrom: red colorTo: blue sdk: docker pinned: false app_port: 8000 base_path: /web tags: - openenv --- # Stack Doctor An OpenEnv RL environment where an overseer LLM diagnoses sick inference stacks. The agent probes subsystems, reconciles conflicting specialist-agent reports (some of which are wrong), and selects the minimal correct fix — all within a 6-step budget. Inspired by real SM12x enablement bugs across vLLM, FlashInfer, SGLang, CUTLASS, and Flash-Attention. **Track**: Statement 1 — Multi-Agent Interactions **Sub-theme**: Fleet AI — Scalable Oversight ($10K) **Live Environment**: https://bledden-stack-doctor.hf.space **GitHub**: https://github.com/bledden/stack-doctor ## What Makes This Different 1. **Conflicting specialists** — 4 specialist agents provide opinions per incident, but at least one is always wrong. The agent must reconcile conflicting reports rather than blindly trusting any single source. 2. **MCP tool interface** — Agents discover investigation tools (`read_log()`, `check_config()`, `query_specialist()`, etc.) via the Model Context Protocol. Same environment supports both MCP agent interaction and WebSocket RL training. 3. **Justification-rewarded decisions** — The agent must explain its diagnosis, not just submit an answer. A justification bonus rewards explainable decision-making. 4. **35 realistic scenarios** — Based on real GPU enablement bugs (SM121/SM120, MI355X, B200) across product