使用llama_factory + deepspeed stag 3 offload 报错 pydantic_core._pydantic_core.ValidationError: 1 validation error for DeepSpeedZeroConfig
–deepspeed cache/ds_z3_offload_config.json
报错异常
环境状况:
nvidia-smi
nvcc -V
python -c "import torch; print(torch.__version__); print(torch.cuda.is_available())"
考虑处理方向:变更deepspeed版本,因deepspeed小编是自行安装,安装的最新版,为15.0所以报错,当然过老的版本也会报错,Git上看到用当前版本较多进行更换,问题解决!
// 变更deepspeed 版本
pip install deepspeed==0.14.4 -i https://pypi.tuna.tsinghua.edu.cn/simple
当然也可以安装更低的版本,但是不要太低!
可以考虑匹配降级:
pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cu121
pip install deepspeed==0.14.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
python -c "import torch; print(torch.__version__); print(torch.cuda.is_available())"
// 变更deepspeed 版本
pip install deepspeed==0.14.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
亲测没问题!