You have a corpus from your domain โ€” a collection of scientific papers, clinical notes, legal texts, or material in a low-resource language โ€” and you want a language model that "speaks" that specific language. The good news: in 2026, you don't need a cluster or a big-tech budget to do it. With QLoRA, you can adapt an open model to your domain on a single affordable GPU, paid by the hour.

โšก TL;DR

QLoRA quantizes the base model to 4 bits and trains only small adapters (LoRA), drastically reducing the memory needed. The result: 7B to ~13B models fit on a single 24GB GPU (e.g. RTX 4090). You pay for the GPU by the hour, keep data in Brazil under the LGPD, and own the trained model. A full fine-tune of giant models still needs multiple GPUs.

What LoRA / QLoRA is (no jargon)

Training an LLM from scratch โ€” or doing a full fine-tune that adjusts all of its billions of parameters โ€” is expensive in memory and GPU time. Parameter-efficient fine-tuning (PEFT) techniques solve this elegantly:

  • LoRA freezes the base model and trains only small "adapter" matrices injected into a few layers. You adjust a tiny fraction of the parameters but still capture your domain's behavior.
  • QLoRA goes further: it loads the base model quantized to 4 bits (using far less VRAM) and trains the LoRA adapters on top. That's what lets a 7Bโ€“13B model fit on a 24GB GPU.

In practice, you don't change the model's whole "brain" โ€” you teach a lean set of adjustments that steer it toward your domain. At the end, the adapters take up only a few megabytes.

Step 1 โ€” Pick the base model

Start from a solid open model sized right for your GPU:

FamilyUseful sizes in 24GB (QLoRA)Good for
Llama8BGeneral use, strong in English
Qwen7Bโ€“14BMultilingual, code, reasoning
Mistral7BEfficient, good value

Not sure which to pick? See our open-source LLM comparison 2026. For Portuguese and multilingual tasks, the Qwen family is often a great starting point.

Step 2 โ€” Prepare your corpus

Data quality matters more than quantity. For supervised fine-tuning, structure your examples as instruction โ†’ response (or dialogue). A few thousand well-curated examples already make a visible difference in a specific domain. Tips:

  1. Clean and standardize: remove noise (repeated PDF headers, OCR garbage) before training.
  2. Hold out a test set: keep 5โ€“10% of examples out of training to evaluate honestly.
  3. Mind consent: with clinical or personal data, secure your legal basis under the LGPD before using it.

Step 3 โ€” Train with PEFT on a 24GB GPU

In the Console, launch a 24GB GPU (like the RTX 4090) with the JupyterLab template and install the Hugging Face stack. The QLoRA skeleton with the PEFT library looks like this:

# pip install transformers peft bitsandbytes trl datasets accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import LoraConfig
from trl import SFTTrainer
import torch

base = "Qwen/Qwen2.5-7B"  # or Llama, Mistral...

# 1) Load the base model quantized to 4-bit (QLoRA)
bnb = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.bfloat16,
)
model = AutoModelForCausalLM.from_pretrained(base, quantization_config=bnb, device_map="auto")
tok = AutoTokenizer.from_pretrained(base)

# 2) Define the LoRA adapters (trains few parameters)
lora = LoraConfig(
    r=16, lora_alpha=32, lora_dropout=0.05,
    target_modules=["q_proj", "k_proj", "v_proj", "o_proj"],
    task_type="CAUSAL_LM",
)

# 3) Train on your corpus
trainer = SFTTrainer(
    model=model, peft_config=lora, tokenizer=tok,
    train_dataset=my_dataset,   # your domain examples
)
trainer.train()
trainer.save_model("./my-lora-adapter")  # adapters only, a few MB

At the end you have a small LoRA adapter that can be loaded on top of the base model at inference time โ€” including served with vLLM for production use.

Step 4 โ€” Evaluate for real

Don't trust the loss curve alone. To know whether the model actually improved on your domain:

  • Blind test: run the base and the fine-tuned model on the same test set and compare side by side.
  • Task metrics: use the metric that matters to you (classification accuracy, factual correctness, translation quality).
  • Human review: in sensitive domains (health, law), have an expert assess samples.
  • Watch for overfitting: if the model memorizes the training set but does worse on the test set, reduce epochs or the LoRA r.

Realistic cost (and what one GPU can't do)

A QLoRA run on a 7B model with a few thousand examples typically takes from a few hours to a day on a 24GB GPU. Because billing is hourly in reais and via Pix, you estimate the cost up front and shut the instance down when you finish โ€” ideal for a research budget. An entry-level GPU like the RTX A4000 from R$1.80/h is great for prototyping the pipeline before moving to the 4090. (Check current pricing in the console.)

๐Ÿ’ก Be realistic about limits

QLoRA on a single 24GB GPU is excellent for small-to-mid models (7Bโ€“13B). For a full fine-tune of very large models (70B+) or training with huge contexts, you'll need multiple GPUs. When you reach that point, pick the right GPU with our guide on how to choose between RTX 4090, A100, H100, and Rubin.

Your data (and your model) stays in Brazil

When you train on a GPU in Brazil, the corpus, the adapters, and the resulting weights stay in the country. You don't send sensitive clinical notes or legal texts to a foreign API, which helps with LGPD compliance and keeps you the owner of the trained model. Go deeper in data sovereignty and the LGPD. And if your university's cluster queue is blocking this work, see how to get on-demand GPUs without the cluster queue.

Adapt a model to your domain today

Run your first QLoRA on a Brazilian GPU.

Get Started Free โ†’

Frequently asked questions

Can I fine-tune an LLM on a single GPU?

Yes, with QLoRA. The technique quantizes the base model to 4 bits and trains only small adapters (LoRA), which cuts memory use dramatically. As a result, 7B to ~13B models typically fit on a single 24GB GPU, such as an RTX 4090. A full fine-tune of very large models still requires multiple GPUs.

How much does it cost to fine-tune a model for research?

On GPUBrazil you pay for the GPU per hour. A QLoRA run on a 7B model with a few thousand examples can take from a few hours to a day on a 24GB GPU. Because billing is hourly and via Pix, you can estimate the cost up front and shut the instance down when you're done. Check current pricing in the console.

Does my training data stay in Brazil during fine-tuning?

Yes. Because training runs on a GPU in Brazil, your corpus (papers, clinical notes, legal texts) and the model weights stay in the country. That helps with LGPD compliance and keeps you in control of the trained model, without sending sensitive data to foreign APIs.

Conclusion

Adapting an LLM to your domain is no longer a privilege reserved for those with a cluster. With QLoRA, a 24GB GPU, and a well-curated corpus, any lab in Brazil can have a model tuned for its task โ€” paying by the hour in reais, keeping data in-country, and staying realistic about what a single GPU does. Start small, evaluate honestly, and scale only when you need to.

Read next: AI for researchers without the cluster queue ยท Open-source LLM comparison 2026 ยท How to choose the right GPU