I am getting the following error when doing RLHF training:
Traceback (most recent call last):
File "/code/main.py", in
rlhf_trainer.train()
File "/code/trainer.py", in train
self.learn(memories)
File "/code/trainer.py", in learn
surr1 = advantages * ratios
RuntimeError: The size of tensor a (29) must match the size of tensor b (38) at non-singleton dimension 1
And I output some shape of the tensors:
rewards shape: torch.Size([1, 29])
old_values shape: torch.Size([1, 29])
actions_logits shape: torch.Size([1, 38, 50272])
old_actions_log_probs shape: torch.Size([1, 38])
ratios shape: torch.Size([1, 38])
advantages shape: torch.Size([1, 29])
This seems to be due to the fact that my actor and critic use different family models (opt-125m and gpt2)?
I am getting the following error when doing RLHF training:
Traceback (most recent call last):
File "/code/main.py", in
rlhf_trainer.train()
File "/code/trainer.py", in train
self.learn(memories)
File "/code/trainer.py", in learn
surr1 = advantages * ratios
RuntimeError: The size of tensor a (29) must match the size of tensor b (38) at non-singleton dimension 1
And I output some shape of the tensors:
rewards shape: torch.Size([1, 29])
old_values shape: torch.Size([1, 29])
actions_logits shape: torch.Size([1, 38, 50272])
old_actions_log_probs shape: torch.Size([1, 38])
ratios shape: torch.Size([1, 38])
advantages shape: torch.Size([1, 29])
This seems to be due to the fact that my actor and critic use different family models (opt-125m and gpt2)?