whatisgithub

What is notebooks?

nlp-with-transformers/notebooks — explained in plain English

Analysis updated 2026-06-26

4,770Jupyter NotebookAudience · developerComplexity · 3/5Setup · moderate

In one sentence

All code examples from the O'Reilly book Natural Language Processing with Transformers, organized as runnable Jupyter notebooks covering classification, summarization, translation, question answering, and more.

Mindmap

mindmap
  root((NLP with Transformers))
    Topics
      Text classification
      Named entity recognition
      Summarization
      Translation
      Question answering
      Text generation
    Platforms
      Google Colab
      Kaggle
      Amazon SageMaker
      Local install
    Tech
      Python
      Hugging Face
      Jupyter Notebooks
    Audience
      Book readers
      NLP learners
      AI practitioners
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Follow along with the NLP with Transformers book by running each chapter's notebook on free Google Colab GPU

USE CASE 2

Fine-tune a transformer model for text classification on your own dataset using the provided notebook as a template

USE CASE 3

Build a question-answering or text summarization system by adapting the corresponding chapter notebook

USE CASE 4

Learn to make large AI models more efficient using the model compression techniques in the dedicated chapter

What is it built with?

PythonJupyter NotebookHugging Face TransformersGoogle Colab

How does it compare?

nlp-with-transformers/notebooksoreilly-japan/deep-learning-from-scratchlixin4ever/conference-acceptance-rate
Stars4,7704,7534,742
LanguageJupyter NotebookJupyter NotebookJupyter Notebook
Setup difficultymoderateeasyeasy
Complexity3/51/51/5
Audiencedeveloperresearcherresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

GPU strongly recommended, easiest path is one-click open in Google Colab from the README links.

So what is it?

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.

Copy-paste prompts

Prompt 1
I am following the NLP with Transformers notebooks and want to fine-tune a BERT model for sentiment analysis on my own CSV. Show me how to modify the text classification notebook to load my custom dataset.
Prompt 2
The transformer summarization notebook from nlp-with-transformers is running out of GPU memory on Colab. How do I reduce batch size and use gradient accumulation to fix it?
Prompt 3
Help me adapt the named entity recognition notebook to identify custom entity types like product names and prices in e-commerce reviews.
Prompt 4
I want to run the translation notebook locally instead of on Colab. What GPU do I need and how do I set up the Python environment?

Frequently asked questions

What is notebooks?

All code examples from the O'Reilly book Natural Language Processing with Transformers, organized as runnable Jupyter notebooks covering classification, summarization, translation, question answering, and more.

What language is notebooks written in?

Mainly Jupyter Notebook. The stack also includes Python, Jupyter Notebook, Hugging Face Transformers.

How hard is notebooks to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is notebooks for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.