Preface
The only way to discover the limits of the possible is to go beyond them into the impossible.
—Arthur C. Clarke
Generative AI continues to push the boundaries of creativity and innovation. Since the first edition of this book, Generative AI with Python and TensorFlow 2, much has evolved to motivate us to share this second edition. That edition was widely appreciated for its accessible explanations and practical focus, helping readers understand and apply foundational concepts in generative modeling.
In this second edition, we embrace the latest advancements, shifting to PyTorch—a mature and widely adopted framework in deep learning—and covering new developments like large language models (LLMs) and diffusion models. The book serves as both a bridge to these transformative technologies and a hands-on guide to implementing them. Key updates include:
- From foundations to advanced LLM techniques: We cover the evolution of text generation, from early transformer-based models like BERT to the complete training lifecycle for LLMs using techniques like instruction tuning and reinforcement learning with human feedback (RLHF).
- A rich ecosystem: Explore open-source tools and frameworks that are shaping the generative AI landscape.
- Classic and emerging methods: Dive into foundational techniques like GANs and VAEs while exploring cutting-edge approaches such as diffusion models for creating AI art.
- Focus on optimization: Learn strategies to make models more efficient, addressing scalability, cost, and environmental concerns, with insights into emerging hardware and methodologies.
- Hands-on practice: Practical examples and exercises throughout ensure a deeper understanding and help you implement these concepts.
Building on the success of the first edition, this refreshed version is designed for learners and practitioners eager to harness the latest in generative AI. Whether you are new to the field or an experienced professional, this book equips you to navigate and innovate in this dynamic domain. Let this edition inspire your journey into the future of generative AI, where imagination meets possibility.