-
Notifications
You must be signed in to change notification settings - Fork 712
apply output layer pruning #5426
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/5426
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 20d7986 with merge base ad95e46 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D62143905 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for putting it in the source transform! Please make sure both OSS and internal tests pass.
|
This pull request was exported from Phabricator. Differential Revision: D62143905 |
3695692 to
20ea3af
Compare
Summary: Pull Request resolved: pytorch#5426 Apply output layer pruning if we are using a model trained with a large output vocabulary to use as a classification task to output only smaller set of vocabulary. The output interface is ensured to be the same as unpruned model. e.g., if the last linear layer has 2048 x 128k shape, and we trained the model to output only 20 output vocab, then we can prune away the last layer to have a shape of 2048 x 20. But we still expand the 1,20 output shape to 1,128k so that the app consuming the model outputs don't need to change. Reviewed By: iseeyuan Differential Revision: D62143905
|
This pull request was exported from Phabricator. Differential Revision: D62143905 |
Summary: Pull Request resolved: pytorch#5426 Apply output layer pruning if we are using a model trained with a large output vocabulary to use as a classification task to output only smaller set of vocabulary. The output interface is ensured to be the same as unpruned model. e.g., if the last linear layer has 2048 x 128k shape, and we trained the model to output only 20 output vocab, then we can prune away the last layer to have a shape of 2048 x 20. But we still expand the 1,20 output shape to 1,128k so that the app consuming the model outputs don't need to change. Reviewed By: tarun292, iseeyuan Differential Revision: D62143905
20ea3af to
dd6f355
Compare
Summary: Pull Request resolved: pytorch#5426 Apply output layer pruning if we are using a model trained with a large output vocabulary to use as a classification task to output only smaller set of vocabulary. The output interface is ensured to be the same as unpruned model. e.g., if the last linear layer has 2048 x 128k shape, and we trained the model to output only 20 output vocab, then we can prune away the last layer to have a shape of 2048 x 20. But we still expand the 1,20 output shape to 1,128k so that the app consuming the model outputs don't need to change. Reviewed By: tarun292, iseeyuan Differential Revision: D62143905
|
This pull request was exported from Phabricator. Differential Revision: D62143905 |
dd6f355 to
20d7986
Compare
|
This pull request has been merged in 2afcd96. |
Summary:
Apply output layer pruning if we are using a model trained with a large output vocabulary to use as a classification task to output only smaller set of vocabulary. The output interface is ensured to be the same as unpruned model.
e.g., if the last linear layer has 2048 x 128k shape, and we trained the model to output only 20 output vocab, then we can prune away the last layer to have a shape of 2048 x 20. But we still expand the 1,20 output shape to 1,128k so that the app consuming the model outputs don't need to change.
Differential Revision: D62143905