
The book ‘Decoding GPT: An intuitive understanding of Large Language Models’ is an introduction to large language models such as ChatGPT, Bard and Llama. It deals majorly with the ‘how it works’ of LLMs. However, it avoids both mathematics and programming and instead uses examples, diagrams and intuition to explain the complex topic.
‘Decoding GPT’ charts a well thought out plan for the reader. Starting with the basics of machine learning, it leads you to LLMs in such a sequence that every concept learned along the way is useful on its own. When you begin with the book, you will learn the basics of artificial intelligence (AI), machine learning (ML) and deep learning. As you progress, you will get a good insight into the working of neural networks. With this foundation laid, you will dive into the exciting part of building LLMs from neural networks. As your journey comes to an end, you will become familiar with the making of the ‘magical’ capabilities of LLMs. If you want to study in depth, enough references are given in the book. Further references are available on the website.​
This book is useful to:
-
Students of technology who are beginning their exploration of generative AI and large language models.
-
The faculties who will guide the students in their courses and projects
-
Technology professionals desiring to study these new and promising models
-
Decision makers and business leaders who will employ LLMs in their organizations
-
Entrepreneurs creating products or services based on LLMs
-
Anyone else who is curious about the buzz created by ChatGPT and wants to know what is under its hood
In this book, you will learn:
-
Fundamentals of AI
-
Basic machine learning: linear and logistic regression
-
Basic deep learning: neural networks
-
Fundamentals of large language models
-
The making of LLMs from neural networks: architecture and training
-
Additional concepts: prompt engineering, code generation, ethical issues, risks
References
This book introduces you to the basics of large language models. After reading it, some of you might feel motivated to delve deeper into the topic. I have given some references for these readers in the ‘Further Reading’ section at the end of the book.
However, the field of GenAI and LLM is a dynamic one. One time references in a book cannot hope to cover the new developments in the area. I have added this section to the website to cater to current updates. Here, I will maintain an ever updating list of books, articles, papers and videos that an advanced learner of LLMs will find useful.
Table of contents
Preface
Background of the book, how I wrote it, who should read.
Chapter 1: Introduction
Introduces AI and explains how it is different from classical software. Comments on the development of Generative AI. Describes how the book is structured
Chapter 2: What is Machine Learning?
Explains how machine learning works. Introduces ‘pattern’, the first important concept in this book.
Chapter 3: Prediction with Linear Regression
Describes how the simple technique of linear regression uses the line pattern for guessing. Treats the training algorithm in detail and lays the foundation of the next two chapters.
Chapter 4: Road to Neural Networks - Logistic Regression
Explains the most common technique for classification - Logistic Regression. The peculiar nature of the model is the main takeaway.
Chapter 5: Neural Networks
Introduces neural networks, the most important concept for understanding LLMs. Explains the pivotal concept of ‘representation’.
Chapter 6: What are Large Language Models?
Describes the fundamentals of LLMs. Introduces the key concepts of embeddings, context and next-word-prediction that will be treated in detail in the next chapters.
Chapter 7: Embeddings
Explains how text is processed by neural networks through embeddings. The first piece of LLM architecture.
Chapter 8: Context Creation
Probably the most important chapter in this book. Describes three different methods of context creation, the last being ‘attention’.
Chapter 9: Next-Word-Prediction
An understanding of how LLMs like ChatGPT produce their output. This explains a lot of the stuff that you see.
Chapter 10: The LLM Magic - Foundational Capabilities
First of the two chapter mini-series that uses the three previous concepts to explain the magical capabilities of LLMs. This one focuses on foundational abilities like language.
Chapter 11: The LLM Magic - Assistance
Second chapter in the mini-series. This describes how ChatGPT and other LLMs gain their assistant-like skills.
From Basics to LLM in 11 Steps
A running summary of the last eleven chapters. Takeaway of the entire book.
Miscellaneous Topics
This chapter briefly touches upon those topics related to LLMs that are not covered in the book, but the reader should be aware of.
Further Reading
The books and papers that an inspired reader can take up next. More references are on the website of the book.