Transformers: Best NLP for Pytorch and TensorFlow 2.0

May 17, 2020, 4:54 a.m. By: Merlyn Shelley

Transformers huggingface

You might know that Pytorch Transformers are the powerful libraries for NLP models. But now we got an update on Pytorch Transformers that makes it easier now to build our own Natural Language Processing model that can expand the skill of Google Translate tool with just 3-10 lines of codes.

Yup, it is possible to build your NLP model with a few lines of Python code with the state-of-the-art NLP library, Transformers. Developed by Hugging Face, New York based NLP Startup.

Transformers is nothing but the Python library that reveals an API to employ almost every other popular transformers architecture.

Some of the renowned architectures are Google's BERT, GPT-2, XLM, DistilBert, XLNe and much more.

It is mainly used in Natural Language Generation and Natural Language Understanding concepts. It has got over 32 pre-trained models in more than 100 languages.

Let's see the Features of Transformers Library.

  • It has got a deep interoperability between TensorFlow 2.0 and PyTorch.(Major Update)

  • It is a damn powerful, concise and high performance library function in NLU and NLG.

  • It can dramatically reduce the production cost and computation time.

  • Training, Evaluation and production are now made seamless with the right framework at no time.

  • It can train the best or state-of-the-art models in just three lines of codes.

These Transformers are specifically designed to exchange information and make use of it between TensorFlow 2.0 and Pytorch. This is the important break-through in this update. Hugging Face have updated this from their already existing Pytorch Transformers. But named it to be just Transformers.

It is as easy to use as Pytorch Transformers with a whole lot of extra advantages like compatibility with keras, interoperability between Pytorch and TensorFlow 2.0, it could pre-process a dataset with 10 lines of co. It can train the SOTA model in just three lines of code. Do try the best out of it!

Github Reference: Transformers