AGENT SKILL

training

Routes HiFi-GAN training, fine-tuning, dataset layout, checkpointing, validation, and distributed GPU training workflows.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
training
license
MIT
metadata
{ "disco-role": "operating" }
description
Routes HiFi-GAN training, fine-tuning, dataset layout, checkpointing, validation, and distributed GPU training workflows.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

training

Use this sub-skill when the user needs to train or fine-tune HiFi-GAN with the skill's self-contained bundled train_hifigan.py entrypoint, choose a V1/V2/V3 config, prepare LJSpeech-style filelists, manage checkpoints/logs, or debug CUDA/distributed training failures.

Use this route for

  • Launching bundled scripts/train_hifigan.py for full training with v1, v2, v3, or a custom JSON config.
  • Preparing LJSpeech-1.1/wavs, LJSpeech-1.1/training.txt, and LJSpeech-1.1/validation.txt style inputs.
  • Fine-tuning with teacher-forced mel .npy files in ft_dataset or a custom --input_mels_dir.
  • Understanding checkpoint save/resume behavior under --checkpoint_path.
  • Debugging validation/TensorBoard output and multi-GPU torch.multiprocessing/NCCL training.
  • Running or adapting the bundled tiny-fixture smoke helpers before attempting an expensive run.
  • Training without depending on an external HiFi-GAN checkout; the root skill bundles the needed source/config files under ../../scripts/hifigan_runtime/.

Do not use this route for

  • Checkpoint-based waveform generation from wav inputs. Use the sibling inference sub-skill.
  • Mel-to-wav or end-to-end synthesis from .npy mel files. Use the sibling inference sub-skill.
  • Editing the HiFi-GAN model architecture beyond config-level training choices; use the root shared model/config references under ../../references/ when available.

Read first

  • references/training-workflows.md — training/fine-tuning commands, checkpoint/log behavior, validation, and distributed notes.
  • references/config-and-data.md — V1/V2/V3 config differences, LJSpeech filelist schema, mel .npy layout, and environment facts.
  • references/troubleshooting.md — concrete recovery guidance for missing wavs, sample-rate mismatches, fine-tuning mel errors, CUDA, TensorBoard, checkpoint collisions, and DDP mistakes.
  • Root shared references under ../../references/ — model/config internals and provenance shared with other HiFi-GAN sub-skills.

Skill-owned scripts

  • scripts/train_hifigan.py — self-contained training/fine-tuning entrypoint that runs bundled HiFi-GAN source and resolves --config v1|v2|v3 to bundled configs.
  • scripts/make_ljspeech_fixture.py — creates a tiny LJSpeech-style wav/filelist fixture, optionally with mel .npy files or intentionally bad rows for negative tests.
  • scripts/smoke_train_tiny.py — creates a temporary fixture and tiny config, then runs a short GPU training pass through scripts/train_hifigan.py with safe compatibility shims for modern PyTorch/librosa stacks.

Fast command patterns

From this sub-skill's scripts/ directory or by using the script path from anywhere with a CUDA-capable PyTorch environment:

python scripts/train_hifigan.py --config v1
python scripts/train_hifigan.py --config v2 --checkpoint_path cp_hifigan_v2
python scripts/train_hifigan.py --config v3 --checkpoint_path cp_hifigan_v3

For fine-tuning, provide basename-matched mel files and pass the flag exactly as a truthy value:

python scripts/train_hifigan.py --fine_tuning True --config v1 --input_mels_dir ft_dataset

For a cheap local sanity check before a real run:

python scripts/smoke_train_tiny.py --dry-run
python scripts/smoke_train_tiny.py

Verified environment baseline

The inspection run verified that torch 2.3.1+cu121 imports on an NVIDIA A100-SXM4-40GB host, CUDA is available, torch.cuda.get_device_name(0) works, torch.utils.tensorboard imports, and librosa.util.normalize is present in librosa 0.10.2.post1. The repository requirements are older; read references/troubleshooting.md before assuming modern library compatibility.

Routing notes

  • If the task says "train", "fine-tune", "resume", "checkpoint", "validation loss", "TensorBoard", "LJSpeech filelist", "config_v1/config_v2/config_v3", "train_hifigan.py", "multi-GPU", or "NCCL", stay here.
  • If the task asks to synthesize wavs or run inference.py / inference_e2e.py, route to inference instead.
  • If a workflow needs shared architecture facts, keep this route active for launch/debugging and use root shared references under ../../references/ only for model/config background.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351