distributed-and-performance
Guides agents configuring and troubleshooting Axolotl multi-GPU, DeepSpeed, FSDP, Ray, SLURM, parallelism, OOM, kernels, profiling, and performance tuning.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- distributed-and-performance
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Guides agents configuring and troubleshooting Axolotl multi-GPU, DeepSpeed, FSDP, Ray, SLURM, parallelism, OOM, kernels, profiling, and performance tuning.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/distributed-training.md7.5 KB
- 参考文档references/performance-options.md6.3 KB
- 参考文档references/troubleshooting.md6.7 KB
- 脚本scripts/check_distributed_config.py19.3 KB
03 SKILL.md 正文
Distributed and Performance
Use this sub-skill when the task mentions multi GPU Axolotl, DeepSpeed ZeRO, FSDP or FSDP QLoRA, Ray Train, SLURM/HPC/cloud launch, multi-node networking, context parallelism, tensor parallelism, expert parallelism, OOM, Flash Attention, Liger, Cut Cross Entropy, profiling, or distributed checkpoint save/load issues.
Read First
- references/distributed-training.md for launcher choice, DeepSpeed vs FSDP vs Ray tradeoffs, FSDP2/HSDP/N-D parallelism, SLURM/multi-node patterns, and checkpoint implications.
- references/performance-options.md for precision, attention backends, sample packing, gradient/activation/layer offload, LoRA kernels, Liger, Cut Cross Entropy, expert kernels, FP8, and profiling knobs.
- references/troubleshooting.md for NCCL, CUDA/Torch/backend mismatches, DeepSpeed/FSDP conflicts, Ray setup, OOM triage, and sharded checkpoint recovery.
- scripts/check_distributed_config.py for safe static YAML checks before
axolotl preprocess; it never downloads models, imports Axolotl, starts training, or modifies files.
Quick Workflow
- Identify the launch topology first: single process, one-node multi-GPU, Ray cluster, torchrun multi-node, SLURM batch, or cloud/HPC scheduler.
- Choose one primary sharding stack: FSDP2 for new PyTorch-native sharding and FSDP+QLoRA, DeepSpeed ZeRO for existing DeepSpeed configs, Ray only as an orchestration layer, and N-D parallelism for advanced FSDP+TP/CP/EP meshes.
- Set topology fields coherently:
deepspeed,fsdp_version,fsdp_config,dp_shard_size,dp_replicate_size,tensor_parallel_size,context_parallel_size,expert_parallel_size,use_ray, andray_num_workers. - Tune memory and throughput next:
bf16,fp16,tf32,fp8,attn_implementation,sample_packing,gradient_checkpointing,activation_offloading,layer_offloading, kernel plugin flags, and batch/accumulation sizes. - Run
python scripts/check_distributed_config.py config.yaml --world-size Nfor static conflicts, then validate in the user's Axolotl environment withaxolotl preprocess config.yamlbefore launchingaxolotl train. - For method-specific loss, reward, dataset, adapter, or model-family fields, route to the sibling training, data, and model-loading sub-skills before changing distributed settings.
Boundaries
- This sub-skill owns distributed launcher choices, DeepSpeed config mapping, FSDP/FSDP2/HSDP/Ray tradeoffs, N-D parallelism, backend prerequisites, memory/performance flags, profiling, and safe static config checks.
- Route training objective recipes and method-specific YAML fields to
sft-and-pretraining,preference-tuning, orrl-and-rewards. - Route dataset format,
type: chat_template, column mapping, and YAML schema mechanics todata-and-configs. - Route
base_model, tokenizer/processor, LoRA/QLoRA adapter details, quantization compatibility, and architecture quirks tomodel-loading-and-adapters. - Route basic CLI command catalogs, installation,
axolotl fetch,agent-docs, and operational smoke commands to the root Axolotl skill orcli-and-operationswhen present.
Evidence Notes
This guidance is distilled from Axolotl distributed, multi-node, FSDP QLoRA, sequence/N-D parallelism, optimization, attention, precision, NCCL, Ray, HPC, checkpoint, source mixin, integration, example, and multigpu test evidence. The inspection environment proved package metadata and namespace import only; do not claim live distributed training, GPU kernels, model downloads, or full ML runtime verification unless the user runs those checks separately.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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).