Few Boundaries, Expandable Box

GPU Pool

This quick guide will guide you on how to use a GPU pool.

CUDA

https://developer.nvidia.com/cuda-downloads
Runtime
1nvcc -V
Driver
1nvidia-smi

PyTorch

https://pytorch.org/get-started/locally/
install
1pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --trusted-host mirrors.aliyun.com
version
1pip show torch
torch-script
1import torch
2print(torch.__version__)
cuda-script
1import torch
2print(torch.cuda.is_available())
3print(torch.version.cuda)
update
1pip install --upgrade pytorch torchvision --trusted-host mirrors.aliyun.com
uninstall
1pip uninstall torch

Hardware

Hardware Requirement

Bits7B13B30B65B8X7B
Full16 (2 bytes)160GB320GB600GB1200GB900GB
Freeze16 (2 bytes)20GB40GB120GB240GB200GB
LoRA16 (2 bytes)16GB32GB80GB160GB120GB
QLoRA8 (1 bytes)10GB16GB40GB80GB80GB
QLoRA4 (0.5 bytes)6GB12GB24GB48GB32GB
Calculation formula (estimation): Memory = Number of parameters × Number of bytes (QLoRA 4) = 30,000,000,000 × 0.5 = 15,000,000,000 bytes 15,000,000,000 bytes / 1024 / 1024 / 1024 = 13.97G Simplified: 15,000,000,000 bytes / 1000 / 1000 / 1000 = 15G