Transformers for Natural Language Processing: Build innovative deep neural network architectures for NLP with Python, PyTorch, TensorFlow, BERT, RoBERTa, and more
Build and implement state-of-the-art language models, such as the original Transformer, BERT, T5, and GPT-2, using concepts that outperform classical deep learning models
Go through hands-on applications in Python using Google Colaboratory Notebooks with nothing to install on a local machine
Test transformer models on advanced use cases
Description
The transformer architecture has proved to be revolutionary in outperforming the classical RNN and CNN models in use today. With an apply-as-you-learn approach, Transformers for Natural Language Processing investigates in vast detail the deep learning for machine translations, speech-to-text, text-to-speech, language modeling, question answering, and many more NLP domains with transformers.
The book takes you through NLP with Python and examines various eminent models and datasets within the transformer architecture created by pioneers such as Google, Facebook, Microsoft, OpenAI, and Hugging Face.
The book trains you in three stages. The first stage introduces you to transformer architectures, starting with the original transformer, before moving on to RoBERTa, BERT, and DistilBERT models. You will discover training methods for smaller transformers that can outperform GPT-3 in some cases. In the second stage, you will apply transformers for Natural Language Understanding (NLU) and Natural Language Generation (NLG). Finally, the third stage will help you grasp advanced language understanding techniques such as optimizing social network datasets and fake news identification.
By the end of this NLP book, you will understand transformers from a cognitive science perspective and be proficient in applying pretrained transformer models by tech giants to various datasets.
Who is this book for?
Since the book does not teach basic programming, you must be familiar with neural networks, Python, PyTorch, and TensorFlow in order to learn their implementation with Transformers.
Readers who can benefit the most from this book include experienced deep learning & NLP practitioners and data analysts & data scientists who want to process the increasing amounts of language-driven data.
What you will learn
Use the latest pretrained transformer models
Grasp the workings of the original Transformer, GPT-2, BERT, T5, and other transformer models
Create language understanding Python programs using concepts that outperform classical deep learning models
Use a variety of NLP platforms, including Hugging Face, Trax, and AllenNLP
Apply Python, TensorFlow, and Keras programs to sentiment analysis, text summarization, speech recognition, machine translations, and more
Measure the productivity of key transformers to define their scope, potential, and limits in production
I needed to learn transformers. It was slow going, so I started a learning group on LinkedIn. We were helping each other find sources of how to best learn them.Then Denis Rothman piggybacked on one of my learning posts about transformers, and he made a promise of something big that would soon come out that would help us.Friends at Packt then allowed me to have a prerelease version of this book. Until this book came out, it was hard to not only collect what you needed to learn how transformers work, but also to learn how to use them, transfer learn with them, and when and how you might want to build and train your own transformer(s).After looking through so many sources, I can attest that not only will this book help you get started rapidly with using and training and transfer learning transformers, but it will also help you understand transformers in deep philosophical ways.I am VERY grateful to Denis for writing this book AND FOR writing it very well.
Amazon Verified review
Amazon CustomerMar 24, 2021
5
The book is a well written summary of using Transformers for Natural language processing and will be a good addition to any Deep learning / NLP library.The book covers most of mathematical background and architectures in practical use.This book is very good for learning and hand on practice, though it does require certain understanding of Deep learning field and concepts.
Amazon Verified review
William Le ClairMay 24, 2021
5
The first chapters of the book are a good introduction to the use of Transformers with detailed explanations BERT, Robert, and OpenAI (GPT-2 & GPT-3) with flows explaing how to select parameters. There is also a chapter that goes through what to consider when constructing datasets for your testing and training to avoid unexpected vocabulary such as profanity. The last chapters introduce you to additional packages that you can use to help you get started faster such as Huggingface, Haystack, and Allenlp which is a great help for getting you started and allowing you to compare results.
Amazon Verified review
Prasad DuvvuriFeb 13, 2021
5
As an NLP enthusiast looking to advance my knowledge In find this book an excellent resource. This book covers various topics related to NLP in great detail and excellent comprehension.
Amazon Verified review
WU.Apr 19, 2021
5
Having been impressed by Mr. Rothman's previous work on Explainable AI (X-AI), I jumped at the chance to get my hands on this as I was starting a project on NLP and needed to quickly become acquainted with the latest practical advancements in the field.To that end, this book does not disappoint. It is comprehensive in its treatment of transformers, with plenty of hands-on examples to cement the material. I found the tutorials relevant and easy to follow, with each section touching upon a different use case while building in complexity. This, I think, is the correct way to learn new material.I was able to leverage the contents of this book to build a pretty decent model (with very little fine-tuning) for a proof-of-concept with a prospective client, but sadly the trail went cold before we could present the results. As with everything, data is important and I applaud the author for staying away from the more "vanilla" datasets that are usually fare in these types of books.I will say, however, that parts of the book are a bit difficult without the proper introduction to the theory, so you might find yourself having to supplement with other sources. Mr. Rothman is, at times, too succinct in his treatment of core concepts, leaving the reader to unpack theory while he swiftly moves to the examples. All is well documented, however, so no one should have much trouble locating resources. Thus, it is more of an intermediate-level text in my opinion.Overall, I can recommend this to anyone seeking to implement transformers for NLP.
Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.
If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.
Please Note: Packt eBooks are non-returnable and non-refundable.
Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:
You may make copies of your eBook for your own use onto any machine
You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website?
If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:
Register on our website using your email address and the password.
Search for the title by name or ISBN using the search option.
Select the title you want to purchase.
Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title.
Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook?
If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
To view your account details or to download a new copy of the book go to www.packtpub.com/account
Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.
You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.
What are the benefits of eBooks?
You can get the information you need immediately
You can easily take them with you on a laptop
You can download them an unlimited number of times
You can print them out
They are copy-paste enabled
They are searchable
There is no password protection
They are lower price than print
They save resources and space
What is an eBook?
Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.
When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.
For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.