enkez/tgsopd/perf-doctor
Claude Code and agent skill by enkez/tgsopd
- community
Checking that the SKILL.md file is still in the repository.
Diagnose Relax training launch scripts for misconfigured flags that hurt performance (time/MFU) or waste GPU memory (cards needed). Use when user asks to review/audit/check a training script, mentions "perf doctor", suspects a config is slow or OOM-prone, or wants a sanity check before launching. Produces a two-section markdown report (Performance + Memory) with cited flags, severity, and concrete fixes.
Install
npx vskill@latest install enkez/tgsopd/perf-doctorSKILL.md
perf-doctor
诊断 Relax 训练启动脚本(scripts/training/**/*.sh),找出影响 执行性能(耗时 / MFU) 或 显存占用(所需卡量) 的不合理配置。
使用方式
参数:单个启动脚本绝对或相对路径。
执行步骤
- 读取脚本 — 收集
*_ARGS=( ... )数组与ray job submit ... train行里的所有--flag value。同时 followsource ${MODEL_CONFIG_DIR}/...拿模型架构(dense / MoE、是否 multimodal)。 - 抽取 context —
- 文件名解析:
run-<model>-<size>-<NxgpuY>(-async|-image|-video)?.sh→ 总 GPU 数、节点数、模式、模态 - flag 解析:TP/PP/CP/EP/ETP、
--colocatevs--fully-async、--rollout-max-response-len、--max-tokens-per-gpu、--resource、--num-iters-per-train-update、--max-staleness、--num-data-storage-units - 默认 GPU 假设:H20 96GB,除非用户在 prompt 里给出别的(A100 80G / H100 80G 等)
- 加载规则 — 读
references/rules.md,逐条判断 applies / borderline / not-applicable - 输出报告 — 严格按下方 输出模板 渲染
触发判断原则
- 不要机械触发:CPU offload 三件套在 35B-A3B 4×H20 这种边界 case 是必需的;规则
Skip when节里写了什么时候它就是对的,要尊重 - 不要 false positive:脚本里如果有
# NOTE(...)注释解释为什么开 / 关某个 flag,把它当作有效理由,降级到 info 或跳过 - 借助推理而非穷举:
references/rules.md是知识库不是判定表 — 模型大小 × dtype 估算显存预算、TP×CP×PP 是否合理、async 资源比是否平衡,都要 case-by-case 算
输出模板
严禁
- ❌ 不要 修改脚本。只诊断,给文字建议
- ❌ 不要执行训练 / dry-run / benchmark
- ❌ 不要分析日志(那是
debug-hang的事) - ❌ 不要建议不在
references/rules.md里、且自己不能给出 Relax-specific 依据的"通用 ML 优化技巧"
Rule catalog
完整规则在 references/rules.md。每条规则字段:Category / Severity / Trigger / Why / Fix / Skip when。新规则直接往该文件追加即可,无需改 SKILL.md。
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/perf-doctor/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/enkez/tgsopd/perf-doctor)