
Neural Networks, Attention, and Transformers
The transition from structured prediction and benchmarks to embeddings, sequence-to-sequence learning, attention, transformers, BERT, and GPT.
Part of History of Language AI. The online chapters are free to read; the PDF edition is yours to keep, with future updates included.
Understand how today’s language AI came to be.
Follow the ideas, experiments, and technical decisions that shaped the field. Connecting modern systems to their predecessors gives you a clearer view of what changed, what endured, and why the methods we use today took the forms they did.
See what you’ll learnWhat you will learn
- See how shared benchmarks and structured learning made progress measurable.
- Follow the sequence from word embeddings and neural translation to attention and transformer architectures.
- Understand why pretraining changed the economics and capabilities of language AI.
Who this volume is for
- Practitioners and students who want the historical path into neural language models and transformers.
Prerequisites: Readable on its own; Volume 1 supplies useful background for the statistical methods referenced here.
Volume 2 PDF edition
Own this 319-page edition
Keep the PDF for offline reading, with future updates included. The corresponding chapters stay free online.
- Carefully typeset PDF
- Future updates and errata included
- Online chapters remain free to read
Volume 2 of 3 · Available now
$14
one-timeVersion 2026.08.2 · 319 pages · secure checkout via Stripe
Delivered by email · Free updates included
Want the complete book?
All 3 volumes in one complete PDF. Save $8 vs. buying available volumes separately.
Buy the complete book · $34Reader verdict
5.0
out of 5
12 five-star reader reviews
Genuine feedback, with names abbreviated for privacy.
Meet the community“I am enjoying reading your writings. I appreciate the effort you put into it. I want to drop a note of thanks. Thank you!”
“I would like to thank you for your work. Specifically, the chapter: 'LIME Explainability: Complete Guide to Local Interpretable Model-Agnostic Explanations' was extremely helpful for me in understanding LIME and communicating to colleagues. Your work is inspiring and valuable. Thank you for doing it.”
“I just came across your website where your books are available for free to read. Thank you so much for making this available to the public. This will help a lot of people.”
“I came across your collection of online handbooks covering quantitative finance, AI, and machine learning. I wanted to reach out and thank you for making such high-quality material openly available. They are incredibly helpful for my CFA Level II review and for brushing up ahead of ML interviews.”
“Thanks for putting cool stuff out into the world.”
“Really appreciate the way you have explained the concepts. Simple to understand, yet builds up knowledge exponentially, all while reinforcing it with examples repeatedly. I've read the last two chapters `74.Self-attention & 75.Q,K,V` and I've to admit, my concepts have never been clearer. You really are doing an amazing job breaking down maths and complex concepts like a story!”
“Thank you Michael. It's top!”
“I read a few of your blogs on NLP and oh WOW, they really are something, now I exactly know how all of the terms Entropy, Cross-entropy and how it is connected to Perplexity, will definitely read more of your blogs.”
“Your writing feels like a treasure trove of great material. So, thank you for compiling everything on your website!”
“Thanks so much for establishing such an amazing community. I appreciate the opportunity to be a learner and a contributor to the community.”
“I found your book Language AI Handbook's explanations of Transformer architectures and production deployment strategies to be exceptionally clear and insightful”
“I came across one of your books, Language AI Handbook, and man, I'm loving it. I've read many books but have never found such a comprehensive book on large models that covers everything from start to finish with such depth.”
Read all 12 reader reviews
“I would like to thank you for your work. Specifically, the chapter: 'LIME Explainability: Complete Guide to Local Interpretable Model-Agnostic Explanations' was extremely helpful for me in understanding LIME and communicating to colleagues. Your work is inspiring and valuable. Thank you for doing it.”
“Really appreciate the way you have explained the concepts. Simple to understand, yet builds up knowledge exponentially, all while reinforcing it with examples repeatedly. I've read the last two chapters `74.Self-attention & 75.Q,K,V` and I've to admit, my concepts have never been clearer. You really are doing an amazing job breaking down maths and complex concepts like a story!”
“Thanks so much for establishing such an amazing community. I appreciate the opportunity to be a learner and a contributor to the community.”
“I just came across your website where your books are available for free to read. Thank you so much for making this available to the public. This will help a lot of people.”
“I am enjoying reading your writings. I appreciate the effort you put into it. I want to drop a note of thanks. Thank you!”
“Thank you Michael. It's top!”
“Thanks for putting cool stuff out into the world.”
“I found your book Language AI Handbook's explanations of Transformer architectures and production deployment strategies to be exceptionally clear and insightful”
“Your writing feels like a treasure trove of great material. So, thank you for compiling everything on your website!”
“I came across your collection of online handbooks covering quantitative finance, AI, and machine learning. I wanted to reach out and thank you for making such high-quality material openly available. They are incredibly helpful for my CFA Level II review and for brushing up ahead of ML interviews.”
“I read a few of your blogs on NLP and oh WOW, they really are something, now I exactly know how all of the terms Entropy, Cross-entropy and how it is connected to Perplexity, will definitely read more of your blogs.”
“I came across one of your books, Language AI Handbook, and man, I'm loving it. I've read many books but have never found such a comprehensive book on large models that covers everything from start to finish with such depth.”
Exact contents
34 chapters across 3 parts
Every linked chapter is free to read online.
Structured Learning & Benchmarks
- 01Conditional Random Fields (2001)
Lafferty and colleagues introduced CRFs, revolutionizing structured prediction by modeling entire sequences jointly through conditional probability and feature functions, establishing that outputs are interdependent and should be predicted together rather than independently
- 02BLEU Metric (2002)
IBM researchers introduced BLEU, revolutionizing machine translation evaluation by providing the first widely adopted automatic metric that correlated with human judgments, enabling rapid iteration and establishing automatic evaluation as fundamental to language AI development
- 03Phrase-based SMT & MERT (2003)
Phrase-based statistical machine translation extended IBM word-based models to phrase-level learning, capturing idioms and collocations, while Minimum Error Rate Training optimized feature weights to directly maximize BLEU scores, establishing the dominant statistical MT paradigm
- 04Neural Probabilistic Language Model (2003)
Bengio et al.'s first neural LM learned distributed word representations, foreshadowing modern embeddings and deep NLP
- 05Latent Dirichlet Allocation (2003)
Latent Dirichlet Allocation introduced probabilistic topic modeling, enabling unsupervised discovery of thematic structure in large document collections
- 06ROUGE & METEOR (2004)
ROUGE and METEOR automatic evaluation metrics expanded beyond BLEU to better assess summarization and capture semantic similarity in MT evaluation
- 07PropBank (2005)
Added semantic role labels to the Penn Treebank, enabling statistical systems to learn 'who did what to whom'
- 08Freebase (2007)
Freebase launched as a collaborative knowledge base, providing structured data that would later feed retrieval and grounding systems for language models
Deep Learning Arrives
- 01IBM Watson on Jeopardy! (2011)
IBM's Watson question-answering system defeated top human champions on the quiz show Jeopardy!, showcasing that AI could comprehend and answer natural-language questions at a human-expert level
- 02Deep Learning for Speech Recognition (2012)
Geoffrey Hinton and colleagues applied deep neural networks to speech recognition, significantly outperforming the then-dominant HMM-based models and dramatically reducing error rates in transcription
- 03Wikidata
Wikidata emerged as a comprehensive collaborative knowledge base, becoming a crucial resource for grounding language models and enabling structured knowledge access
- 04Word2Vec (2013)
Mikolov's word2vec introduced efficient distributional word embeddings trained on large corpora, establishing vector similarity and the modern era of neural NLP representations
- 05GloVe & Adam Optimizer (2014)
GloVe combined global co-occurrence statistics with local context, while the Adam optimizer enabled stable training of neural networks, both becoming foundational tools
- 06Seq2Seq for MT (2014)
Sutskever's sequence-to-sequence encoder-decoder framework revolutionized neural machine translation and established the template for text generation tasks
- 07Memory Networks (2014)
Weston et al. introduced neural models with an explicit external memory for QA, prefiguring retrieval-augmented methods
- 08Attention Mechanism (2015)
Bahdanau's attention mechanism introduced differentiable alignment in neural MT, enabling models to focus on relevant parts of input and dramatically improving translation quality
- 09Residual Connections (2015)
ResNet's residual connections from computer vision became standard in deep NLP architectures, enabling training of much deeper networks without degradation
- 10Layer Normalization (2016)
Ba et al.'s layer normalization stabilized training of recurrent and deep networks, becoming a crucial component in transformer and modern LLM architectures
- 11Subword Tokenization & FastText (2016)
Byte Pair Encoding (BPE) enabled open-vocabulary modeling, while FastText provided robust word vectors with subword information, solving out-of-vocabulary problems
- 12SQuAD (2016)
The Stanford Question Answering Dataset established reading comprehension as a flagship benchmark, driving research in language understanding and spawning many QA variants
- 13Neural Information Retrieval
Neural information retrieval learned semantic representations of queries and documents, enabling meaning-based matching beyond keyword overlap and transforming search systems with dual encoder architectures and dense retrieval methods
- 14Google Neural Machine Translation (2016)
Google Translate switched from phrase-based methods to a neural machine translation system, an end-to-end LSTM-based encoder-decoder that produced far more fluent, natural translations than previous statistical models
- 15WaveNet (2016)
DeepMind's WaveNet model generated raw audio waveforms for text-to-speech, producing remarkably natural-sounding speech and outperforming prior synthesis systems by modeling audio directly with a neural network
Transformers & Pretraining
- 01Transformer Architecture (2017)
Vaswani et al.'s 'Attention Is All You Need' introduced the transformer, replacing recurrence with self-attention and establishing the architecture that would dominate all of NLP
- 02RLHF Foundations (2017)
Christiano et al.'s work on learning from human preferences established foundations for reinforcement learning from human feedback, later crucial for aligning language models
- 03ELMo & ULMFiT (2018)
Context-sensitive embeddings from ELMo and transfer learning from ULMFiT demonstrated that pretraining on large corpora dramatically improved downstream tasks, launching the transfer learning era
- 04BERT (2018)
Devlin et al.'s BERT with masked language modeling and bidirectional pretraining revolutionized NLP, causing leaderboard performance to jump overnight across all benchmarks
- 05GPT-1 & GPT-2 (2018)
OpenAI's GPT models demonstrated that autoregressive pretraining could produce powerful generative models, with GPT-2 showing surprising zero-shot capabilities
- 06GLUE & SuperGLUE (2018)
The General Language Understanding Evaluation benchmarks established standardized multi-task evaluation, enabling systematic comparison of language understanding systems
- 07XLNet, RoBERTa, ALBERT (2019)
Refinements to BERT including permutation language modeling (XLNet), optimized training (RoBERTa), and parameter efficiency (ALBERT) pushed pre-training performance further
- 08XLM (2019)
Cross-lingual pretraining with translation language modeling enabled strong zero-/few-shot transfer across languages
- 09T5 & Text-to-Text Framework (2019)
Google's T5 unified all NLP tasks as text-to-text transformations, simplifying model architecture and training while achieving strong performance across diverse tasks
- 10Transformer-XL (2019)
Transformer-XL introduced segment-level recurrence and relative positional encodings, enabling transformers to process longer sequences more effectively
- 11BERT for IR (2019)
BERT-based cross-encoder re-rankers revolutionized information retrieval, dramatically improving ranking quality and establishing neural reranking as standard practice
Choose the edition that fits your next step
Volume 2: Neural Networks, Attention, and Transformers
319 pages focused on this subject, with future updates included.
$14
Choose this volumeThe complete History of Language AI book
All volumes together, with future updates included.
$34
Buy the complete bookExplore the other volumes
Author and edition details
About the author and this edition

Michael Brenndoerfer
Michael has spent more than a decade working across software engineering, data, AI, and business. He writes to understand difficult ideas more deeply and to share what he learns in a clear, practical way.
- Edition
- First edition
- Published
- Last reviewed
Version history
Kept current, not frozen in time
Each PDF purchase includes future editions. When the book changes, the updated copy appears in My books at no extra cost.
Current release
Edition 2026.08.2
Editorial improvements.
Earlier releases2
2026.08.1
Editorial improvements throughout the book, with clearer explanations, refined presentation, and improved plots and visualizations.
2026.08.0
Initial complete-book and three-volume PDF release with perpetual updates.

