AGENT SKILL

training-and-generation

Inspect and operate OpenPrompt training, evaluation, generation, runner selection, device placement, checkpointing, few-shot, zero-shot, LM-BFF, and ProtoVerb workflows.

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

01 前言 Front Matter

name
training-and-generation
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Inspect and operate OpenPrompt training, evaluation, generation, runner selection, device placement, checkpointing, few-shot, zero-shot, LM-BFF, and ProtoVerb workflows.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

Training and Generation

Use this sub-skill when the task asks how to run, inspect, resume, test, or debug OpenPrompt training/generation jobs after the dataset, template, verbalizer, and package environment choices are known.

Start here:

  • Use references/api-reference.md for runner APIs, device placement, config keys, checkpoint/logging semantics, and generation contracts.
  • Use references/workflows.md for safe dry-runs, classification, generation, LM-BFF, ProtoVerb, few-shot, zero-shot, resume, and test recipes.
  • Use references/troubleshooting.md when CUDA, model cache, dataset, checkpoint, generation length, teacher-forcing, few-shot sampling, LM-BFF, or ProtoVerb behavior fails.
  • Use scripts/inspect_training_config.py to summarize a YAML config without loading models, loading datasets, or starting training.

Operating rules:

  1. Dry-run first. Inspect experiments/*.yaml with scripts/inspect_training_config.py before running experiments/cli.py or a tutorial script.
  2. Runner selection follows experiments/cli.py: classification with classification.auto_t or classification.auto_v uses LMBFFClassificationRunner; classification with verbalizer: proto_verbalizer uses ProtoVerbClassificationRunner; other classification uses ClassificationRunner; task: generation uses GenerationRunner.
  3. Treat environment.num_gpus > 0 as a real CUDA request. OpenPrompt calls model.cuda() or wraps DataParallel; it does not automatically fall back to CPU when CUDA is unavailable.
  4. BaseRunner writes TensorBoard and checkpoints under config.logging.path unless train.clean: True. The code writes checkpoints/last.ckpt and copies to best.ckpt on improved validation; the declared checkpoint.save_latest and checkpoint.save_best flags are not enforced by BaseRunner.
  5. Generation training requires batches with tgt_text and correct teacher_forcing/predict_eos_token behavior. For evaluation/generation, pass generation kwargs deliberately; generation.max_length includes prompt/input tokens in the native generation API.
  6. Few-shot and zero-shot behavior is owned by experiments/cli.py: few-shot loops over sampling_from_train.seed; zero-shot calls runner.test() without fitting.
  7. Route dataset layout/config merging details to ../data-and-config-workflows/, prompt grammar/verbalizer design to ../template-verbalizer-design/, and top-level import/loading quickstarts to ../pipeline-basics/.
  8. Large-model CUDA, UltraChat/accelerate, and PaddlePaddle tutorial variants are optional workflows. The minimum verified scope is CPU package/config/API inspection, not GPU training throughput or benchmark reproduction.

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