-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Tutorial] Demo showing how to run a pruned 🤗 model. #5975
Conversation
@masahi, @vinx13, @binarybana can you take a look and let me know what you think? |
I liked emojis in the PR:) How about adding a sample output, with avx2 or 512? |
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.
Looks great! Made some edits.
How long does this tutorial take to run? |
@merrymercy it's fairly quick, I commented out the run command due to dependencies rather than the run time. This tutorial requires tensorflow 2.2 (our servers currently use 2.1) and transformers. If we think its worth updating the server build then we can run this for real. |
A +1 for updating TF versions and keeping this running out of the box. |
Thanks everyone, this is merged, will ping the thread again once we have TF 2.2 landed in the CI |
Note that the There are also a lot of dependencies for the tutorial (e.g. transformers, tensorflow) which may not be in a user's environment. Should an Install dependencies section be added à la? |
This tutorial demonstrates how to load and run a sparse model from the popular transformers module from Hugging Face (🤗). Very recently a 95% sparse version of BERT was made publicly available however 🤗 was unable to achieve speedups using existing frameworks. Using this script, TVM enables a 2-3X speedup by converting appropriate dense layers to sparse dense layers. I think this will be a useful tutorial for user's interested in sparse networks and may be good PR for TVM as a small collaboration with 🤗. Thanks @antinucleon for helping getting this all working!