ValueError: The current `device_map` had weights offloaded to the disk. Please provide an `offload_folder` for them. Alternatively, make sure you have `safetensors` installed if the model you are using offers the weights in this format.
我出现这个问题的原因是,在对模型进行微调时,将训练设备换位cpu,且用单机训练,所以结合个人情况,改变device_map具体值,在这里方法2较为有效。此问题伴随RuntimeError:An attempt has been made to start a new process before the current process has finished-CSDN博客
解决办法:方法1、安装safetensors包即可;
方法2、device_map = {"": "cpu"}