dgx-spark-training-layout
Structure a fine-tuning experiment (LoRA, QLoRA, SFT) so each one lives in its own directory, heavy artifacts land in shared locations rather than beside the…
Skill by amarjeet
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/amarjeet-dgx-spark-training-layout
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/dgx-spark-training-layout
What's inside
- Skill name
dgx-spark-training-layout- Description
- Structure a fine-tuning experiment (LoRA, QLoRA, SFT) so each one lives in its own directory, heavy artifacts land in shared locations rather than beside the code, and every run is reproducible from a config snapshot. Triggers: new training run, fine-tune a model, LoRA, QLoRA, SFT, training experiment layout, where do checkpoints go, adapter output directory, run id, sweep, reproducible training config.
- License
- MIT
- Compatibility
- Linux host with bash. Written for an NVIDIA DGX Spark (GB10, aarch64) but applies to any single-node CUDA machine running TRL, PEFT, unsloth or axolotl. Docker optional. Builds on the dgx-spark-layout skill, which should be read first.
- Instructions
- 130 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# DGX Spark training experiment layout
## Overview
**Parent skill: [`dgx-spark-layout`](../dgx-spark-layout/SKILL.md) — read it first.** All of its
storage rules apply unchanged: caches at each tool's own standard default location,
every path an env-overridable variable, no dir-local `./.cache`, and the same Docker
mount / native export rules.
This skill adds only what training introduces on top of serving:
- **Runs.** One experiment is many training runs at different hyperparameters, so
output paths need a run dimension that serving does not.
- **Artifacts with opposite economics.** Checkpoints carry optimizer state, run
2–3× adapter size *per save*, and are disposable once a run succeeds. Adapters are
tens of megabytes and are the entire product. They must not share a retention policy.
As in the parent skill, the workspace root is yours to name:
```bash
DGX_SPARK_ROOT="${DGX_SPARK_ROOT:-${HOME}/dgx-spark}"
```
Everything below is written against it, so nothing here is tied to one machine's
directory convention.
## Instructions
### The experiment directory holds code and config only
Every training experiment gets its own directory under
`${DGX_SPARK_ROOT}/experiments/trainings/<Name>/`. Nothing lives loose in
`trainings/` itself — if a file belongs to an experiment, it belongs inside that
experiment's directory.
Name as `<Model>-<Method>-<Task>`, e.g. `Qwen3-4B-QLoRA-alpaca`:
```
${DGX_SPARK_ROOT}/experiments/trainings/<Model>-<Method>-<Task>/
├── README.md goal, base model, dataset, key results, gotchas
├── train.sh thin launcher: stamps a run-id, resolves output dir, calls entry
├── train.py or a config-driven entry for unsloth / TRL+PEFT / axolotl
├── configs/
│ ├── base.yaml shared defaults (model id, dataset, seq len)
│ └── run-*.yaml per-run overrides (rank, alpha, lr, quantization)
├── data/ dataset *preparation scripts* only — never data files
└── eval/ post-training eval prompts and scripts
```
The directory stays a few kilobytes: no weights, no datasets, no checkpoints, no
logs. The framework choice is per-experiment; the skeleton is identical either way.
### Heavy data goes where the parent skill says
| Data | Where | How |
|---|---|---|
| Base model weights | `~/.cache/huggingface/` | Reference by HF id; `from_pretrained` caches once for every experiment |
| HF datasets | `~/.cache/huggingface/` | Automatic via `datasets` |
| Self-built datasets | `${DGX_SPARK_ROOT}/datasets/<name>/` | The `data/` prep script writes there via an env-overridable path |
| Run outputs | `${DGX_SPARK_ROOT}/outputs/trainings/<experiment>/<run-id>/` | See below |
### Per-run output layout
```
${DGX_SPARK_ROOT}/outputs/trainings/<experiment>/<run-id>/
├── config.yaml exact resolved config snapshot — the reproducibility record
├── checkpoints/ trainer checkpoints with optimizer state — big, prunable
├── adapter/ final LoRA/QLoRA adapter — small, keep indefinitely
├── merged/ optional merged-weights / GGUF export for serving
├── logs/ tensorboard / trainer logs
└── metrics.json final train/eval numbers
```
`run-id` is `YYYYMMDD-HHMM-<tag>`, where the tag encodes what was varied — e.g.
`20260720-0930-r16-lr2e4`. An `ls` of the experiment's output directory then reads
as its own sweep history, without a separate log of what was tried.
### Rules
1. **One experiment, one directory** under `trainings/`.
2. **The output root is env-overridable and defaults to the shared location.** Never
a dir-local `./outputs` — checkpoints accumulate faster than anyone expects. In
`train.sh`:
```bash
DGX_SPARK_ROOT="${DGX_SPARK_ROOT:-${HOME}/dgx-spark}"
OUTPUT_ROOT="${OUTPUT_ROOT:-${DGX_SPARK_ROOT}/outputs/trainings}"
EXPERIMENT="$(basename "$(cd "$(dirname "$0")" && pwd)")"
RUN_ID="$(date +%Y%m%d-%H%M)-${RUN_TAG:?set RUN_TAG, e.g. r16-lr2e4}"
RUN_DIR="${OUTPUT_ROOT}/${EXPERIMENT}/${RUN_ID}"
mkdir -p "${RUN_DIR}"
```
3. **Snapshot the fully-resolved config to `${RUN_DIR}/config.yaml` before training
starts.** Not the input config — the resolved one, after defaults and overrides
have merged. A run whose exact hyperparameters cannot be recovered is a run that
gets redone.
4. **Adapters are not checkpoints.** On a successful run, copy the final adapter out
of `checkpoints/` into `adapter/`; `checkpoints/` is then safe to prune. Keep
adapters indefinitely — they are the product.
5. **Base models and datasets are never downloaded per experiment.** Use HF ids so
the shared cache dedupes. Non-HF artifacts go to `${DGX_SPARK_ROOT}/base-models/`
and `${DGX_SPARK_ROOT}/datasets/` per the parent skill.
6. **Docker versus native follows the parent skill unchanged.** Training stacks (TRL,
PEFT, unsloth, bitsandbytes) read `HF_HOME`; triton kernels cache under
`~/.triton`. For Docker, bind-mount to the in-container defaults *and* add
`-v "${OUTPUT_ROOT}:${OUTPUT_ROOT}"` — the same path inside and out, so a
`RUN_DIR` printed in a log is a path that exists on the host. Native: export
nothing and the defaults apply.
7. **A launcher wrapper stays optional**, same as the parent skill. Add one only for
launch conveniences — token forwarding, Docker plumbing, run selection — never to
set storage paths.
### When writing a new training experimentFrom amarjeet/agent-skills, MIT.
More from amarjeet/agent-skills
- 0.570score
story-loop
amarjeet
Story-driven implementation for a repository: a YAML story tracker cut from a design document and optional formal specs, a coordinator session that spawns an…
SkillAFreshness: AClaude Code +9 - 0.567score
firecrawl
amarjeet
Use the installed Firecrawl CLI to search, scrape, crawl, map, parse, monitor, or interact with web content and local documents.
SkillAFreshness: AClaude Code +9 - 0.565score
ste-writing
amarjeet
Write or rewrite prose in ASD-STE100-style Simplified Technical English: short, literal sentences anyone can read without guessing.
SkillAFreshness: AClaude Code +9 - 0.526score
glyph-canvas
amarjeet
Render user requests as text drawings or diagrams using only unicode glyphs (box drawing, block elements, arrows, geometric shapes).
SkillBFreshness: BClaude Code +9 - 0.526score
skill-creator
amarjeet
End-to-end system for creating, updating, and validating agent skills (Cursor, Claude, Codex, Grok).
SkillBFreshness: BClaude Code +9 - 0.524score
dgx-spark-layout
amarjeet
Keep model weights and compiler caches out of individual experiment directories on a DGX Spark (or any single-node CUDA host) by pinning them to each tool's…
SkillBFreshness: BClaude Code +9 - 0.516score
dad-jokes
amarjeet
Tell a single dad joke on request.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 5, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/amarjeet/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from amarjeet
- 0.570score
story-loop
amarjeet
Story-driven implementation for a repository: a YAML story tracker cut from a design document and optional formal specs, a coordinator session that spawns an…
SkillAFreshness: AClaude Code +9 - 0.567score
firecrawl
amarjeet
Use the installed Firecrawl CLI to search, scrape, crawl, map, parse, monitor, or interact with web content and local documents.
SkillAFreshness: AClaude Code +9 - 0.565score
ste-writing
amarjeet
Write or rewrite prose in ASD-STE100-style Simplified Technical English: short, literal sentences anyone can read without guessing.
SkillAFreshness: AClaude Code +9 - 0.526score
glyph-canvas
amarjeet
Render user requests as text drawings or diagrams using only unicode glyphs (box drawing, block elements, arrows, geometric shapes).
SkillBFreshness: BClaude Code +9 - 0.526score
skill-creator
amarjeet
End-to-end system for creating, updating, and validating agent skills (Cursor, Claude, Codex, Grok).
SkillBFreshness: BClaude Code +9 - 0.524score
dgx-spark-layout
amarjeet
Keep model weights and compiler caches out of individual experiment directories on a DGX Spark (or any single-node CUDA host) by pinning them to each tool's…
SkillBFreshness: BClaude Code +9
Cite this page
dgx-spark-training-layout skill. Agent Mart. https://agentmart.dev/skills/amarjeet-dgx-spark-training-layout (last updated 2026-10-24)