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

[BLIP-2] Improve conversion script #24854

Merged
merged 9 commits into from
Sep 14, 2023

Conversation

NielsRogge
Copy link
Contributor

What does this PR do?

When investigating an issue reported here, I've reran and improved BLIP-2's conversion script (based on InstructBLIP).

It's important to compare apples-to-apples, so I had to fork the LAVIS repo and make sure the original model is also run in float32.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jul 17, 2023

The documentation is not available anymore as the PR was closed or merged.

@NielsRogge NielsRogge requested a review from amyeroberts July 31, 2023 15:20
Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work updating this! In particular getting the comparison with the original model. It makes the script a lot cleaner.

Two main comments:

  • Does this mean that the currently converted checkpoints on the hub need to be updated?
  • The doc tests for the model should be added to documentation_tests.txt

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing and iterating!

@NielsRogge
Copy link
Contributor Author

Feel free to merge :)

@amyeroberts amyeroberts merged commit 5469c18 into huggingface:main Sep 14, 2023
parambharat pushed a commit to parambharat/transformers that referenced this pull request Sep 26, 2023
* Improve conversion script

* Add int8 code example

* Update tip

* Fix code

* Fix code snippet

* Add nucleus sampling

* More improvements

* Address comments

* Address comments
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

Successfully merging this pull request may close these issues.

3 participants