Fine-tune LLM
Fine-tune custom LLMs with efficient techniques on Clore.ai GPUs
Train your own custom LLM using efficient fine-tuning techniques on CLORE.AI GPUs.
All examples can be run on GPU servers rented through CLORE.AI Marketplace.
Renting on CLORE.AI
Visit CLORE.AI Marketplace
Filter by GPU type, VRAM, and price
Choose On-Demand (fixed rate) or Spot (bid price)
Configure your order:
Select Docker image
Set ports (TCP for SSH, HTTP for web UIs)
Add environment variables if needed
Enter startup command
Select payment: CLORE, BTC, or USDT/USDC
Create order and wait for deployment
Access Your Server
Find connection details in My Orders
Web interfaces: Use the HTTP port URL
SSH:
ssh -p <port> root@<proxy-address>
What is LoRA/QLoRA?
LoRA (Low-Rank Adaptation) - Train small adapter layers instead of full model
QLoRA - LoRA with quantization for even less VRAM
Train 7B model on single RTX 3090
Train 70B model on single A100
Requirements
Quick Deploy
Docker Image:
Ports:
Command:
Accessing Your Service
After deployment, find your http_pub URL in My Orders:
Go to My Orders page
Click on your order
Find the
http_pubURL (e.g.,abc123.clorecloud.net)
Use https://YOUR_HTTP_PUB_URL instead of localhost in examples below.
Dataset Preparation
Chat Format (Recommended)
Instruction Format
Alpaca Format
Supported Modern Models (2025)
Llama 3.1 / 3.3 8B
meta-llama/Llama-3.1-8B-Instruct
12GB
Qwen 2.5 7B / 14B
Qwen/Qwen2.5-7B-Instruct
12GB / 20GB
DeepSeek-R1-Distill (7B/8B)
deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
12GB
Mistral 7B v0.3
mistralai/Mistral-7B-Instruct-v0.3
12GB
Gemma 2 9B
google/gemma-2-9b-it
14GB
Phi-4 14B
microsoft/phi-4
20GB
QLoRA Fine-tuning Script
Modern example with PEFT 0.14+, Flash Attention 2, DoRA support, and Qwen2.5 / DeepSeek-R1 compatibility:
Flash Attention 2
Flash Attention 2 reduces VRAM usage and speeds up training significantly. Requires Ampere+ GPU (RTX 3090, RTX 4090, A100).
Standard attention (fp16)
~22GB
baseline
Flash Attention 2 (bf16)
~16GB
+30%
Flash Attention 2 + QLoRA
~12GB
+30%
DoRA (Weight-Decomposed LoRA)
DoRA (PEFT >= 0.14) decomposes pre-trained weights into magnitude and direction components. It improves fine-tuning quality, especially for smaller ranks.
Qwen2.5 & DeepSeek-R1-Distill Examples
Qwen2.5 Fine-tuning
DeepSeek-R1-Distill Fine-tuning
DeepSeek-R1-Distill models (Qwen-7B, Qwen-14B, Llama-8B, Llama-70B) are reasoning-focused. Fine-tune to adapt their chain-of-thought style to your domain.
Using Axolotl (Easier)
Axolotl simplifies fine-tuning with YAML configs:
Axolotl Config Examples
Chat Model
Code Model
Merging LoRA Weights
After training, merge LoRA back into base model:
Convert to GGUF
For use with llama.cpp/Ollama:
Monitoring Training
Weights & Biases
TensorBoard
Best Practices
Hyperparameters
batch_size
4
2
1
grad_accum
4
8
16
lr
2e-4
1e-4
5e-5
lora_r
64
32
16
epochs
3
2-3
1-2
Dataset Size
Minimum: 1,000 examples
Good: 10,000+ examples
Quality > Quantity
Avoiding Overfitting
Multi-GPU Training
DeepSpeed config:
Saving & Exporting
Troubleshooting
OOM Errors
Reduce batch size
Increase gradient accumulation
Use
gradient_checkpointing=TrueReduce lora_r
Training Loss Not Decreasing
Check data format
Increase learning rate
Check for data issues
NaN Loss
Reduce learning rate
Use fp32 instead of fp16
Check for corrupted data
Cost Estimate
Typical CLORE.AI marketplace rates (as of 2026):
RTX 3060
~$0.03
~$0.70
~$0.12
RTX 3090
~$0.06
~$1.50
~$0.25
RTX 4090
~$0.10
~$2.30
~$0.40
A100 40GB
~$0.17
~$4.00
~$0.70
A100 80GB
~$0.25
~$6.00
~$1.00
Prices vary by provider and demand. Check CLORE.AI Marketplace for current rates.
📚 See also: How to Fine-Tune LLaMA 3 on a Cloud GPU — Step-by-Step Guide
Save money:
Use the Spot market for interruptible work — about a third of servers price spot below on-demand (median ~13% off), the rest match it
Pay with CLORE tokens
Compare prices across different providers
Last updated
Was this helpful?