技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
torchtune【数据与研究】Use torchtune for PyTorch-native LLM post-training, recipe/config workflows, datasets, models, evaluation, quantization, checkpointing, and RLHF utilities.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this repo skill when a task names torchtune, the tune CLI, torchtune recipes/configs, PyTorch-native LLM post-training, LoRA/QLoRA/DPO/PPO/KD/QAT workflows, torchtune datasets, model builders, generation, Eleuther evaluation, quantization, checkpointing, or torchtune RLHF utilities.
Torchtune development wound down in 2025, so prefer current checkout/package evidence over older examples. This skill captures the repository state in repo provenance; read it before deciding whether the skill needs refresh.
For public use, install the documented PyTorch prerequisites and torchtune package in an isolated environment:
pip install torch torchvision torchao
pip install torchtune
python - <<'PY'
import torchtune
from torchtune._recipe_registry import get_all_recipes
print("torchtune import ok", len(get_all_recipes()), "recipes")
PY
tune --help
Notes:
torchao is required at top-level import time in this checkout; install it alongside PyTorch even though it is not listed in pyproject.toml runtime dependencies.recipes package directly. Torchtune intentionally raises from recipes/__init__.py; launch recipes through tune run, inspect with tune cat, copy with tune cp, or use registry metadata.| User task | Read |
|---|---|
Use tune ls, tune cp, tune cat, tune validate, tune run, model download flags, config overrides, _component_, or registry inspection | cli-and-config |
| Build or validate dataset configs, message rows, prompt templates, packing, multimodal rows, preference data, or collators | data-and-datasets |
| Select/adapt SFT, full finetune, LoRA/QLoRA/DoRA, DPO, PPO, KD, QAT, distributed, or multi-node training recipes | post-training-recipes |
| Generate text, run EleutherAI evaluation, quantize checkpoints, or route trained checkpoints into eval/generation | inference-evaluation-quantization |
| Choose public model/tokenizer builders, PEFT modules, LoRA utilities, losses, model conversion helpers, or module APIs | models-and-modules |
| Debug checkpointing, precision, memory/distributed utilities, schedulers, logging/profiling, RLHF helpers, or experimental GRPO/async RL boundaries | training-utilities-and-rlhf |
sub-skills/cli-and-config/scripts/inspect_tune_registry.py lists built-in recipes/configs without importing recipe modules.sub-skills/cli-and-config/scripts/validate_config_shape.py applies torchtune-style overrides/removals and reports _component_ nodes without launching recipes.sub-skills/data-and-datasets/scripts/validate_messages_jsonl.py validates small JSONL message/input-output/chat/preference fixtures without importing torch.sub-skills/post-training-recipes/scripts/build_tune_command.py prints safe tune run training commands without executing them.sub-skills/inference-evaluation-quantization/scripts/build_inference_eval_command.py prints safe generate/eval/quantize commands without model work.sub-skills/models-and-modules/scripts/inspect_model_builders.py lists public model-family callable exports without instantiating large models.sub-skills/training-utilities-and-rlhf/scripts/check_training_runtime.py reports torch/CUDA/torchao/torchtune/RLHF import health without distributed initialization.torchtune.dev and async RL/GRPO surfaces as experimental and optional-extra dependent.refresh-repo-skill before relying on this skill.repo-skills-router during managed import.