PyTorch implementation
Hello all,
We have released a PyTorch implementation/port of BERT !
Our scripts load Google's pre-trained models and it performs about the same as the TF implementation in our tests (see the readme). We have also included gradient-accumulation, multi-GPU & distributed training options to help you fine-tune these large models.
Here's the link: https://github.com/huggingface/pytorch-pretrained-BERT
We hope it will be useful !
Victor - HuggingFace 🤗
Thanks! This is really awesome! I'll add a link to it in the FAQ.
I just made a change to tokenization.py to support Chinese, but this is the last change to modeling.py, tokenization.py, or optimziation.py that I plan to make. So if you port that change then it should also work with the new multilingual models.
@jacobdevlin-google Another PyTorch port is now available:
https://github.com/innodatalabs/tbert
Features:
- usable as a Python library, published on pypi:
pip install tbert - Provides converter to load Google pre-trained checkpoints
- Unit tests prove it behaves exactly as the original, continuous testing via Travis
- Requires Python 3.6 or better
Please add a link to the FAQ
Thanks, -Mike