Unsloth 2x Faster Fine-tuning
Fine-tune LLMs 2x faster with 70% less VRAM using Unsloth on Clore.ai
Unsloth rewrites the performance-critical parts of HuggingFace Transformers with hand-optimized Triton kernels, delivering 2x training speed and 70% VRAM reduction with zero accuracy loss. It is a drop-in replacement — your existing TRL/PEFT scripts work unchanged after swapping the import.
All examples run on GPU servers rented through the CLORE.AI Marketplace.
Key Features
2x faster training — custom Triton kernels for attention, RoPE, cross-entropy, and RMS norm
70% less VRAM — intelligent gradient checkpointing and memory-mapped weights
Drop-in HuggingFace replacement — one import change, nothing else
QLoRA / LoRA / full fine-tune — all modes supported out of the box
Native export — save directly to GGUF (all quant types), LoRA adapters, or merged 16-bit
Broad model coverage — Llama 3.x, Mistral, Qwen 2.5, Gemma 2, DeepSeek-R1, Phi-4, and more
Free and open source (Apache 2.0)
Requirements
GPU
RTX 3060 12 GB
RTX 4090 24 GB
VRAM
10 GB
24 GB
RAM
16 GB
32 GB
Disk
40 GB
80 GB
CUDA
12.8+
12.8+
Python
3.10
3.11
Clore.ai pricing: RTX 4090 ≈ $0.14–0.42/hr · RTX 3090 ≈ $0.07–0.21/hr · RTX 3060 ≈ $0.03–0.07/hr
A 7B model with 4-bit QLoRA fits in ~10 GB VRAM, making even an RTX 3060 viable.
Quick Start
1. Install Unsloth
2. Load a Model with 4-bit Quantization
3. Apply LoRA Adapters
4. Prepare Data and Train
Exporting the Model
Save LoRA Adapter Only
Merge and Save Full Model (float16)
Export to GGUF for Ollama / llama.cpp
After export, serve with Ollama:
Usage Examples
Fine-Tune on a Custom Chat Dataset
DPO / ORPO Alignment Training
VRAM Usage Reference
Llama 3.1 8B
4-bit
QLoRA
~10 GB
RTX 3060
Llama 3.1 8B
16-bit
LoRA
~18 GB
RTX 3090
Qwen 2.5 14B
4-bit
QLoRA
~14 GB
RTX 3090
Mistral 7B
4-bit
QLoRA
~9 GB
RTX 3060
DeepSeek-R1 7B
4-bit
QLoRA
~10 GB
RTX 3060
Llama 3.3 70B
4-bit
QLoRA
~44 GB
2× RTX 3090
Tips
Always use
use_gradient_checkpointing="unsloth"— this is the single biggest VRAM saver, unique to UnslothSet
lora_dropout=0— Unsloth's Triton kernels are optimized for zero dropout and run fasterUse
packing=Truein SFTTrainer to avoid padding waste on short examplesStart with
r=16for LoRA rank — increase to 32 or 64 only if validation loss plateausMonitor with wandb — add
report_to="wandb"in TrainingArguments for loss trackingBatch size tuning — increase
per_device_train_batch_sizeuntil you approach VRAM limit, then compensate withgradient_accumulation_steps
Troubleshooting
OutOfMemoryError during training
Lower batch size to 1, reduce max_seq_length, or use 4-bit quant
Triton kernel compilation errors
Run pip install triton --upgrade and ensure CUDA toolkit matches
Slow first step (compiling)
Normal — Triton compiles kernels on first run, cached afterwards
bitsandbytes CUDA version error
Install matching version: pip install bitsandbytes --upgrade
Loss spikes during training
Lower learning rate to 1e-4, add warmup steps
GGUF export crashes
Ensure enough RAM (2× model size) and disk space for the conversion
Resources
Last updated
Was this helpful?