Skip to Content
gpuvoxDocumentation
Guides

Several GPUs

Use every GPU of a 2× or 4× machine.

nvidia-smi -L                    # list the GPUs
nvidia-smi topo -m               # how they are connected

Choose what each process sees

CUDA_VISIBLE_DEVICES=0 python a.py &   # one job per GPU
CUDA_VISIBLE_DEVICES=1 python b.py &

One model across several GPUs

vllm serve Qwen/Qwen2.5-32B-Instruct --tensor-parallel-size 2

The number must divide the model's attention heads; 2 and 4 almost always work.

Is two of a smaller card better than one big one?

For serving, one big card is simpler and avoids the traffic between GPUs. Two cards win when no single card has enough memory, or when you run two independent jobs.