ms-swift icon indicating copy to clipboard operation
ms-swift copied to clipboard

swift训练reward model报错

Open Gpandaa opened this issue 1 year ago • 5 comments

不支持 reward model 训练 报错信息如下: rlhf.py: error: argument --rlhf_type/--rlhf-type: invalid choice: 'rm' (choose from 'dpo', 'orpo', 'simpo', 'kto', 'cpo') W1224 14:36:14.072000 236372 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 236538 closing signal SIGTERM W1224 14:36:14.077000 236372 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 236539 closing signal SIGTERM W1224 14:36:14.079000 236372 site-packages/torch/distributed/elastic/multiprocessing/api.py:897] Sending process 236540 closing signal SIGTERM E1224 14:36:14.208000 236372 site-packages/torch/distributed/elastic/multiprocessing/api.py:869] failed (exitcode: 2) local_rank: 0 (pid: 236537) of binary: /opt/nas/p/conda/envs/swift3_qwen2vl/bin/python Traceback (most recent call last): File "/opt/nas/p/conda/envs/swift3_qwen2vl/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/opt/nas/p/conda/envs/swift3_qwen2vl/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/opt/nas/p/conda/envs/swift3_qwen2vl/lib/python3.10/site-packages/torch/distributed/run.py", line 923, in main() File "/opt/nas/p/conda/envs/swift3_qwen2vl/lib/python3.10/site-packages/torch/distributed/elastic/multiprocessing/errors/init.py", line 355, in wrapper return f(*args, **kwargs) File "/opt/nas/p/conda/envs/swift3_qwen2vl/lib/python3.10/site-packages/torch/distributed/run.py", line 919, in main run(args) File "/opt/nas/p/conda/envs/swift3_qwen2vl/lib/python3.10/site-packages/torch/distributed/run.py", line 910, in run elastic_launch( File "/opt/nas/p/conda/envs/swift3_qwen2vl/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 138, in call return launch_agent(self._config, self._entrypoint, list(args)) File "/opt/nas/p/conda/envs/swift3_qwen2vl/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 269, in launch_agent raise ChildFailedError( torch.distributed.elastic.multiprocessing.errors.ChildFailedError:

Hardware and System info CUDA 11.8/Linux 5.4.119-19-0009.11/GPU A800-SXM4-80GB/torch 2.5.1; transformers 4.46.3; tokenizers 0.20.3; swift 3.0.0.dev0;

Gpandaa avatar Dec 24 '24 06:12 Gpandaa

main分支已经修复了

pip install git+https://github.com/modelscope/ms-swift.git

Jintao-Huang avatar Dec 24 '24 08:12 Jintao-Huang

main分支已经修复了

pip install git+https://github.com/modelscope/ms-swift.git

我看目前doc里写的‘RM/PPO能力3.0版本尚不支持,请使用2.6.1版本’,请问现在的版本是都支持了嘛?

Yiwei98 avatar Dec 25 '24 03:12 Yiwei98

rm支持的 ppo还不支持

Jintao-Huang avatar Dec 26 '24 07:12 Jintao-Huang

请问训练reward model的脚本和数据集有样例吗?谢谢!

waltonfuture avatar Jan 06 '25 08:01 waltonfuture

已经支持了RM和PPO了

多模态PPO还不支持,未来会支持

请参考 https://github.com/modelscope/ms-swift/tree/main/examples/train/rlhf

Jintao-Huang avatar Feb 05 '25 02:02 Jintao-Huang