Guide

Fine-tune a language model with LoRA on one GPU

Last updated: 1 December 2026

Fine-tuning does not have to mean retraining a whole model. LoRA trains a small set of extra weights, which fits on a single GPU.

Instant VPS from $7.99 a month

See Instant VPS plansHow ordering works

LoRA and QLoRA in one paragraph

LoRA freezes the original model and trains small adapter matrices on top. QLoRA also loads the frozen model in 4-bit precision, which cuts memory a lot, so a model that would not fit for full training can fit for adapter training.

Set up the environment

Run training inside tmux so it survives a dropped SSH connection, and install the usual libraries:

sudo apt install -y tmux python3-venv
tmux new -s train
python3 -m venv venv && . venv/bin/activate
pip install torch transformers datasets peft trl bitsandbytes accelerate

Plan your memory

Good habits

Need a GPU server?

See our GPU servers: NVIDIA T4 to H200, built to order, no ID documents, pay with Monero or Bitcoin. Use them within our acceptable use policy.

Questions and answers

Can I fine-tune on a T4?
Small models with QLoRA, yes; mind the 16 GB limit.

How long does it take?
It depends on the data size and the GPU; test with a small subset first.

Do I get a full new model?
LoRA gives you a small adapter that you load on top of the base model.

Which libraries do people use?
Hugging Face transformers, PEFT, TRL and bitsandbytes are common.

Related guides

Ready to try it? Instant VPS from $7.99 a month

See Instant VPS plansHow ordering works