Since deepspeed is not compatible with bitsandbytes according to this issue, qlora finetuning is not supported with deepspeed zero3 enviroment.
Solution
According to some documents, if you still want to train quantized model with deepspeed. There are two ways to achieve this:
Adopting deepspeed zero2.
Adopting accelerate to manage training progress. Please refer to accelerate document.
BUG 2
AttributeError: 'torch.dtype' object has no attribute 'element_size'
Solution
Updating torch==2.2.0
BUG 3
You are calling `save_pretrained` to a 4-bit converted model, but your `bitsandbytes` version doesn't support it. If you want to save 4-bit models, make sure to have `bitsandbytes>=0.41.3` installed.
BUG 1
Since
deepspeed
is not compatible withbitsandbytes
according to this issue, qlora finetuning is not supported with deepspeed zero3 enviroment.Solution
According to some documents, if you still want to train quantized model with deepspeed. There are two ways to achieve this:
deepspeed
zero2.accelerate
to manage training progress. Please refer toaccelerate
document.BUG 2
AttributeError: 'torch.dtype' object has no attribute 'element_size'
Solution
Updating
torch==2.2.0
BUG 3
Solution
Updating
bitsandbytes==0.43.0