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

How to train OFA for VQA in open-ended? #123

Closed
qyc-98 opened this issue Jun 10, 2022 · 10 comments
Closed

How to train OFA for VQA in open-ended? #123

qyc-98 opened this issue Jun 10, 2022 · 10 comments
Assignees

Comments

@qyc-98
Copy link

qyc-98 commented Jun 10, 2022

Dear authors:
Thanks for the great work! In VQA validation, If I want the model to predict the most likely next token (i.e. generating a token in the answer) from the output logits. And then I append this token to the input and repeat this step until the model predicts ⟨EOS⟩. What could I do to achieve it? Thanks a lot!

@qyc-98
Copy link
Author

qyc-98 commented Jun 11, 2022

And I want to train and validate both in this manner. Thanks for your precious time!

@yangapku
Copy link
Member

Hi, currently the VQA task code supports beam-search inference during validation and testing (in contrast with all-candidate inference, please refer to readme), but the finetuning objective still must be constrained with a pre-defined candidate answer set stored in trainval_ans2label.pkl file. We are working to add a new config to support unconstrained finetuning (which does not need a pre-defined candidate answer set). The code update is still under testing and will be merged in this week.

@ilovecv
Copy link

ilovecv commented Jul 7, 2022

@yangapku Hi, any updates on this? Thanks!

@yangapku
Copy link
Member

Hi, a pull request related to this issue #124 has been proposed recently, which will add a new config to activate unconstrained finetuning. However, we find bugs are still existing in this PR, which will result in zero score during evaluation. We are still working on making it function correctly and will merge it ASAP.

@qyc-98
Copy link
Author

qyc-98 commented Jul 26, 2022

Hi,
Thanks for your great job!

@RishabhMaheshwary
Copy link

Any update on this?

@yangapku
Copy link
Member

yangapku commented Sep 21, 2022

@qyc-98 @RishabhMaheshwary @ilovecv Hi, we have found the bug and fixed it! Now the latest codebase supports open-ended (unconstrained) VQA finetuning and evaluation. Please pull the latest code and refer to PR #124 & run_scripts/vqa/train_vqa_distributed.sh (Line 62-68) on how to activate it!

@leng-yue
Copy link

Hi, are there any performance data for the open-ended VQA fine-tuning?

@yangapku
Copy link
Member

@leng-yue We have tested open-ended VQA fine-tuning on OFA-base (without using EMA). It achieves 76.4 score on our VQA validation set. This performance can still be improved by using EMA and further hyper-param tuning.

@leng-yue
Copy link

Thanks for your response, the result looks good :)

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

5 participants