← All free books
Cover of The Why Book of Deep Learning

free to read · 739 pages

The Why Book of Deep LearningPart 2

by Dr. Philemon Paul Daniel

Language models, vision, generative models, other kinds of data, learning by acting, and taking models to production, with a Keras notebook for every chapter. Chapters 33 to 64: the sequel to Part 1, for engineering students and working professionals. Every lab runs on a laptop CPU in about five minutes.

Chapters

Click a chapter to open it as a book you can flip through. The chips under a chapter open its notebooks in Google Colab, free, with nothing to install.

  1. ·Cover, how to use this book, contents5 pages
  2. Part VIII · Language Models
  3. 33Tokenizers: From Text to Integerspp. 3–26
  4. 34Position: Telling a Transformer Where Things Arepp. 27–48
  5. 35Building a Small GPTpp. 49–68
  6. 36Generating Text: Every Decoding Method, and Whenpp. 69–100
  7. 37Three Families: BERT, GPT and T5pp. 101–122
  8. 38Pretraining at Scalepp. 123–144
  9. Part IX · Putting Big Models to Work
  10. 39Fine-Tuning: Standing on a Pretrained Modelpp. 147–166
  11. 40LoRA and Other Small Adapterspp. 167–186
  12. 41Prompting and In-Context Learningpp. 187–208
  13. 42Retrieval-Augmented Generationpp. 209–230
  14. 43Tools and Agentspp. 231–252
  15. 44Shaping Behaviour: Instruction Tuning, RLHF and Evaluationpp. 253–274
  16. Part X · Seeing More
  17. 45Vision Transformerspp. 277–298
  18. 46Object Detectionpp. 299–320
  19. 47Segmentation and the U-Netpp. 321–342
  20. 48Self-Supervised Learningpp. 343–364
  21. 49CLIP and Multimodal Modelspp. 365–386
  22. Part XI · Imagining in Depth
  23. 50Diffusion by Handpp. 389–410
  24. 51Guidance, Samplers and Latent Diffusionpp. 411–432
  25. 52Flow Matching and Fast Generationpp. 433–452
  26. 53Sound: Speech and Audiopp. 453–474
  27. Part XII · Other Shapes of Data
  28. 54Graph Neural Networkspp. 477–498
  29. 55Time Series and Forecastingpp. 499–518
  30. 56Tables and Recommenderspp. 519–540
  31. 57Reinforcement Learning: Learning from Rewardpp. 541–560
  32. 58Deep Reinforcement Learningpp. 561–582
  33. Part XIII · Small, Fast and Shipped
  34. 59Where the Time and Memory Gopp. 585–606
  35. 60Smaller Models: Quantization, Pruning and Distillationpp. 607–638
  36. 61Shipping and Watching a Modelpp. 639–660
  37. Part XIV · Trust and Craft
  38. 62Looking Inside: Interpretabilitypp. 663–684
  39. 63Robustness, Uncertainty and Calibrationpp. 685–706
  40. 64The Big Cheat Sheets, Part 2pp. 707–734

The notebooks

Every lesson that can be run has a Keras notebook: checked, run from top to bottom and saved with its outputs, so you can read the results before you run anything. They live in github.com/phildani7/why-book-of-deep-learning-part-2, each named after its main chapter. Tested with TensorFlow 2.21 and Keras 3.14.

Ch.NotebookRunSource
33ch33_LabCh33_Tokenizers_BPE_By_Hand.ipynbOpen in ColabGitHub
34ch34_LabCh34_Position_Encodings.ipynbOpen in ColabGitHub
35ch35_LabCh35_TinyGPT.ipynbOpen in ColabGitHub
36ch36_LabCh36_Decoding_Methods.ipynbOpen in ColabGitHub
37ch37_LabCh37_Masked_vs_Causal.ipynbOpen in ColabGitHub
38ch38_LabCh38_Scaling_In_Miniature.ipynbOpen in ColabGitHub
39ch39_LabCh39_Fine_Tuning.ipynbOpen in ColabGitHub
40ch40_LabCh40_LoRA_By_Hand.ipynbOpen in ColabGitHub
41ch41_LabCh41_In_Context_Learning.ipynbOpen in ColabGitHub
42ch42_LabCh42_Tiny_RAG.ipynbOpen in ColabGitHub
43ch43_LabCh43_Tool_Loop.ipynbOpen in ColabGitHub
44ch44_LabCh44_Evaluating_Models.ipynbOpen in ColabGitHub
45ch45_LabCh45_Tiny_ViT.ipynbOpen in ColabGitHub
46ch46_LabCh46_Detection_By_Hand.ipynbOpen in ColabGitHub
47ch47_LabCh47_Tiny_UNet.ipynbOpen in ColabGitHub
48ch48_LabCh48_Contrastive_Pretraining.ipynbOpen in ColabGitHub
49ch49_LabCh49_Tiny_CLIP.ipynbOpen in ColabGitHub
50ch50_LabCh50_Diffusion_By_Hand.ipynbOpen in ColabGitHub
51ch51_LabCh51_Guidance_And_Fast_Sampling.ipynbOpen in ColabGitHub
52ch52_LabCh52_Flow_Matching_2D.ipynbOpen in ColabGitHub
53ch53_LabCh53_Sound_By_Hand.ipynbOpen in ColabGitHub
54ch54_LabCh54_Graph_Networks.ipynbOpen in ColabGitHub
55ch55_LabCh55_Forecasting_Honestly.ipynbOpen in ColabGitHub
56ch56_LabCh56_Two_Tower_Recommender.ipynbOpen in ColabGitHub
57ch57_LabCh57_Q_Learning_Grid_World.ipynbOpen in ColabGitHub
58ch58_LabCh58_DQN_CartPole.ipynbOpen in ColabGitHub
59ch59_LabCh59_Profiling_A_Training_Run.ipynbOpen in ColabGitHub
60ch60_LabCh60_Shrinking_A_Model.ipynbOpen in ColabGitHub
61ch61_LabCh61_Ship_And_Watch.ipynbOpen in ColabGitHub
62ch62_LabCh62_Looking_Inside.ipynbOpen in ColabGitHub
63ch63_LabCh63_Fool_It_Then_Calibrate_It.ipynbOpen in ColabGitHub

Reviews

What readers think of the book. Every rating counts in the average; names are shown only when a reader gives one.

Loading the reviews…