Closed
Description
Hi,I got the following warning when using a single machine for multi-gpu training
/usr/local/lib/python3.10/dist-packages/unsloth/__init__.py:23: UserWarning: Unsloth: 'CUDA_VISIBLE_DEVICES' is currently 0,1,2,3 but we require 'CUDA_VISIBLE_DEVICES=0' We shall set it ourselves.
How does this affect my training?,The training framework uses:LLaMA-Factory
Metadata
Metadata
Assignees
Labels
No labels
Activity
danielhanchen commentedon Dec 26, 2023
@fst813 Oh Unsloth currently only works on 1 GPU (multi GPU in a future release). So it'll just use 1 GPU for now
fst813 commentedon Dec 26, 2023
I now use a single machine with multiple gpus(4 gpus), and found that the training speed has been significantly improved, and the loss is normal. Will using unsloth on only one gpu also increase the training speed?
danielhanchen commentedon Dec 26, 2023
@fst813 Well the point of multi GPUs is you can consume more batches quickly. I'm still working on multi GPU support, but in theory Unsloth on 1 GPU will most likely not trump over 4 GPUs, but you're more than happy to try it out and see!
fst813 commentedon Dec 26, 2023
@danielhanchen What I mean is that I use 4 gpus to train one of them using unsloth faster than simply using 4 gpus.
danielhanchen commentedon Dec 26, 2023
@fst813 Wait so are you implying that using Unsloth on 1 GPU actually is faster than 4 GPUs? Sorry maybe I misunderstood!
fst813 commentedon Dec 26, 2023
@danielhanchen I used Unsloth and 4 gpus for training at the same time. I read the log and it said that the Unsloth was only used on one GPU , and the other three gpus were not used. But during the training process, all 4 gpus are participating in the training. The other three gpus do not useUnsloth calculations, but they can work together.
danielhanchen commentedon Dec 26, 2023
@fst813 Oh do you know the GPU utilization for the other 3 GPUs? That's super interesting!
fst813 commentedon Dec 26, 2023
GPU utilization,4 gpus are all the same
[-]multigpu[/-][+]CUDA_VISIBLE_DEVICES[/+]danielhanchen commentedon Dec 26, 2023
@fst813 OOHH so essentially 3 GPUs are using Llama-Factory's original code, whilst maybe GPU-0 uses Unsloth?
fst813 commentedon Dec 26, 2023
Maybe.
Please tell me when will multi-gpus training be supported?
danielhanchen commentedon Dec 26, 2023
@fst813 We're still working on it, so not exactly sure when sadly
fst813 commentedon Dec 26, 2023
Okay!Thanks
danielhanchen commentedon Dec 26, 2023
Coolies! I'll close this for now!
nmd2k commentedon Feb 2, 2024
Are Unsloth support multi-gpus training yet?
Bug fixes (unslothai#53)
Bug fixes (unslothai#53)
Bug fixes (unslothai#53)
Studio sd.cpp: pin the prebuilt resynced with upstream master-1056 (u…