技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
training【数据与研究】Train Transformer translation models with train.py, safe command construction, data-mode choices, hyperparameters, scheduler behavior, logs, checkpoints, CPU/GPU flags, TensorBoard, and troubleshooting.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is to plan or debug training with train.py without starting an expensive run. It covers the training CLI, data input modes, safe command construction, loss/scheduler smoke checks, logs, checkpoints, device flags, TensorBoard, and recoverable training setup failures.
Do not use this sub-skill to create training data files, translate from a checkpoint, or explain Transformer internals beyond training-facing constructor flags. Route those tasks to the data-preparation, translation, or model-architecture sub-skills.
-output_dir, stale README flags, CUDA failures, weight-sharing assertions, or TensorBoard import problems: read references/troubleshooting.md.-data_pkl DATA.pkl only;-data_pkl BPE_VOCAB.pkl -train_path TRAIN_PREFIX -val_path VAL_PREFIX where .src and .trg files exist for both prefixes.-output_dir; train.py raises if it is omitted.-no_cuda for CPU-only planning and smoke checks. Omit it only when CUDA is available and desired.scripts/build_training_command.py to print the exact command. It is safe by default and does not execute training.scripts/training_smoke_check.py --repo-root <checkout> in an environment with the legacy training dependencies when you need to verify import, loss, model forward, and ScheduledOptim behavior.train.py uses torchtext.data.Field, Dataset, BucketIterator, and TranslationDataset, so it expects the legacy torchtext API rather than modern torchtext datapipes.train.log and valid.log inside -output_dir, overwriting existing files with the same names at run start.-save_mode best, the checkpoint is OUTPUT_DIR/model.chkpt. With -save_mode all, checkpoint files are written in the process working directory, not in -output_dir.ScheduledOptim wraps Adam with the Transformer warmup schedule; it updates the learning rate on every step_and_update_lr() call.-log flag, but the current train.py parser does not accept it. Omit -log from generated commands.