Tier 3 was local inference. Tier 4 is when the job is training adapters: LoRA and QLoRA on a workstation with 48–80 GB per card, often 2–4 GPUs (A6000, L40S, A100 80 GB, RTX 6000 Ada). Volume 06 optimizer states and mixed precision come back; Volume 12 PEFT is the method. Full 70B FT still belongs on Tier 5.
If you only chat with a 13B, you overbought. If you QLoRA 70B on a 3060, you underbought. This lecture is that sizing line.
Learning Objectives
By the end of this lesson, students should be able to:
- Contrast infer VRAM vs train VRAM (activations + Adam + grads vs weights + KV).
- Size QLoRA 7B/13B/70B vs LoRA-FP16 vs full FT on 48 vs 80 GB.
- Explain why multi-GPU (DDP) helps batch/seq more than “more CUDA cores.”
- Sketch a PEFT + bitsandbytes training loop that matches Vol. 12 QLoRA.
- List workstation extras: 128+ GB host RAM, NVMe, cooling, PCIe topology.
- Know when to rent a cloud 80 GB box instead of buying four A6000s.
Tier 4 (Fine-Tuning Workstation) is a 1–4 GPU machine with 48–80 GB VRAM per card, provisioned to train PEFT adapters (LoRA/QLoRA) and occasionally small full fine-tunes. Inference still works (it is a superset of Tier 3), but the BOM is driven by optimizer + activation memory, not by decode KV alone. Interconnect is typically PCIe (sometimes NVLink on dual A6000); it is not an InfiniBand pod.
Train Memory vs Infer Memory
| Resident | Inference (Tiers 2–3) | LoRA FP16 | QLoRA (NF4 base) | Full FT Adam |
|---|---|---|---|---|
| Base weights | FP16/INT4 | FP16 frozen | NF4 frozen (~0.5 B/param) | FP16/BF16 trainable |
| Adapters | — | Small FP16 BA + grads + Adam | Same on adapters | N/A (all W) |
| Activations | Prefill scratch; FA helps | Seq × batch; checkpointing optional | Same | Same, often larger batch |
| KV cache | Dominant at decode | Not the train bottleneck | Not the train bottleneck | Not the train bottleneck |
| Adam states | None | Only on LoRA params | Only on LoRA params | ~8–16 B/param extra |
Rule-of-Thumb Fit (single GPU, QLoRA SFT)
48 GB (A6000 class)
- QLoRA 7B/13B comfortable (2k–8k)
- QLoRA 34B possible with short seq / checkpoint
- LoRA-FP16 13B tight; 34B usually no
- Full FT 7B maybe; 13B+ no
80 GB (A100/H100 80)
- QLoRA 70B is the headline use
- LoRA-FP16 13B–34B realistic
- Full FT 13B still painful without ZeRO
- Rent before buying a pile of 80s
2–4× GPU DDP
- Larger global batch / faster epochs
- Does not magically shard a 70B full FT
- PCIe is enough for LoRA; NVLink nicer
- FSDP/ZeRO → you are peeking at Tier 5
QLoRA Sketch on a Workstation
Same bitsandbytes config as Module 18.3; now we attach PEFT and train. Gradient checkpointing trades compute for activation VRAM—mandatory on long seq.
Buy, Rent, or Stay API + Hosted FT
Own/rent Tier 4 when
- Private corpora cannot hit a public FT API
- You iterate LoRA weekly (productization)
- Several mid-size jobs share the box (queue)
- You already have 18.2 Docker + experiment tracking
Skip owning silicon
- One-off SFT: rent A100 80 GB for a weekend
- Hosted FT APIs (Tier 1-adjacent) meet the DPA
- You only needed better prompts, not weights
- Full 70B FT / multi-node → Tier 5, not a desk
Related Lectures
| Lecture | Why it sits beside Tier 4 |
|---|---|
| Vol. 12 LoRA / QLoRA | The methods you are sizing for |
| Full fine-tuning | Why Adam blows past 48 GB |
| Vol. 06 Mixed Precision | BF16 train on Ampere+ |
| 18.3 Quantization | NF4 base load |
| Vol. 06 Distributed Training | DDP vs real sharding |
| Tier 5 | NVLink/IB clusters |
“If 7B QLoRA fits 16 GB, 70B QLoRA fits 16×10 = wait no, it scales with params.” 70B NF4 weights alone are ~35–40 GB; plus activations you want 80 GB. Second: “Two 24 GB 4090s equal one 48 GB for QLoRA 34B.” Without tensor/pipeline parallel you have two separate 24 GB pools—DDP replicates the model. Third: “LoRA train VRAM ≈ infer VRAM.” Activations + adapter Adam dominate; checkpointing is not optional folklore.
Knowledge Check
- Short Answer: What VRAM-per-card band defines Tier 4? Answer: About 48–80 GB per GPU, often multi-GPU.
- True/False: Tier 4 is primarily an inference tier like Tier 3. Answer: False—it is sized for LoRA/QLoRA training (infer is a bonus).
- Multiple Choice: QLoRA 70B single-GPU home: (a) 3060 12 GB, (b) A100 80 GB, (c) Raspberry Pi. Answer: (b).
- Short Answer: Name two extra VRAM residents in training vs infer. Answer: Activations (backward), gradients, optimizer states (any two).
- True/False: DDP on 2×24 GB automatically shards a 34B FP16 base across cards. Answer: False—DDP replicates; you need TP/PP/ZeRO to shard.
- Multiple Choice: QLoRA base dtype: (a) NF4/4-bit + LoRA adapters, (b) FP64 full W, (c) CSS. Answer: (a).
- Short Answer: Why enable gradient checkpointing on long sequences? Answer: Recompute activations to cut peak VRAM.
- True/False: Full FT Adam on 13B typically fits a single 48 GB card comfortably. Answer: False—optimizer+grads usually demand ZeRO/FSDP or 80 GB+ / smaller model.
- Multiple Choice: One-off weekend SFT with no data-residency issue: (a) always buy 4×A6000, (b) rent 80 GB cloud, (c) train on a phone NPU. Answer: (b).
- Short Answer: When do you leave Tier 4 for Tier 5? Answer: Multi-node distributed training, NVLink/IB fabrics, full large-model FT / pretrain.
Key Takeaways
- Tier 4 = 48–80 GB/card workstation for LoRA/QLoRA, not just bigger chat.
- Train memory ≠ infer memory; checkpointing and PEFT are the levers.
- DDP replicates; sharding is Tier 5 territory.
- Rent 80 GB for one-offs; own silicon for weekly private FT.
- Continue with Tier 5 Production Cluster.
Lab: Size three jobs on paper: (1) QLoRA 7B seq 2048, (2) QLoRA 70B seq 4096, (3) full FT 13B Adam. Assign each to 12 / 24 / 48 / 80 GB or “cluster.” If GPUs exist, run a 10-step QLoRA 7B and record nvidia-smi vs infer-only load.
Discussion: Should a startup buy dual A6000s or use a hosted FT API + Tier 1 serving? Include data residency and iteration cadence.
Recap: Tier 4 sizes LoRA/QLoRA workstations at 48–80 GB per card. Continue with Tier 5.