spark-memory-thermal-ops
Fungsinya
Tool ini membantu mengelola memori dan suhu pada komputer bertenaga besar (DGX Spark) saat menjalankan tugas machine learning yang panjang. Tool ini memastikan memori Anda cukup dan komputer tidak overheat.
Kapan dipakai
- βSebelum memulai tugas panjang, untuk mengetahui berapa banyak memori yang akan dibutuhkan.
- βJika tugas gagal karena kekurangan memori.
- βUntuk memantau suhu dan konsumsi daya selama tugas panjang.
Link skill
https://github.com/wshobson/agents/blob/main/plugins/dgx-spark-ops/skills/spark-memory-thermal-ops/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBagaimana cara mengetahui berapa banyak memori yang akan dipakai tugas machine learning saya sebelum mulai?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Tool ini memeriksa total memori sistem yang tersedia, bukan hanya memori kartu grafis. Tool ini juga memantau suhu dan daya agar komputer tidak melambat atau berhenti bekerja.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Spark Memory & Thermal Ops
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.
Common Issues Quick Reference
| 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 |
When to Use This Skill
- Sizing a training run against the 128GB pool before launch β will this model, method, and batch/pack combination fit.
- A run OOMs mid-load or mid-step and the remediation order matters β what to try first, second, third.
- Watching temperature and power during a multi-hour job, deciding whether a slowdown is thermal throttling or something else.
- Planning to run a trainer alongside an inference server (vLLM, Ollama) on the same box.
UMA Memory Model
Spark has no separate GPU VRAM β the GPU and CPU share one 128GB pool. Two consequences:
nvidia-smiandcudaMemGetInfounderreport pressure β or report nothing at all. Both report CUDA-allocator-visible memory, not the pool's actual state β a box can show headroom innvidia-smiand 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 (seespark-training-gotchasgotcha G3).Model load is a transient peak, not the 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.
Planning Sequence
Before launch, work through these in order:
- Read
free -g; subtract OS/driver overhead for the budget. - Estimate weights + optimizer + gradients +
activations from
references/uma-accounting.md. - Compare against the closest anchor (70B QLoRA, 27B LoRA, 9B full FT), not the estimate alone.
- If the estimate is close to the budget, start with shorter packing or a smaller batch β cheaper than hitting the OOM Ladder mid-run.
Example: Sizing a 70B QLoRA 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.
The OOM Ladder
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.
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_cachesNeeds root; a between-run reset, not a
β¦
Pertanyaan umum
Mengapa `nvidia-smi` tidak menampilkan memori yang benar?
`nvidia-smi` hanya menampilkan memori yang bisa langsung dipakai program. Di DGX Spark, CPU dan GPU memakai memori yang sama, dan bagian sistem lain juga memakai memori ini, yang tidak ditampilkan oleh `nvidia-smi`.
Tugas saya gagal dengan 'OOM'. Apa yang harus dilakukan?
Pertama, coba bersihkan cache memori. Jika belum berhasil, kurangi batch size atau sequence length. Jika masih gagal, pertimbangkan metode training yang lebih sederhana.
Mengapa komputer saya melambat saat menjalankan tugas panjang?
Hal ini bisa disebabkan oleh overheating atau komputer mencapai batas dayanya. Tool ini membantu memantaunya sehingga Anda tahu apakah masalahnya ada pada suhu atau penyebab lain.
Detail
Deskripsi asli dari pembuat
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.
repo: wshobson/agents
Popularitas
- Bintang GitHub
- 41k
- Peringkat
- #6686
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
screen-reader-testing
41kMeminta agent Anda menguji website menggunakan screen reader untuk memastikan website dapat diakses.
wcag-audit-patterns
41kMembantu agent Anda mengaudit aksesibilitas website dan memperbaiki masalah sesuai panduan WCAG.
multi-reviewer-patterns
41kMemungkinkan agent Anda mengoordinasikan code review paralel, menghapus temuan ganda, dan menggabungkan laporan.
parallel-debugging
41kMemungkinkan agent Anda men-debug masalah rumit dengan investigasi paralel dan analisis akar masalah.
Skill serupa
openclaw-update
394kMembantu agent Anda memperbarui OpenClaw Gateway yang sudah ada, dengan memilih metode pembaruan yang sesuai cara pemasangannya dan menjaga sesi Anda tetap berjalan.
diagnose-gateway
394kMembantu agent Anda mencari tahu mengapa OpenClaw Gateway gagal dengan memeriksa pengaturan, channel, dan port tanpa mengubah apa pun.
crabbox-apps
394kMembantu agent Anda membuka dan menjalankan aplikasi di mesin cloud sementara, lalu menampilkan tampilannya di panel samping chat Anda.