简于形,大于界

GPU池

这份快速指南将引导你如何使用GPU池。

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

硬件

硬件需求

Bits7B13B30B65B8X7B
Full16 (2 bytes)160GB320GB600GB1200GB900GB
Freeze16 (2 bytes)20GB40GB120GB240GB200GB
LoRA16 (2 bytes)16GB32GB80GB160GB120GB
QLoRA8 (1 bytes)10GB16GB40GB80GB80GB
QLoRA4 (0.5 bytes)6GB12GB24GB48GB32GB
计算公式(估算): 显存 = 参数量 x 字节数 (QLoRA 4) = 30,000,000,000 * 0.5 = 15000000000 bytes 15000000000 bytes / 1024 /1024 /1024 = 13.97G 简化为: 15000000000 bytes / 1000 /1000 /1000 = 15G