Cheapest GPU to fine-tune granite 3b code base 2k
Estimated VRAM requirements and live hourly training costs for QLoRA (4-bit base + LoRA adapters) and standard BF16 LoRA fine-tuning.
Cheapest GPUs for QLoRA fine-tuning granite-3b-code-base-2k (~7 GB VRAM)
| GPU setup | Provider | Total VRAM | Hourly | Spot / hr | Est. 10-hour run | Rent |
|---|---|---|---|---|---|---|
| 1x NVIDIA L4 Cheapest | Vast.ai | 24 GB | $0.32/hr | $0.25/hr | $3.20 | Launch ↗ |
| 1x NVIDIA RTX 4090 | TensorDock | 24 GB | $0.38/hr | - | $3.80 | Launch ↗ |
| 1x NVIDIA RTX A6000 | Vast.ai | 48 GB | $0.40/hr | $0.31/hr | $4.00 | Launch ↗ |
| 1x NVIDIA RTX A6000 | TensorDock | 48 GB | $0.45/hr | - | $4.50 | Launch ↗ |
| 1x NVIDIA RTX 4090 | Vast.ai | 24 GB | $0.45/hr | $0.29/hr | $4.50 | Launch ↗ |
| 1x NVIDIA RTX 5090 | Vast.ai | 32 GB | $0.53/hr | $0.40/hr | $5.30 | Launch ↗ |
| 1x NVIDIA L4 | Google Cloud | 24 GB | $0.56/hr | $0.24/hr | $5.60 | Launch ↗ |
| 1x NVIDIA A100 80GB SXM | Vast.ai | 80 GB | $0.58/hr | $0.42/hr | $5.80 | Launch ↗ |
Cheapest GPUs for BF16 LoRA fine-tuning granite-3b-code-base-2k (~15 GB VRAM)
| GPU setup | Provider | Total VRAM | Hourly | Est. 10-hour run | Rent |
|---|---|---|---|---|---|
| 1x NVIDIA L4 | Vast.ai | 24 GB | $0.32/hr | $3.20 | Launch ↗ |
| 1x NVIDIA RTX 4090 | TensorDock | 24 GB | $0.38/hr | $3.80 | Launch ↗ |
| 1x NVIDIA RTX A6000 | Vast.ai | 48 GB | $0.40/hr | $4.00 | Launch ↗ |
| 1x NVIDIA RTX A6000 | TensorDock | 48 GB | $0.45/hr | $4.50 | Launch ↗ |
| 1x NVIDIA RTX 4090 | Vast.ai | 24 GB | $0.45/hr | $4.50 | Launch ↗ |
| 1x NVIDIA RTX 5090 | Vast.ai | 32 GB | $0.53/hr | $5.30 | Launch ↗ |
| 1x NVIDIA L4 | Google Cloud | 24 GB | $0.56/hr | $5.60 | Launch ↗ |
| 1x NVIDIA A100 80GB SXM | Vast.ai | 80 GB | $0.58/hr | $5.80 | Launch ↗ |
QLoRA vs. BF16 LoRA training guide
Memory breakdown: Fine-tuning granite 3b code base 2k (3.5B parameters) adds optimizer states, gradients, and activation memory on top of base weights. QLoRA keeps the base model in 4-bit NF4 (~4 GB) and brings total training VRAM to roughly 7 GB, while full BF16 LoRA requires 15 GB. Use gradient checkpointing and micro-batch size 1–2 if you are close to the GPU VRAM ceiling.
Training budget & spot savings: At $0.32/hr on 1× NVIDIA L4 (Vast.ai), a 10-hour QLoRA job costs $3.20 and a 50-hour run costs $16. Saving checkpoints to network storage every 30 minutes lets you use spot instances at $0.25/hr ($2.50 per 10h run).
Frequently asked questions
How much VRAM is needed to fine-tune granite 3b code base 2k?
QLoRA fine-tuning (4-bit frozen base weights + 16-bit LoRA adapters + AdamW optimizer states) requires ~7 GB VRAM, starting at $0.32/hr on 1× NVIDIA L4. Standard BF16 LoRA requires ~15 GB VRAM.
How much does a 10-hour or 50-hour granite-3b-code-base-2k training run cost?
On 1× NVIDIA L4 (Vast.ai at $0.32/hr), a 10-hour QLoRA run costs roughly $3.20 and a 50-hour run costs $16.00, or $12.50 on spot instances with checkpointing.