Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

step3 rlhf traning: RuntimeError: torch.cat(): expected a non-empty list of Tensors #691

Closed
JackHenry1992 opened this issue Aug 17, 2023 · 2 comments

Comments

@JackHenry1992
Copy link

JackHenry1992 commented Aug 17, 2023

Train RLHF- phase, encountered error:

Traceback (most recent call last):
  File "applications/DeepSpeed-Chat/training/step3_rlhf_finetuning/main.py", line 586, in <module>
    main()
  File "applications/DeepSpeed-Chat/training/step3_rlhf_finetuning/main.py", line 469, in main
    out = trainer.generate_experience(batch_prompt['prompt'],
  File "/applications/DeepSpeed-Chat/training/step3_rlhf_finetuning/ppo_trainer.py", line 119, in generate_experience
    seq = self._generate_sequence(prompts, mask, step)
  File "applications/DeepSpeed-Chat/training/step3_rlhf_finetuning/ppo_trainer.py", line 113, in _generate_sequence
    out_seq = torch.cat(out_seq, dim=0)  # concate output in the batch dim
RuntimeError: torch.cat(): expected a non-empty list of Tensors

Using A100 cuda=11.8, torch=2.0.0, python=3.10.12, deepspeed=0.10.0, transformers=4.30.2
training script config:

ACTOR_ZERO_STAGE=2
CRITIC_ZERO_STAGE=3
ACTOR_MODEL_PATH=../step1_supervised_finetuning/output_opt6.7b
CRITIC_MODEL_PATH=../step2_reward_model_finetuning/output_opt125m
@iamsile
Copy link

iamsile commented Aug 19, 2023

it seems out_seq is None, you can check out_seq

@koking0
Copy link

koking0 commented Oct 31, 2023

@JackHenry1992 me too, how to solve this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants