CUDA Setup & Unsloth Package Installation
Unsloth accelerates fine-tuning by 2x while consuming 70% less VRAM compared to standard HuggingFace PEFT models.
pip install torch trl peft datasets bitsandbytes
import torch
print(f"PyTorch Version: {torch.__version__}")
print(f"CUDA Available: {torch.cuda.is_available()}")
if torch.cuda.is_available():
print(f"Device Name: {torch.cuda.get_device_name(0)}")