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

[feat] Add ViT modules #1099

Closed

Conversation

Add modified huggingface ViT modules from megaVLT
supporting attention masks

[ghstack-poisoned]
Add modified huggingface ViT modules from megaVLT
supporting attention masks

[ghstack-poisoned]
Ryan-Qiyu-Jiang added a commit to Ryan-Qiyu-Jiang/mmf that referenced this pull request Sep 22, 2021
Add modified huggingface ViT modules from megaVLT
supporting attention masks

ghstack-source-id: dbb94a245b20194b1b906973124a66171c32b12e
Pull Request resolved: facebookresearch#1099
@Ryan-Qiyu-Jiang
Copy link
Contributor Author

@Ryan-Qiyu-Jiang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

@Ryan-Qiyu-Jiang
Copy link
Contributor Author

@Ryan-Qiyu-Jiang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

@Ryan-Qiyu-Jiang
Copy link
Contributor Author

@Ryan-Qiyu-Jiang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Ryan-Qiyu-Jiang added a commit to Ryan-Qiyu-Jiang/mmf that referenced this pull request Sep 30, 2021
Add modified huggingface ViT modules from megaVLT
supporting attention masks

ghstack-source-id: 1cc49c5bdec03b5538496fc9d7a7e02a86d87281
Pull Request resolved: facebookresearch#1099
Ryan-Qiyu-Jiang added a commit to Ryan-Qiyu-Jiang/mmf that referenced this pull request Oct 1, 2021
Add modified huggingface ViT modules from megaVLT
supporting attention masks

ghstack-source-id: 1cc49c5bdec03b5538496fc9d7a7e02a86d87281
Pull Request resolved: facebookresearch#1099
Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

@Ryan-Qiyu-Jiang
Copy link
Contributor Author

@Ryan-Qiyu-Jiang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Ryan-Qiyu-Jiang added a commit to Ryan-Qiyu-Jiang/mmf that referenced this pull request Oct 1, 2021
Add modified huggingface ViT modules from megaVLT
supporting attention masks

ghstack-source-id: a2c4616cd212dfde5903cd2188e1e5f4f61060ea
Pull Request resolved: facebookresearch#1099
Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

@Ryan-Qiyu-Jiang
Copy link
Contributor Author

@Ryan-Qiyu-Jiang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

@Ryan-Qiyu-Jiang
Copy link
Contributor Author

@Ryan-Qiyu-Jiang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

@Ryan-Qiyu-Jiang
Copy link
Contributor Author

@Ryan-Qiyu-Jiang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

@Ryan-Qiyu-Jiang
Copy link
Contributor Author

@Ryan-Qiyu-Jiang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

@Ryan-Qiyu-Jiang
Copy link
Contributor Author

@Ryan-Qiyu-Jiang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

Add modified huggingface ViT modules from megaVLT
supporting attention masks

Differential Revision: [D31117429](https://our.internmc.facebook.com/intern/diff/D31117429)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@Ryan-Qiyu-Jiang has updated the pull request. You must reimport the pull request before landing.

@Ryan-Qiyu-Jiang
Copy link
Contributor Author

@Ryan-Qiyu-Jiang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

1 similar comment
@Ryan-Qiyu-Jiang
Copy link
Contributor Author

@Ryan-Qiyu-Jiang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

facebook-github-bot pushed a commit that referenced this pull request Nov 2, 2021
Summary:
Pull Request resolved: #1099

Add modified huggingface ViT modules from megaVLT
supporting attention masks

Test Plan:
**Unit Test.**
Tests ViTModel, which uses all ViT submodules. Test checks if ViTModel can successfully perform a forward pass.

Unit test is skipped in older transformer versions, preserving backwards compatibility for unit tests.

**Modules used in ViLT Training**
ViT modules are used in the ViLT model which successfully performs pretraining and finetuning, ViLT model tested using mmf_run on VQA2.

**Tested Backwards Compatibility**
ViT modules backward compatibility with previous versions of transformers tested directly with
* 3.4.0 (throws helpful upgrade transformers version for ViT related modules)
* 4.5.0 (__spec missing error patched in previous transformers version bump), and
* 4.10.1

Reviewed By: ebsmothers

Differential Revision: D31117429

Pulled By: Ryan-Qiyu-Jiang

fbshipit-source-id: 9a473eb5d7e0183711d8d19dcd8f2b77b7792e03
@facebook-github-bot facebook-github-bot deleted the gh/ryan-qiyu-jiang/4/head branch December 3, 2021 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants