Follow along with the NLP with Transformers book by running each chapter's notebook on free Google Colab GPU
Fine-tune a transformer model for text classification on your own dataset using the provided notebook as a template
Build a question-answering or text summarization system by adapting the corresponding chapter notebook
Learn to make large AI models more efficient using the model compression techniques in the dedicated chapter
GPU strongly recommended, easiest path is one-click open in Google Colab from the README links.
This repository holds all the code examples from the O'Reilly book "Natural Language Processing with Transformers." The book teaches how to work with transformer models, a category of AI model that has become the foundation for most modern language tools including chatbots, translation systems, and text summarizers. The code is organized into Jupyter notebooks, which are interactive documents that mix written explanation with runnable Python code. Each notebook corresponds to a chapter of the book. The topics covered include text classification, named entity recognition (identifying names, places, and organizations in text), text generation, summarization, question answering, translation, and making models more efficient. There is also a chapter on training large language models from scratch. The notebooks are self-contained, meaning a reader can open one and run through it without needing to read the earlier ones first. The notebooks are designed to run on cloud platforms such as Google Colab or Kaggle, both of which provide free access to a GPU. A GPU is strongly recommended because most of the examples involve running or fine-tuning large AI models that would take impractically long on a regular laptop processor. Each chapter in the README has direct links to open the corresponding notebook on Colab, Kaggle, Gradient, and Amazon SageMaker Studio Lab with a single click. Local installation is also possible for those with a capable machine. The repository includes setup instructions and a requirements file listing the necessary Python packages. This is a companion resource to a published book rather than a standalone tool. It is most useful for someone reading the book who wants to run the examples themselves, or for anyone looking for practical, well-explained code covering a broad range of natural language processing tasks using transformer models.
← nlp-with-transformers on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.