-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
data_collator is not assigned in PPOTrainer #143
Comments
I found this because sentiment-control example ipynb didn't run in my environment. I use A6000 GPU and only added
I saw all inputs(query, responses) are properly in cuda devices. but in forward batching process, they seems to be mapped to CPU. Maybe it's related to recent forward batching update #139 (I'm not sure). I'll update when I figure out something. |
Hi @DaehanKim , Thanks for the report! I think this makes sense and should be replaced as suggested ;) |
Unfortunately, fixing collator alone didn't solve the problem.
This happens because |
I think #144 partially fix the problem, if we assume |
Hi @DaehanKim I think there's some confusion in the
Indeed for the second collator you have no way overwriting it and we always assume CLM objective but for the first one the one you pass will take effect. For your latest error: is it possible that you pass list of lists rather than list of torch.tensors as queries/responses in |
@lvwerra Thank you for correction! I didn't know these two are used in different ways. I think things are wrapped up : so closing the issue. |
https://github.com/lvwerra/trl/blob/main/trl/trainer/ppo_trainer.py#L217
Here dataloader is defined using passed data_collator function.
https://github.com/lvwerra/trl/blob/main/trl/trainer/ppo_trainer.py#L231
but
self.data_collator
is always set toDataCollatorForLanguageModeling(self.tokenizer, mlm=False)
regardless of passeddata_collator
argument.I think it should be something like
The text was updated successfully, but these errors were encountered: