SOLID STATE PRESS
← Back to catalog
Generative AI: How Machines Learned to Write, Paint, and Speak cover
Buy on Amazon
US list price $2.99
(search link — ASIN auto-fills once available)
Artificial Intelligence

Generative AI: How Machines Learned to Write, Paint, and Speak

Transformers, Diffusion Models, and the Prompt That Runs the World — A TLDR Primer

Your professor mentioned 'attention mechanisms' and 'diffusion models' like everyone already knows what they mean. You don't — and the textbook chapter on it reads like it was written for a machine learning PhD, not a curious student.

This primer answers the question everyone is quietly asking: how does ChatGPT actually work, and how do tools like Midjourney turn a sentence into a picture? It walks through generative AI explained simply, starting with the core idea — a model learning a probability distribution over data — and building up to next-token prediction, tokenization, and why 'just guess the next word' somehow produces essays and code.

From there it opens up the transformer architecture (embeddings, self-attention, multi-head attention) at a level that assumes curiosity, not a math degree. A full section covers how AI image generators work: the forward noising process, the learned denoiser, and how a text prompt steers pure noise into a coherent picture. The training pipeline section demystifies pretraining, fine-tuning, and RLHF — the steps that turn a raw predictor into an assistant that follows instructions. The final section is an honest look at hallucination, bias, copyright fights over training data, and the real compute costs behind the hype.

Every term is defined the moment it's introduced. No prior coding or math background required — just enough algebra comfort to not flinch at a subscript. Written short by design: no padding, no review-of-the-review, just the concepts that let you read an AI news article or answer an exam question with real understanding.

Open it before your next class discussion turns into a blank stare.

What you'll learn
  • Explain what makes a model 'generative' versus 'discriminative' and how modern systems learn from raw data
  • Describe how large language models tokenize text, predict the next token, and use the transformer/attention mechanism
  • Understand how diffusion models generate images by learning to reverse noise, and how text-to-image systems steer that process
  • Recognize the training pipeline of a modern LLM: pretraining, fine-tuning, and RLHF, and what each stage actually changes
  • Evaluate real limitations — hallucination, bias, copyright, compute cost — and speak about them precisely rather than vaguely
What's inside
  1. 1. What 'Generative' Actually Means
    Defines generative modeling as learning a probability distribution over data, contrasts it with discriminative models, and sketches the family tree (LLMs, diffusion, GANs, VAEs).
  2. 2. Language Models and Next-Token Prediction
    Walks through tokenization, the next-token prediction objective, temperature and sampling, and why 'just predict the next word' scales into apparent reasoning.
  3. 3. Inside the Transformer: Attention Is the Trick
    Explains the transformer architecture at a student level — embeddings, self-attention, multi-head attention, and why it replaced RNNs.
  4. 4. Diffusion Models and How AI Learned to Paint
    Covers the forward noising process, the learned denoising network, classifier-free guidance, and how text conditioning turns noise into images matching a prompt.
  5. 5. Training a Modern Model: Pretraining, Fine-Tuning, and RLHF
    Describes the full training pipeline that turns a raw next-token predictor into ChatGPT-style assistants, including instruction tuning and reinforcement learning from human feedback.
  6. 6. What Generative AI Can and Can't Do
    Honest accounting of capabilities and limits: hallucination, bias, copyright and training data disputes, compute and energy costs, and where the field is heading.
Published by Solid State Press · September 2026
Generative AI: How Machines Learned to Write, Paint, and Speak cover
TLDR STUDY GUIDES

Generative AI: How Machines Learned to Write, Paint, and Speak

Transformers, Diffusion Models, and the Prompt That Runs the World — A TLDR Primer
Solid State Press

Contents

  1. 1 What 'Generative' Actually Means
  2. 2 Language Models and Next-Token Prediction
  3. 3 Inside the Transformer: Attention Is the Trick
  4. 4 Diffusion Models and How AI Learned to Paint
  5. 5 Training a Modern Model: Pretraining, Fine-Tuning, and RLHF
  6. 6 What Generative AI Can and Can't Do
Chapter 1

What 'Generative' Actually Means

A generative model is a system that learns the underlying pattern in a set of data well enough to produce new examples that look like they belong to that set. Feed it thousands of photos of cats, and it learns something like "what makes a cat picture a cat picture" — then it can generate a brand-new cat photo that never existed. Feed it millions of sentences, and it learns what makes text sound like coherent English — then it can write a new sentence you've never seen before. ChatGPT writing a paragraph, Midjourney painting a dragon, a voice-cloning tool speaking in your voice — all of these are generative models at work.

To understand what "learning the pattern" really means, it helps to compare generative models to their opposite: discriminative models. A discriminative model doesn't try to produce new data — it draws boundaries between categories of existing data. Spam filters, credit-score predictors, and photo classifiers ("is this a cat or a dog?") are discriminative. Given an input, a discriminative model answers a question about it. A generative model, given nothing (or almost nothing), produces an input.

The technical way to state this: a discriminative model learns P(label|data) — the probability of a label, given the data. A generative model learns P(data) itself — the probability distribution over all possible data. A probability distribution here just means a function that assigns a likelihood to every possible outcome. For a coin flip, the distribution is simple: 50% heads, 50% tails. For "all possible images," the distribution is unimaginably more complex — but the idea is the same. A trained generative model has built an internal approximation of "how likely is this particular arrangement of pixels (or words) to be a realistic photo (or sentence)?"

Once a model has learned that distribution, it can sample from it — that is, draw a random example weighted by likelihood, the way rolling a loaded die produces outcomes according to the die's probabilities. Sampling is the actual "generation" step. Everything upstream (training) is about building an accurate distribution; everything downstream (inference) is about drawing samples from it.

About This Book

If you're a high school or college student trying to figure out how does ChatGPT actually work, a computer science major who wants a transformer model study guide before an exam, or a curious parent who keeps hearing about AI and wants generative AI explained simply, this book is for you.

This is an AI study guide for students that covers what is a large language model, how next-token prediction turns statistics into fluent sentences, why attention is the mechanism that makes transformers work, and how AI image generators work through diffusion — plus what diffusion models explained simply actually looks like in practice, from noise to finished image. It also covers pretraining, fine-tuning, and RLHF, and where these systems genuinely break down. A concise overview with no filler, built to get you oriented fast.

Read it straight through first. Then go back through the worked examples, and finish with the review questions at the end to check what actually stuck before your test, interview, or next late-night rabbit hole.

Keep reading

You've read the first half of Chapter 1. The complete book covers 6 chapters — readable in one sitting.

Continue reading on Amazon