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
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
mr t.Feb 13, 2021
5
This is a must-have book for anyone interested in deep learning applied to NLP.The author takes care to go through theory and then follow up with practical, real-world, useful examples. He goes through the content in a sensible way; first going through a detailed theory of the Transformer model (referring to the Google paper as you would expect) and explaining some of the finer points in detail and with Python code to reinforce the point, and then moving on to discuss other topics such as BERT, RoBERTa, GPT-2 and DistilBERT.The book is comprehensive and will be useful even for seasoned data scientists. It also helps that having attended some of Denis’ talks, he himself seems approachable, down-to-earth and eager to help.However, a word of warning, as the author intimates it is not a beginners book - some prerequisite knowledge is required, although I definitely think that there was the opportunity in Chapter One for some of this to bring everyone onto the same level.However, that being said, the book is ideal for learning, reference and hands-on practice. Currently there is nothing better on the market.I fully expect this book to be relevant and useful for a long time.Highly recommended and an absolute must-buy.
Amazon Verified review
Alexander AfanasyevFeb 03, 2021
5
This book successfully filled those enormous gaps I had in my understanding of transformers, BERT, GPT-2, GPT-3.I really enjoyed the structural, organized, step-by-step approach to introducing base transformers, then BERT, RoBERTa, GPT-2 and GPT-3, downstream tasks with fine-tuning, T5 models, tokenizers, semantic labeling, possible optimizations, real-world use cases and applications. Each chapter built off the previous ones. If a new model architecture was introduced, the differences between it and the base transformer architecture were highlighted and explained.One of the most important takeaways for me was the overview of the next steps, the potential for practical usages and building ideas and projects off transformers - where to start, bottlenecks, what options available, etc.
Amazon Verified review
LauraFeb 15, 2021
5
I like that the book starts with defining the general architecture of a transformer then immediately jumps into a top-down approach via fine-tuning a pre-trained BERT model. This immediately gives the reader access to the practical application of Transformers. Given that deep learning can be very mathematically verbose, I can imagine that this lowers the entry barrier and makes learning about transformers less daunting for newcomers.The book continues the applied learning dynamic as it expands into more complex transformer architectures by presenting walkthroughs on real world data like financial and legal documents.Lastly once the book has introduced the latest and greatest architectures you get to put it all together for sentiment analysis and fake news detection. You will walk away with new tools for processing NLP with state of the art techniques.
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.