第一个问题——ValueError: Attempting to unscale FP16 gradients.
这个问题尝试了很久,实际上是环境的问题,如果在训练过程中,将fp16设置为true+int8量化,那么是可以正常训练推理的,如果不设置int8量化就会报错
可以尝试改变peft的版本
pip install peft==0.4.0
问题成功解决
第二个问题——type object ‘PPODecorators’ has no attribute ‘empty_cuda_cache’. Did you mean: ‘empty_device_cache’
pip install trl==0.7.2