# How do you fine-tune a model on a rented GPU?

> Fine-tune Llama or Qwen with LoRA or QLoRA on a rented GPU: data over SSH, tmux, checkpoints. From $0.37/hr, crypto, no KYC.

- URL: https://rentgpucrypto.com/use-cases/fine-tuning/
- Last updated: 2026-12-03
- Publisher: RentGPUCrypto (https://rentgpucrypto.com)

**Quick answer — How does fine-tuning on a rented GPU work?**

You upload a dataset over SSH, train LoRA or QLoRA adapters with TRL, Unsloth or Axolotl inside `tmux`, then copy the adapter back. On **RentGPUCrypto** a QLoRA run on an 8B model fits one RTX 4090 at $0.37 per GPU-hour, paid in Monero, Bitcoin or USDT.

**In brief**

- **Method first**: QLoRA for the smallest card, LoRA in BF16 for quality headroom, full fine-tuning only when adapters fall short.
- **Data in and out**: `rsync` over the instance's SSH port, both ways.
- **Survive disconnects**: run the trainer in `tmux` so a dropped SSH session does not kill it.
- **Checkpoints**: kept on the NVMe disk while the instance is stopped, wiped on delete.
- **Privacy**: RentGPUCrypto does not read the files on your disk, and asks for no ID.

## Which tool should run the training?

*Five open-source fine-tuning tools compared by interface, methods and multi-GPU support*

| Tool | How you drive it | Methods | Multi-GPU |
| --- | --- | --- | --- |
| Hugging Face TRL | Python script, SFTTrainer | SFT, DPO, GRPO, LoRA and QLoRA through PEFT | Accelerate, DeepSpeed, FSDP |
| Unsloth | Python or notebook | LoRA, QLoRA, full fine-tune | Single card focus |
| Axolotl | YAML config | LoRA, QLoRA, full, DPO | DeepSpeed, FSDP |
| torchtune | YAML recipes, CLI | LoRA, QLoRA, full | FSDP |
| LLaMA-Factory | Web UI or CLI | LoRA, QLoRA, full, DPO | DeepSpeed |

## Which method should you choose?

**Start with QLoRA unless you have a reason not to.** It freezes the base model in 4-bit and trains small adapters, so memory stays close to the quantised model size. According to RentGPUCrypto's VRAM calculator, Qwen3 14B in 4-bit takes 10 GB, which leaves room on an RTX 4090 (24 GB) for activations.

LoRA in BF16 keeps the base at full precision (36 GB for the same model), which usually means an L40S or larger. Full fine-tuning updates every weight and adds gradients and optimizer states; plan on several H100 or H200 cards. The [best GPU for fine-tuning](https://rentgpucrypto.com/best/gpu-for-fine-tuning/ "Best GPU for fine-tuning LLMs") ranking maps each method to a card.

## How do you get the dataset onto the GPU?

**Copy it with `rsync` over the same SSH port the dashboard shows.** The instance page gives a command like `ssh -p 22041 root@203.0.113.7`; reuse the port and host for file transfer.

For data already on the Hugging Face Hub, `datasets.load_dataset` downloads it straight to the instance, often faster than pushing it from home. Large private corpora are better compressed first. More options, from `scp` to object storage, are in the guide on how to [move data to a GPU instance](https://rentgpucrypto.com/guides/move-data-to-a-gpu-instance/ "Move data to and from a GPU instance").

*Upload data, start training in tmux, fetch the adapter*

```bash
# laptop -> instance
rsync -avP -e "ssh -p <port>" ./data/ root@<host>:/root/data/

# on the instance
tmux new -s train
pip install -U trl peft bitsandbytes datasets accelerate
python train.py 2>&1 | tee train.log
# detach with Ctrl-b d, reattach later with: tmux attach -t train

# instance -> laptop, when done
rsync -avP -e "ssh -p <port>" root@<host>:/root/out/adapter/ ./adapter/
```

## Why run the trainer inside tmux?

**Because a training run outlives your SSH session.** If the laptop sleeps or the Wi-Fi drops, a process started in a plain shell dies with it. Inside `tmux` (or `screen`) it keeps running, and `tmux attach -t train` brings the log back.

Pair it with a log file (`tee train.log`) and checkpoints saved every few hundred steps. If something does go wrong, you lose minutes, not the run.

## What happens to checkpoints when the GPU-hours run out?

**The instance stops at that minute and its disk is kept.** Buy another block for that GPU, press Start on the instance page, and resume from the last checkpoint with your trainer's resume option.

Deleting the instance is different: it wipes the disk for good, and the dashboard warns that it cannot be undone. Copy the adapter, the tokenizer files and the training log off first. When an adapter is final, merge it into the base weights with PEFT's `merge_and_unload()` if you want a single model to serve.

## How do you budget a fine-tuning run?

**Time 50 steps on a short block, then buy the hours the full run needs.** A 10-hour block on an RTX 4090 costs $3.70; on an H100, $26.90. Multiply the seconds per step by your total steps and add a margin for evaluation and saving.

For week-long runs, multi-GPU packs sell hours at the 720-hour rate: 2× A100 80GB for a week is $359.52, 4× H100 $1,774.08. The [GPU packs](https://rentgpucrypto.com/packs/ "GPU packs for inference and training") page lists them all. GPU-hours never expire, so a block that outlasts the run is not lost.

## How do you check the GPU before a long run?

**Run three quick checks before paying for hours of training.** First, `nvidia-smi` should list every card you rented, with the driver and CUDA version. Second, `python -c "import torch; print(torch.cuda.is_available(), torch.cuda.device_count())"` should print `True` and the right count. Third, import `bitsandbytes` and load the base model in 4-bit once; a version mismatch shows up here, not three hours into the run.

On an RTX 5090, make sure PyTorch is a build for CUDA 12.8 or later, since older wheels do not know Blackwell. If a card misbehaves and support cannot fix it, the hours that instance used go back to the account, so report it early rather than training around it.

## Fine-tuning on a rented GPU: common questions

### Can I fine-tune Llama 3.1 8B on an RTX 4090?

Yes, with QLoRA or LoRA. The 4-bit base is 5 GB and the card has 24 GB, which leaves room for activations at common sequence lengths.

### Is my training data safe on a rented GPU?

The disk is local to the instance, and RentGPUCrypto states that it does not read the files on it. The disk is wiped when you delete the instance. For billing it keeps only the GPU model, host country and start and stop times.

### Can I train across several GPUs?

Yes. An instance can have 1, 2, 4 or 8 whole cards of one model. Use Accelerate, DeepSpeed or FSDP; H100 and H200 SXM hosts link the cards with NVLink.

### Do I need to log in to Hugging Face?

Only for gated models such as Llama. Run `hf auth login` or set `HF_TOKEN` on the instance, and accept the model licence on the Hub first.

### Can someone set the environment up for me?

Yes, as a paid option: a person on the RentGPUCrypto team checks the driver and CUDA, installs the stack and tests one model, for $49 per instance.

**Verdict**

- **Small models**: QLoRA on an RTX 4090, $0.37 per GPU-hour.
- **Habits that save money**: `tmux`, frequent checkpoints, a timing run before the big block.
- **Before deleting**: copy the adapter and logs off the disk.

## Sources

1. [TRL: SFTTrainer](https://huggingface.co/docs/trl/sft_trainer) — Hugging Face
2. [PEFT: LoRA and merging adapters](https://huggingface.co/docs/peft/developer_guides/lora) — Hugging Face
3. [Unsloth documentation](https://docs.unsloth.ai/) — Unsloth
4. [Axolotl documentation](https://docs.axolotl.ai/) — Axolotl
5. [QLoRA paper](https://arxiv.org/abs/2305.14314) — Dettmers et al., arXiv

**Run a timing test on an RTX 4090** 10 GPU-hours for $3.70, paid in crypto. No KYC, no email. [Rent an RTX 4090](https://rentgpucrypto.com/app/checkout/?product=rtx-4090&plan=rtx-4090-10h&from=use-cases-fine-tuning&lang=en) · [Training packs](https://rentgpucrypto.com/packs/?from=use-cases-fine-tuning "Which multi-GPU pack fits your inference or training job?")

---

RentGPUCrypto: RentGPUCrypto rents whole NVIDIA GPUs (RTX 4090, RTX 5090, L40S, A100 80GB, H100, H200) with root SSH for AI inference, Stable Diffusion and fine-tuning, paid in 7 cryptocurrencies including Monero, with no KYC and no email required.
