booster-training
Use ColossalAI Booster, plugins, dataloaders, checkpointing, LoRA, ZeRO/Gemini, and memory-aware training loops.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- booster-training
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use ColossalAI Booster, plugins, dataloaders, checkpointing, LoRA, ZeRO/Gemini, and memory-aware training loops.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/booster-api.md2.2 KB
- 参考文档references/gemini-zero-and-checkpointing.md2.3 KB
- 参考文档references/plugin-guide.md2.3 KB
- 参考文档references/troubleshooting.md2.4 KB
- 脚本scripts/booster_loop_template.py1.2 KB
- 脚本scripts/plugin_decision_helper.py2.1 KB
03 SKILL.md 正文
Booster Training
Use this sub-skill when the task is to adapt a PyTorch training script to ColossalAI, choose a Booster plugin, build a distributed dataloader, call booster.backward, save/load checkpoints, enable LoRA, or diagnose ZeRO/Gemini training behavior.
Route Here
- Choose among
TorchDDPPlugin,LowLevelZeroPlugin,GeminiPlugin,HybridParallelPlugin,TorchFSDPPlugin, orMoeHybridParallelPlugin. - Write or review a
Booster(plugin=...)training loop. - Use
plugin.prepare_dataloader,booster.boost,booster.backward,booster.execute_pipeline, and optimizer step ordering. - Save/load model, optimizer, and scheduler checkpoints, including sharded and safetensors variants.
- Enable LoRA or bitsandbytes-aware LoRA through Booster when the required optional dependencies are installed.
- Tune memory behavior with ZeRO stage, Gemini placement/offload, lazy initialization, mixed precision, gradient accumulation, and gradient clipping.
Reroute
- Installing PyTorch/CUDA or launching processes: use
../installation-and-launch/SKILL.mdfirst. - Tensor/pipeline/sequence topology theory and ShardFormer policies: use
../parallelism-and-sharding/SKILL.md. - Colossal-Inference generation or serving: use
../inference-and-serving/SKILL.md. - ColossalChat/Colossal-LLaMA application commands: use
../application-recipes/SKILL.md.
Fast Start
import colossalai
colossalai.launch_from_torch(seed=42)
For a first CUDA smoke, use TorchDDPPlugin. For optimizer-state and gradient sharding, use LowLevelZeroPlugin. For ZeRO-3-style memory management, use GeminiPlugin. For tensor/pipeline/data parallel combinations, use HybridParallelPlugin.
References and Helpers
references/booster-api.mdlists the core Booster workflow and inspected method signatures.references/plugin-guide.mdmaps user goals to plugin choices and constructor knobs.references/gemini-zero-and-checkpointing.mdcovers ZeRO/Gemini memory controls, checkpoints, LoRA, and optional async save.references/troubleshooting.mdmaps common training failures to checks and fixes.scripts/plugin_decision_helper.pysuggests a plugin from safe command-line requirements.scripts/booster_loop_template.pyprints a self-contained minimal Booster training skeleton.
Operating Rules
- Do not call
loss.backward()in a Booster-managed loop unless a specific plugin path explicitly permits it; usebooster.backward. - Do not construct GPU plugins before distributed initialization.
- Treat
enable_flash_attention, fused normalization, FP8, Apex, TensorNVMe, and application-specific extras as optional until installed and tested. - Validate a one-process or tiny synthetic case before long model training.
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).