Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

torchtune

$ tune Official Med Risk
PyTorch · AI & Media · BSD-3-Clause · linux / macos

torchtune (tune) is PyTorch's official CLI for LLM fine-tuning, evaluation, and quantization using clean, hackable YAML recipes. It includes recipe discovery (tune ls), config extraction (tune cp), static YAML verification (tune validate), checkpoint downloads (tune download), and distributed execution (tune run).

FCRS-1.0 Score
79 /100
Good
Medium Confidence
Zero-Friction Install
pip install torchtune
CLI vs MCP Decision CLI Only

tune manages local recipe files, validates configs (tune validate), and launches local PyTorch torchrun jobs.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 18 / 25

Strong non-interactive workflow with tune ls, tune cat, tune cp, and tune validate, though output is plain text rather than --json.

  • tune ls and tune validate enable pre-flight recipe discovery and validation
  • Inline key=value config overrides on tune run
Trust & Safety 21 / 25

tune validate catches config errors before allocating GPUs; writes only to local --output-dir / checkpoints.

  • Static config verification via tune validate before execution
Setup & Portability 9 / 15

Installable via pip install torchtune on Linux and macOS, requiring matched torch / torchao versions.

  • Linux/macOS Python package requiring PyTorch ecosystem dependencies
Utility & Efficiency 13 / 15

Clean torchrun wrapper with composable recipes (lora, qlora, full), tune cp, and tune validate.

  • Built-in multi-GPU --nproc-per-node support and composable recipes
Maintenance & Lineage 9 / 10

Official PyTorch (pytorch/torchtune) project under BSD-3-Clause.

  • Official pytorch/torchtune repository (BSD-3-Clause)
Docs & Verifiability 9 / 10

Clear official documentation at meta-pytorch.org/torchtune and self-describing tune --help.

  • Official docs and built-in tune ls / tune cat inspection

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key
Credential Storage

Accepts --hf-token or HF_TOKEN env var for gated Hugging Face downloads (tune download).

Side Effects
Read-Only Local Write
Cost & Quotas

BSD-3-Clause open-source PyTorch library; GPU hardware required for LLM fine-tuning.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# torchtune (tune) Agent Rules
- Always inspect `tune ls` and run `tune validate <config.yaml>` before launching `tune run`.
- Specify `--output-dir` on `tune download` and pass bounded `epochs=1` / `max_steps_per_epoch` overrides when testing recipes.

Agent-Ready Command Recipes

Safe Read-Only Queries

List built-in recipes and configs
tune ls

Lists all available fine-tuning, evaluation, and quantization recipes with their matching YAML configs.

Validate a YAML recipe config before training
tune validate ./my_config.yaml

Performs dry validation of YAML recipe fields and overrides without launching PyTorch workers.

Controlled Writes & Previews

Copy a built-in config locally for customization
tune cp llama3_1/8B_lora_single_device ./my_config.yaml

Copies an official recipe YAML into ./my_config.yaml without downloading weights or running training.

Strengths for Agents

  • + tune ls, tune cat, tune cp, and tune validate form a clean, inspectable recipe workflow.
  • + Seamless torchrun wrapping (--nproc-per-node) and inline key=value config overrides.

Caveats & Pitfalls

  • ! No --json output on tune ls or tune validate.
  • ! tune run requires matched PyTorch/CUDA/torchao wheels and substantial GPU VRAM.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI