@huggingface provides open-source implementations of most Transformer architectures, in both PyTorch and TF.
Better yet, they have many pre-trained NLP models and datasets.
And recently, an inference API.
2/ The 🤗 transformers library implements many architectures: BERT, GPT, XLNet, etc.
It works for both PyTorch and Tensorflow, and provides three main modules, all nicely interoperable:
- Data configuration and tokenization
- Model architecture
- Training
3/ All of the transformers library code is compatible with pre-trained model weights available on Hugging Face Hub.
This enables rapid progress: no matter what your NLP task/language is, there is probably a pre-trained model for you to start fine-tuning with.
4/ Did we mention that all of the above is absolutely free?
It is!
There is also a premium feature: inference API.
With a paid plan, you can upload your fine-tuned models privately, and run inference using them using a REST API, and Hugging Face will scale for you.
5/ Hugging Face has powered an incredible amount of progress in NLP research and production use over the last couple of years. Give them a follow at @huggingface to stay up to date -- they move fast!
• • •
Missing some Tweet in this thread? You can try to
force a refresh
TVM describes themselves as a an "end to end machine learning compiler framework for cpus, gpus, and accelerators".
Let's talk about what that means and why it might be useful for you:
Under the hood, deep learning frameworks are built on "kernel operator" libraries like cuDNN. These are the primitives that help run your model fast on a GPU or other accelerator.
The problem is: these aren’t open source (not extensible) and only work on specific platforms.
So what happens if you the platform you want to deploy to isn't supported or performance is bad?
That's where TVM comes in. It has importers for all the major frameworks and tutorials to compile optimized versions of your models for common CPUs and GPUs.
Let's talk about setting up our Python/CUDA environment!
Our goals:
- Easily specify exact Python and CUDA versions
- Humans should not be responsible for finding mutually-compatible package versions
- Production and dev requirements should be separate
1/N
Here's a good way to achieve these goals:
- Use `conda` to install Python/CUDA as specified in `environment.yml`
- Use `pip-tools` to lock in mutually compatbile versions from `requirements/prod.in` and `requirements/dev.in`