vast-gpu
What it does
This skill rents GPU machines on vast.ai when you need compute without owning hardware. It is for researchers who need on-demand GPUs for a training task.
When to use it
- βWhen you need an on-demand GPU for a training task and do not own one.
- βWhen you want the GPU chosen for the task and its cost estimated before renting.
- βWhen you want an instance destroyed after the run is finished.
Skill link
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/skills-codex/vast-gpu/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI need a GPU on vast.ai for my training task, with the cost estimated before anything is rented.β
5 new skills a week. 1 minute to read.
How it works
The agent analyzes the training task to find the GPU needs, searches for good-value offers, and shows options with estimated total cost. After you choose, it sets up the instance, runs the job, and destroys the instance when done.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Vast.ai GPU Management
Manage vast.ai GPU instance: $ARGUMENTS
Overview
Rent cheap, capable GPUs from vast.ai on demand. This skill analyzes the training task to determine GPU requirements, searches for the best-value offers, presents options with estimated total cost, and handles the full lifecycle: rent β setup β run β destroy.
Users do NOT specify GPU models or hardware. They describe the task β the skill figures out what to rent.
Prerequisites: The vastai CLI must be installed (requires Python β₯ 3.10) and authenticated:
pip install vastai
vastai set api-key YOUR_API_KEY
If your system Python is < 3.10, create a virtual environment with Python β₯ 3.10 (e.g.,
conda create,pyenv,uv venv, etc.) and installvastaithere.
SSH public key must be uploaded at https://cloud.vast.ai/manage-keys/ BEFORE creating any instance. Keys are baked into instances at creation time β if you add a key after renting, you must destroy and re-create the instance.
State File
All active vast.ai instances are tracked in vast-instances.json at the project root:
[
{
"instance_id": 33799165,
"offer_id": 25831376,
"gpu_name": "RTX_3060",
"num_gpus": 1,
"dph": 0.0414,
"ssh_url": "ssh://root@1.208.108.242:58955",
"ssh_host": "1.208.108.242",
"ssh_port": 58955,
"created_at": "2026-03-29T21:12:00Z",
"status": "running",
"experiment": "exp01_baseline",
"estimated_hours": 4.0,
"estimated_cost": 0.17
}
]
This file is the source of truth for /run-experiment and /monitor-experiment to connect to vast.ai instances.
Workflow
Action: Provision (default)
Analyze the task, find the best GPU, and present cost-optimized options. This is the main entry point β called directly or automatically by /run-experiment when gpu: vast is set.
Step 1: Analyze Task Requirements
Read available context to determine what the task needs:
From the experiment plan (
refine-logs/EXPERIMENT_PLAN.md):- Compute budget (total GPU-hours)
- Hardware hints (e.g., "4x RTX 3090")
- Model architecture and dataset size
- Run order and per-milestone cost estimates
From experiment scripts (if already written):
- Model size β scan for model class,
num_parameters, config files - Batch size, sequence length β estimate VRAM from these
- Dataset β estimate training time from dataset size + epochs
- Multi-GPU β check for
DataParallel,DistributedDataParallel,accelerate,deepspeed
- Model size β scan for model class,
From user description (if no plan/scripts exist):
- Model name/size (e.g., "fine-tune LLaMA-7B", "train ResNet-50")
- Dataset scale (e.g., "ImageNet", "10k samples")
- Estimated duration (e.g., "about 2 hours")
Step 2: Determine GPU Requirements
Based on the task analysis, determine:
| Factor | How to estimate |
|---|---|
| Min VRAM | Model params Γ 4 bytes (fp32) or Γ 2 (fp16/bf16) + optimizer states + activations. Rules of thumb: 7B model β 16 GB (fp16), 13B β 28 GB, 70B β 140 GB (needs multi-GPU). ResNet/ViT β 4-8 GB. Add 20% headroom. |
| Num GPUs | 1 unless: model doesn't fit in single GPU VRAM, or scripts use DDP/FSDP/DeepSpeed, or plan specifies multi-GPU |
| Est. hours | From experiment plan's cost column, or: (dataset_size Γ epochs) / (throughput Γ batch_size). Default to user estimate if available. Add 30% buffer for setup + unexpected slowdowns |
| Min disk | 20 GB base + model checkpoint size + dataset size. Default: 50 GB |
| CUDA version | Match PyTorch version. PyTorch 2.x needs CUDA β₯ 11.8. Default: 12.1 |
Step 3: Search Offers
Search across multiple GPU tiers to find the best value. Always search broadly β do NOT limit to one GPU model:
# Tier 1: Budget GPUs (good for small models, fine-tuning, ablations)
vastai search offers "gpu_ram>=<MIN_VRAM> num_gpus>=<N> reliability>0.95 inet_down>100" -o 'dph+' --storage <DISK> --limit 10
# Tier 2: If VRAM > 24 GB, also search high-VRAM cards specifically
vastai search offers "gpu_ram>=48 num_gpus>=<N> reliability>0.95" -o 'dph+' --storage <DISK> --limit 5
The output is a table with columns: ID, CUDA, N (GPU count), Model, PCIE, cpu_ghz, vCPUs, RAM, Disk, $/hr, DLP (deep learning perf), score, NV Driver, Net_up, Net_down, R (reliability %), Max_Days, mach_id, status, host_id, ports, country.
The first column (ID) is the offer ID nee
FAQ
Do I need to pick the GPU model myself?
No. You describe the task, and the skill works out what to rent.
What do I need before renting?
A vast.ai account, the vastai command line tool with Python 3.10 or newer, and an SSH key uploaded to the vast.ai site.
Where are instances tracked?
In a vast-instances.json file at the project root.
Details
Original description by the author
Rent, manage, and destroy GPU instances on vast.ai. Use when user says \"rent gpu\", \"vast.ai\", \"rent a server\", \"cloud gpu\", or needs on-demand GPU without owning hardware.
Popularity
- GitHub stars
- 18k
- Ranking position
- #10620
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
ablation-planner
18kHelps your agent plan ablation studies for a paper, choosing the tests reviewers are likely to ask for once the main results look good.
alphaxiv
18kLets your agent quickly read one research paper using AlphaXiv summaries, with full text or LaTeX source as backup, from an arXiv link or ID.
analyze-results
18kHelps your agent analyze machine learning experiment results, compare runs against a baseline, and turn the numbers into clear findings and next steps.
arxiv
18kLets your agent search arXiv for academic papers, read their details, and save PDFs to your library for a research topic.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.