- Notifications
You must be signed in to change notification settings - Fork176
Denis2054/Transformers-for-NLP-and-Computer-Vision-3rd-Edition
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Transformers for Natural Language Processing and Computer Vision: Take Generative AI and LLMs to the next level with Hugging Face, Google Vertex AI, ChatGPT, GPT-4V, and DALL-E 3 3rd Edition
This repo is continually updated and upgraded.
Last updated: August 14, 2025
📝 For details on updates and improvements, see theChangelog.
🚩If you see anything that doesn't run as expected, raise an issue, and we'll work on it!
Look for 🐬 to explorenew bonus notebooks such as and DeepSeek-R1 and OpenAI o1 reasoning models, Midjourney's API, Google Vertex AI Gemini's API, OpenAI asynchronous batch API calls!
Look for 🎏 to explore existing notebooks for thelatest model or platform releases, such as OpenAI's latest models (GPT-4o and o1).
Look for 🛠 to run existing notebooks withnew dependency versions and platform API constraints and tweaks.
This is the code repository forTransformers for Natural Language Processing and Computer Vision, published by Packt.
Explore Generative AI and Large Language Models with Hugging Face, ChatGPT, GPT-4V, and DALL-E 3
Transformers for Natural Language Processing and Computer Vision, Third Edition, exploresLarge Language Model (LLM) architectures, applications, and various platforms (Hugging Face, OpenAI, and Google Vertex AI) used forNatural Language Processing (NLP) andComputer Vision (CV).
Dive into generative vision transformers and multimodal model architectures and build applications, such as image and video-to-text classifiers. Go further by combining different models and platforms and learning about AI agent replication.
- Learn how to pretrain and fine-tune LLMs
- Learn how to work with multiple platforms, such as Hugging Face, OpenAI, and Google Vertex AI
- Learn about different tokenizers and the best practices for preprocessing language data
- Implement Retrieval Augmented Generation and rules bases to mitigate hallucinations
- Visualize transformer model activity for deeper insights using BertViz, LIME, and SHAP
- Create and implement cross-platform chained models, such as HuggingGPT
- Go in-depth into vision transformers with CLIP, DALL-E 2, DALL-E 3, and GPT-4V
- What Are Transformers?
- Getting Started with the Architecture of the Transformer Model
- Emergent vs Downstream Tasks: The Unseen Depths of Transformers
- Advancements in Translations with Google Trax, Google Translate, and Gemini
- Diving into Fine-Tuning through BERT
- Pretraining a Transformer from Scratch through RoBERTa
- The Generative AI Revolution with ChatGPT
- Fine-Tuning OpenAI GPT Models
- Shattering the Black Box with Interpretable Tools
- Investigating the Role of Tokenizers in Shaping Transformer Models
- Leveraging LLM Embeddings as an Alternative to Fine-Tuning
- Toward Syntax-Free Semantic Role Labeling with ChatGPT and GPT-4
- Summarization with T5 and ChatGPT
- Exploring Cutting-Edge LLMs with Vertex AI and PaLM 2
- Guarding the Giants: Mitigating Risks in Large Language Models
- Beyond Text: Vision Transformers in the Dawn of Revolutionary AI
- Transcending the Image-Text Boundary with Stable Diffusion
- Hugging Face AutoTrain: Training Vision Models without Coding
- On the Road to Functional AGI with HuggingGPT and its Peers
- Beyond Human-Designed Prompts with Generative Ideation
Appendix: Answers to the Questions
You can run the notebooks directly from the table below:
| Chapter | Colab | Kaggle | Gradient | StudioLab |
|---|---|---|---|---|
| Part I The Foundations of Transformer Models | ||||
| Chapter 1: What are Transformers? | ||||
| ||||
| Getting started with DeepSeek-R1 Reasoning models. Integrated into HuggingFace Hub and Together. | ||||
| ||||
| Chapter 2: Getting Started with the Architecture of the Transformer Model | ||||
| ||||
| Explaining DeepSeek's Training innovations; Part 1: RL | ||||
| ||||
| Explaining DeepSeek's Training innovations; Part 2: RoPE | ||||
| ||||
| Chapter 3: Emergent vs Downstream Tasks: the Unseen Depths of Transformers | ||||
| ||||
| Chapter 4: Advancements in Translations with Google Trax, Google Translate, and Google Bard | ||||
| ||||
| Chapter 5: Diving into Fine-Tuning through BERT | ||||
| ||||
| Chapter 6: Pretraining a Transformer from Scratch through RoBERTa | ||||
| ||||
| Part II: The Rise of Suprahuman NLP | ||||
| Chapter 7: The Generative AI Revolution with ChatGPT | ||||
| ||||
| OpenAI Reasoning models: the o1 API | ||||
| ||||
| OpenAI Reasoning models: the o1-preview API | ||||
| ||||
| Chapter 8: Fine-tuning OpenAI Models | ||||
| ||||
| Fine-Tuning GPT-4.1 | ||||
| ||||
| 🐬RAG as an alternative to fine-tuning: Building Scalable Knowledge-based RAG-drive Generative AI | ||||
| Click here to access an open-source library to implement RAG | ||||
| Chapter 9: Shattering the Black Box with Interpretable tools | ||||
| ||||
| Chapter 10: Investigating the Role of Tokenizers in Shaping Transformer Models | ||||
| ||||
| Chapter 11: Leveraging LLM Embeddings as an Alternative to Fine-Tuning | ||||
| ||||
| Chapter 12: Towards Syntax-Free Semantic Role Labeling with BERT and OpenAI's ChatGPT | ||||
| ||||
| Chapter 13: Summarization with T5 and ChatGPT | ||||
| ||||
| Chapter 14: Exploring Cutting-Edge NLP with Google Vertex AI(PaLM and🐬Gemini with gemini-1.5-flash-001 | ||||
| ||||
| Gemini 2.5 Flash showcase of Generative AI tasks | ||||
| ||||
| Chapter 15: Guarding the Giants: Mitigating Risks in Large Language Models< | ||||
| ||||
| Part III: Generative Computer Vision: A New Way to See the World | ||||
| Chapter 16: Vision Transformers in the Dawn of Revolutionary AI | ||||
| ||||
| Chapter 17: Transcending the Image-Text Boundary with Stable Diffusion | ||||
| ||||
| Stable Diffusion with Hugging Face | ||||
| ||||
| Chapter 18: Automated Vision Transformer Training | ||||
| ||||
| Chapter 19: On the Road to Functional AGI with HuggingGPT and its Peers | ||||
| ||||
| Chapter 20: Generative AI Ideation Vertex AI, Langchain, and Stable Diffusion | ||||
|
You cancreate an issue We will be glad to provide support!
in this repository if you encounter one in the notebooks.
If you feel this book is for you, get yourcopy today!
You can get more engaged on the Discord server for more latest updates and discussions in the community atDiscord
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost. Simply click on the link to claim yourFree PDF
We also provide a PDF file that has color images of the screenshots/diagrams used in this book atColorImages
Denis Rothman graduated from Sorbonne University and Paris-Cité University, designing one of the first patented encoding and embedding systems and teaching at Paris-I Panthéon Sorbonne.He authored one of the first patented word encoding and AI bots/robots. He began his career delivering a Natural Language Processing (NLP) chatbot for Moët et Chandon(LVMH) and an AI tactical defense optimizer for Airbus (formerly Aerospatiale).Denis then authored an AI optimizer for IBM and luxury brands, leading to an Advanced Planning and Scheduling (APS) solution used worldwide.LinkedIn
About
Transformers 3rd Edition
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.



