AGENT SKILL

training-and-optimization

Helps build LMFlow fine-tuning and optimization commands for full training, LoRA, QLoRA, LISA, and custom optimizers.

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

01 前言 Front Matter

name
training-and-optimization
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Helps build LMFlow fine-tuning and optimization commands for full training, LoRA, QLoRA, LISA, and custom optimizers.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Training and Optimization

Use this sub-skill when the task is to fine-tune or continue training an LMFlow model, choose an optimizer variant, or prepare a safe command for a training run.

Typical Triggers

  • finetune, train, LoRA, QLoRA, LISA
  • custom optimizer, customized_optim, adamw_schedule_free, sgdp, adabelief
  • accelerate, deepspeed, FSDP, wandb
  • output_dir, overwrite_output_dir, resume_from_checkpoint

What This Sub-Skill Owns

  • Full fine-tuning and parameter-efficient fine-tuning command construction.
  • Custom optimizer name selection and common optimizer arguments.
  • Safe output/checkpoint choices and W&B reporting choices.
  • The command builder that prints a self-contained LMFlow training snippet.

Read These First

  • references/workflows.md for the training variants and their required inputs.
  • references/cli-reference.md for the key training dataclass fields.
  • references/optimization-reference.md for the optimizer names and when to use them.
  • references/troubleshooting.md for OOM, output-path, W&B, and optional dependency issues.
  • scripts/build_finetune_command.py to render a copyable training command.

Cross-Links

  • Dataset and conversation-template details live in ../data-and-templates/SKILL.md.
  • Non-training generation and evaluation live in ../inference-and-evaluation/SKILL.md.
  • Reward-model, DPO, RAFT, and LoRA-merge flows live in ../post-training-alignment/SKILL.md.

Workflow

  1. Confirm the model, dataset, and output directory.
  2. Choose the method: full, LoRA, QLoRA, LISA, or custom optimizer.
  3. Decide whether W&B is enabled or explicitly disabled.
  4. Check the dataset template and block-size settings.
  5. Render the command with the builder script before a long run.

Common Decisions

  • Use full training when the user wants the simplest baseline and memory is sufficient.
  • Use LoRA for most parameter-efficient adaptation tasks.
  • Use QLoRA when memory is tight and bitsandbytes is available.
  • Use LISA when the user explicitly wants the memory-efficient layer-activation strategy.
  • Use a custom optimizer only when the user already knows which optimizer variant they need.

What Not To Do

  • Do not assume the command should run with the current checkout's shell scripts.
  • Do not mix vLLM or SGLang concerns into this sub-skill.
  • Do not hide output-overwrite or checkpoint-resume decisions.
  • Do not claim a GPU workflow is validated just because a CPU import worked.

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