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 adore Denis Rothman's Transformers and the way things are written and explained. A 5-year-old can understand his explanation and a scientist can improve his work. When I see his interviews, I learn, on the one hand, about the ChatGPT and Google Gemini transformers and, on the other hand, how to treat clients, be a proactive human, and get a new perspective on AI. AI becomes fun, easy, and life- and perspective-changing. I read the second edition, and I can not wait to apply what I read in the 3rd edition. I mean, it is written as if it would answer the pain points of becoming a GenAI pro and maximize business and living in any circumstance. I already attended a Packt conference with Denis Rothman as a speaker in October last year. With or without his opponents, GenAI is changing the world and will make an important difference. Thank you, Denis Rothman, for Transformers for Natural Language Processing and Computer Vision. I adore it.
Subscriber review
vSep 26, 2024
5
If you're aspiring to become an expert in NLP or Generative AI, this book is an excellent resource. It provides a clear, step-by-step explanation of NLP models, making complex concepts easy to grasp through practical examples and Python code. . Starting with foundational models, the book introduces the architecture of Transformer, BERT, and RoBERTa, followed by an in-depth exploration of the GPT models which are the Generative AI revolution. The book also delves into image processing and computer vision. Additionally, the questions at the end of each chapter further enhance understanding and engagement with the material.
Amazon Verified review
Dr. Walter AignerMar 15, 2024
5
for those who can read, I can definitely say that this new third edition provides a fresh look at both the transformers themselves and the current environment in which they exist.A valuable resource to refresh our knowledge and inspire us to take the next stepsmy personal selection of what I appreciated in this third edition after about ten days of perusing, reading and note-takingthe emergence of new roles:* The role of AI professionals* The future of AI professionals* What resources should we use?* Guidelines for decision making* Chapter 3: Emergent vs. downstream tasks: The Unseen Depths of Transformers* Chapter 7: The Generative AI Revolution with ChatGPT* Chapter 12: Towards Syntax-Free Semantic Role Labelling with ChatGPT and GPT-4* Chapter 16: Beyond Text: Vision Transformers at the Dawn of Revolutionary AIRothman writes that this book is for data analysts, data scientists, and machine learning/AI engineers who want to understand how to process and interrogate the increasing amounts of speech and image data. Most of the programs in the book are Colaboratory notebooks. All you need is a free Google Gmail account and you can run the notebooks on the free Google Colaboratory VM.Context of my interest in this field: Shortly after the public release of ChatGPT in November 2022, Bill Gates described it and other LLMs as "as important as the PC, as important as the Internet". Jensen Huang, CEO of Nvidia, said ChatGPT was "truly one of the greatest things ever done for computing". Geoffrey Hinton, a Turing Laureate, said, "I think it's comparable in scale to the industrial revolution or electricity - or maybe the wheel. Perhaps that is why many of us need a qualified, updated context.I can definitely say that this new third edition gives a qualified context and fresh look at both the transformers themselves and the current environment in which they exist.and yet, the term "Computer Simulation" is far more accurate as an umbrella term than any characterization of machine software("AI," "LLM," "Generative AI," etc.).Rothman's profile shows that he has been designing and developing computer simulation software for decades in various forms: rule-based, expert systems, ML agents, DL agents, the first transformer models, and now trending Generative AI for NLP and Computer Vision. all these algorithms boil down to "computer simulation", no more, no less. They are toolss that are here for us to make "simulations" to enhance our abilities as a scientific calculator does.Who this book is for: Anyone who regularly works with LLMs professionally (e.g. data scientists, machine learning engineers, AI researchers, etc.) or anyone already familiar with natural language processing (NLP) who wants to take a deep dive into transformers.Another reviewer rightly wrote: Who this book is not for: Anyone with little to no knowledge of NLP, machine learning, or Python programming (i.e. the "casual" reader). This book is dense (in the sense of Clifford Geertz‘ thick description that helps us increase our understanding on both on a theoretical and a practical level). I still have a lot to think about.And I have to admit that I have not yet fully grasped all the emerging possibilities and food for thought that the book has triggered or will trigger as I re-read and explore the code provided.
Amazon Verified review
DidiAug 01, 2024
5
The transformer architecture was introduced by Google in 2017, and almost instantly revolutionized the field of natural language processing (NLP), and to some degree also that of computer vision. This book is a comprehensive and practical guide to the transformer architecture, on which modern LLMs are based, and its applications in NLP and computer vision.The book does a wonderful job in providing detailed and clear descriptions of a wide range of important topics in NLP, such as the fundamentals of the transformer architecture, model pre-training, fine-tuning, tokenization, and embeddings. Notable applications of LLMs are also covered in detail, and include summarization, translation, etc. Modern generative AI methods are also very nicely covered, both in NLP and in computer vision (e.g., ChatGPT, Stable Diffusion, and the like). The accompanying GitHub repo is also very helpful, and greatly assists in reinforcing the concepts presented in the book.This comprehensive and unique guide will benefit any researcher, data scientist, machine learning engineer, or software engineer interested in building and understanding modern NLP and LLMs, as well as modern methods in computer vision. Prior familiarity with machine learning concepts, as well as with the Python programming language, would be helpful to get the most out of this book.Highly recommended!
Amazon Verified review
Steven FernandesMar 27, 2024
5
This concise guide provides an in-depth exploration into the world of large language models (LLMs), offering valuable insights on pretraining and fine-tuning techniques. It navigates through the utilization of multiple platforms including Hugging Face, OpenAI, and Google Vertex AI, ensuring readers are well-equipped to work across these environments. The book delves into the intricacies of different tokenizers and outlines best practices for preprocessing language data, a fundamental step for optimizing model performance. Additionally, it addresses the challenge of model hallucinations by implementing Retrieval Augmented Generation and rule-based strategies. For those interested in understanding the underlying mechanisms of transformer models, it offers visualization techniques through tools like BertViz, LIME, and SHAP, providing deeper insights into model activity. The guide also introduces the concept of cross-platform chained models, exemplified by HuggingGPT, and extends its expertise into the realm of vision transformers, covering advanced models like CLIP, DALL-E 2, DALL-E 3, and GPT-4V. This resource is indispensable for anyone looking to deepen their understanding and practical skills in the evolving field of LLMs and AI-driven technologies.
Denis Rothman graduated from Sorbonne University and Paris-Diderot University, designing one of the very first word2matrix patented embedding and patented AI conversational agents. He began his career authoring one of the first AI cognitive Natural Language Processing (NLP) chatbots applied as an automated language teacher for Moet et Chandon and other companies. He authored an AI resource optimizer for IBM and apparel producers. He then authored an Advanced Planning and Scheduling (APS) solution used worldwide.
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.