screen-reader-testing
Test web applications with screen readers including VoiceOver, NVDA, and JAWS. Use when validating screen reader compatibility, debugging accessibility issues,…
Manage unified memory and thermals during long-running ML jobs on NVIDIA DGX Spark. Use when planning memory headroom for a training run on GB10, when a job OOMs on unified memory, or when monitoring temperature and power during multi-hour training.
$ npx -y skills add wshobson/agents --skill spark-memory-thermal-ops --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/spark-memory-thermal-opsContext preview
The summary Claude sees to decide when to auto-load this skill.
Manage unified memory and thermals during long-running ML jobs on NVIDIA DGX Spark. Use when planning memory headroom for a training run on GB10, when a job OOMs on unified memory, or when monitoring temperature and power during multi-hour training.
name: spark-memory-thermal-ops description: Manage unified memory and thermals during long-running ML jobs on NVIDIA DGX Spark. Use when planning memory headroom for a training run on GB10, when a job OOMs on unified memory, or when monitoring temperature and power during multi-hour training.
DGX Spark's GB10 chip has one 128GB unified memory (UMA) pool shared by CPU and GPU, and a sustained power ceiling well below its rated figure. Both break discrete-GPU assumptions: headroom isn't what `nvidia-smi` reports, and a run that starts fast will slow down mid-job with nothing misconfigured. This skill covers planning memory headroom, working an actual OOM, and watching thermals across a long job. For launch-time failure modes (ABI mismatches, flash-attn, playbook breakage), see `spark-training-gotchas` — this skill assumes the job starts.
| Situation | Do this | |---|---| | Planning headroom before launch | Budget against `free -g`, not `nvidia-smi` — see UMA Memory Model | | Job OOMs on unified memory | Work the OOM Ladder in order: flush, then batch/pack, then method downgrade | | Throughput drops mid-run | Check the power/temp log before assuming a config bug — see Thermal Monitoring | | Trainer + inference server both wanted | Run one at a time — see Concurrent Workloads |
before launch — will this model, method, and batch/pack combination fit.
remediation order matters — what to try first, second, third.
multi-hour job, deciding whether a slowdown is thermal throttling or something else.
inference server (vLLM, Ollama) on the same box.
Spark has no separate GPU VRAM — the GPU and CPU share one 128GB pool. Two consequences:
underreport pressure — or report nothing at all.** Both report CUDA-allocator-visible memory, not the pool's actual state — a box can show headroom in `nvidia-smi` and still OOM, because page-cache and mmap'd pages the allocator doesn't see consume the same pool. On some driver/setups, the memory query returns `[N/A], [N/A]` outright instead of a number — a script grepping for a numeric value there gets nothing, not a misleading undercount (see `spark-training-gotchas` gotcha G3).
steady state.** Loading safetensors weights mmaps the file, then copies into CUDA tensors — for a window during load, both the mmap'd pages and the CUDA copy count against the pool at once. A model that fits while training can still OOM during load if headroom was sized for the post-load footprint instead of this doubled transient.
Plan and diagnose with `free -g`, not `nvidia-smi`:
free -g | awk 'NR==2 {print "free:", $4, "GB"}'Rule of thumb: take that free figure, subtract a few GB for OS/driver overhead, and budget against the result — not the 128GB spec number. The worksheet in `references/uma-accounting.md` accepts parameter count, dtype, and method as input, and returns a memory estimate to compare against known anchors.
Before launch, work through these in order:
1. Read `free -g`; subtract OS/driver overhead for the budget. 2. Estimate weights + optimizer + gradients + activations from `references/uma-accounting.md`. 3. Compare against the closest anchor (70B QLoRA, 27B LoRA, 9B full FT), not the estimate alone. 4. If the estimate is close to the budget, start with shorter packing or a smaller batch — cheaper than hitting the OOM Ladder mid-run.
A sanity check of the worksheet formula against the ≈40GB anchor:
params = 70e9
weights_gb = params * 0.5 / 1e9 # NF4, step 1
adapter_gb = 0.5 # step 5, negligible
total_gb = weights_gb + adapter_gb # + activations
print(f"{total_gb:.0f}GB before activations")Weights alone land near the ≈40GB anchor — a plan estimating far above that for the same model class is a signal to recheck dtype and method.
When a job OOMs on unified memory, work this ladder in order. Each step is more disruptive than the last — don't skip ahead: **reducing batch size is never step 1.**
1. **Flush the buffer cache.** Page cache from a previous run or a large dataset read often accounts for GB of the "missing" headroom. This costs nothing but a rerun and doesn't touch the job's configuration:
sync; echo 3 > /proc/sys/vm/drop_caches
Needs root; a between-run reset, not a mid-training step. See `spark-training-gotchas` (gotcha G3) for the full diagnostic behind this step.
2. **Reduce batch size or packing length.** Only after a flush fails to free enough headroom, cut batch size or packing length — the first step that changes what the run does. Prefer packing length first; it drives activation footprint more directly at long context.
3. **Downgrade the method: bf16 LoRA before QLoRA.** If flushing and shrinking batch/pack still OOM, drop the method a tier — bf16 LoRA is next, not the reverse. QLoRA's bitsandbytes dequantization buffers are transient CUDA-side allocations that can OOM before an equivalent bf16 LoRA run would, even though QLoRA's steady-state footprint is smaller. A QLoRA OOM is not proof the model doesn't fit.
Fall back further (smaller model, multi-Spark) only after all three steps and the job still won't fit.
Multi-hour runs push into Spark's sustained power ceiling, well under the rated figure — expected platform behavior, not a symptom to explain away:
training logs, not after a slowdown is noticed — every 3
Production-ready agentic workflow building blocks: 94 plugins, 202 agents, 183 skills, 105 commands — built for Claude Code and consumed natively by OpenAI Codex CLI, Cursor, OpenCode, the Antigravity CLI, GitHub Copilot, and Pi from a single Markdown source.
Repo: wshobson/agents
Test web applications with screen readers including VoiceOver, NVDA, and JAWS. Use when validating screen reader compatibility, debugging accessibility issues,…
Conduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance. Use when auditing websites for accessibility,…
Coordinate parallel code reviews across multiple quality dimensions with finding deduplication, severity calibration, and consolidated reporting. Use this…
Debug complex issues using competing hypotheses with parallel investigation, evidence collection, and root cause arbitration. Use this skill when debugging…
Coordinate parallel feature development with file ownership strategies, conflict avoidance rules, and integration patterns for multi-agent implementation. Use…
Decompose complex tasks, design dependency graphs, and coordinate multi-agent work with proper task descriptions and workload balancing. Use this skill when…