Complete torchrun keyboard shortcuts and commands reference — 12 shortcuts across 2 categories. Quick reference cheat sheet for Windows & Mac.
torchrun is a popular distributed training launcher used by professionals worldwide. Learning keyboard shortcuts can dramatically speed up your workflow — studies show shortcut users save an average of 8 days per year compared to mouse-only users.
This page covers all 12 torchrun shortcuts across 2 categories: Core Flags, Rendezvous & Elasticity. Each shortcut includes a description to help you understand when and how to use it effectively.
| Shortcut | Action | Description |
|---|---|---|
| torchrun script.py | Single-GPU run | Run a script with the default single-process, single-GPU configuration. |
| --nproc_per_node=N | Processes per node | Number of processes — typically one per GPU — to launch on each node. |
| --nnodes=N | Node count | Total number of nodes participating in the distributed job. |
| --node_rank=N | Node rank | This node's rank (0-indexed) among all participating nodes; set differently on each machine. |
| --master_addr=IP | Master address | IP address of the rank-0 node that other workers connect to for coordination. |
| --master_port=PORT | Master port | TCP port on the master node used for the rendezvous connection. |
| Shortcut | Action | Description |
|---|---|---|
| --rdzv_backend=c10d | Rendezvous backend | Coordination backend for elastic launches; c10d is the recommended default. |
| --rdzv_id=JOBID | Rendezvous ID | Unique identifier for the job, shared by all nodes so they can find each other. |
| --rdzv_endpoint=IP:PORT | Rendezvous endpoint | Address workers use to join the rendezvous, an alternative to setting master_addr/master_port. |
| --standalone | Standalone mode | Run a single-node job without needing any rendezvous configuration. |
| --max_restarts=N | Max restarts | Maximum number of worker group restarts allowed before the job is marked failed. |
| --log_dir=PATH | Log directory | Directory where per-worker stdout and stderr logs are written. |
The most essential torchrun shortcuts are: torchrun script.py (Single-GPU run), --nproc_per_node=N (Processes per node), --nnodes=N (Node count). These cover the most frequent actions and can significantly speed up your workflow.
torchrun has 12 keyboard shortcuts across 2 categories on shortcut-tools.com.
These are command-line commands — type them in your terminal or console. Combine them with shell history search (Ctrl + R) and aliases to work even faster.
The torchrun shortcut for single-gpu run is torchrun script.py. Run a script with the default single-process, single-GPU configuration.
Start with the essentials: Learn torchrun script.py (Single-GPU run) and --nproc_per_node=N (Processes per node) first — these are the most commonly used.
Practice daily: Pick 2–3 new shortcuts each day and consciously use them instead of the mouse. Within a week, they become muscle memory.
Print this cheat sheet: Keep a reference nearby until shortcuts become automatic. Focus on the Core Flags category first.
CLI tip: Create shell aliases for the commands you use most. Combine them with these shortcuts for maximum efficiency.