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

AttributeError: 'MultimodalDPOTrainer' object has no attribute 'is_vision_model' #714

Open
3 tasks
shengyuwoo opened this issue Nov 20, 2024 · 2 comments
Open
3 tasks

Comments

@shengyuwoo
Copy link

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.

Describe the bug

MPO训练时在trainer_dpo.py脚本中缺少对 self.is_vision_model、self.aux_loss_enabled等变量的定义,导致在 MultimodalDPOTrainer 类中无法使用这些属性。

Reproduction

File "/code/InternVL/internvl_chat/internvl/train/trainer_dpo.py", line 193, in get_batch_loss_metrics
forward_output = self.concatenated_forward(model, batch)
File "/code/InternVL/internvl_chat_mpo/internvl/train/trainer_dpo.py", line 100, in concatenated_forward
is_vision_model=self.is_vision_model,

Environment

transformers             4.45.0
trl                      0.9.2

Error traceback

No response

@Weiyun1025
Copy link
Collaborator

你好,可以试一下安装transformers==4.37.2trl==0.9.6,这几个参数都是trl.DPOTrainer自带的

@shengyuwoo
Copy link
Author

你好,可以试一下安装transformers==4.37.2trl==0.9.6,这几个参数都是trl.DPOTrainer自带的

好的,谢谢。

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

2 participants