Technical requirements
Training a model requires more GPU power and VRAM than model inference. Prepare a GPU with at least 8 GB of VRAM – the more, the better. You can also train a model using multiple GPUs.
It is recommended to install the latest version of the following packages:
pip install torch torchvision torchaudio pip install bitsandbytes pip install transformers pip install accelerate pip install diffusers pip install peft pip install datasets
Here are the specified packages with the versions I used to write the code samples:
pip install torch==2.1.2 torchvision==0.16.1 torchaudio==2.1.1 pip install bitsandbytes==0.41.0 pip install transformers==4.36.1 pip install accelerate==0.24.1 pip install diffusers==0.26.0 pip install peft==0.6.2 pip install datasets==2.16.0
The training code was tested in the Ubuntu 22.04 x64 version.