Learn to use generative AI techniques to create novel text, images, audio, and even music with this practical, hands-on book. Readers will understand how state-of-the-art generative models work, how to fine-tune and adapt them to their needs, and how to combine existing building blocks to create new models and creative applications in different domains.
This go-to book introduces theoretical concepts followed by guided practical applications, with extensive code samples and easy-to-understand illustrations. You'll learn how to use open source libraries to utilize transformers and diffusion models, conduct code exploration, and study several existing projects to help guide your work.
Build and customize models that can generate text and images
Explore trade-offs between using a pretrained model and fine-tuning your own model
Create and utilize models that can generate, edit, and modify images in any style
Customize transformers and diffusion models for multiple creative purposes
Train models that can reflect your own unique style
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A practical, code-first guide to building with open-source generative AI: you'll learn how transformers and diffusion models actually work, then fine-tune and combine them to generate text, images, audio, and music. Best for developers and technically curious creatives who want hands-on skills rather than pure theory.
【Book Arc】
- **Opening (~0%–10%)**: Frames the generative AI landscape — a short history from rule-based systems through CNNs, RNNs, and GANs to today's transformers and diffusion models — and sets up the book's three-part structure and ethical/regulatory context.
- **Early (~10%–35%)**: Builds the transformer foundation: tokenization, embeddings, attention, encoder vs. decoder vs. encoder-decoder architectures, and text generation with open-source libraries, ending with known limitations (model size, context length).
- **Middle (~35%–55%)**: Moves into representation learning — autoencoders and VAEs (latent space, sampling, KL loss) and CLIP-style contrastive image-text embeddings — the conceptual bridge toward image generation.
- **Late (~55%–85%)**: Core diffusion material: the iterative-refinement insight, training a diffusion model (noise, UNet, sampling, evaluation), and adapting pretrained models for editing and style.
- **Ending (~85%–100%)**: Extends beyond images into new modalities such as audio and music, plus creative applications that combine existing building blocks into new models.
【Key Takeaways】
- **Generative AI is best learned by building, not just reading** (Opening): the book pairs every concept with runnable code, exercises, and challenges, so expect to type along rather than skim.
- **Tokenization shapes everything downstream** (Early): subword schemes explain why "stormy" splits into "storm"+"y", and mismatching a model with the wrong tokenizer breaks results.
- **Architecture choice follows the task** (Early): causal (decoder-only) models predict the next token; masked (encoder) models build rich representations; encoder-decoder suits sequence-to-sequence work like translation.
- **Latent spaces are the engine of generation** (Middle): autoencoders compress data, and VAEs add a probabilistic twist — sampling from a learned distribution — that later underpins diffusion.
- **CLIP connects language and images** (Middle): contrastive training aligns text and image embeddings, enabling zero-shot classification and semantic image search.
- **Diffusion works by iterative refinement** (Late): instead of one-shot generation, the model repeatedly denoises, which is why it surpassed GANs in image quality.
- **Pretrained vs. fine-tuned is a real trade-off** (Late): the book repeatedly weighs reusing existing models against training your own to reflect a unique style.
- **Skills transfer across modalities** (Ending): the same transformer and diffusion ideas extend to audio and music, so domain-specific chapters still reward general readers.
【Reading Tips】
- Read Part I (transformers) carefully even if you only care about images — the tokenization and attention concepts recur throughout.
- Treat the code samples as mandatory: run the tokenizer, pipeline, and autoencoder examples yourself; the exercises are where understanding solidifies.
- Skim the historical and ethics/regulation passages on a first pass, then return to them when thinking about deployment and bias.
- Slow down on VAEs and diffusion training (noise schedules, UNet, KL loss) — these are the hardest conceptual jumps and the payoff for the image chapters.
- Use the chapter summaries and "further reading" lists as a map; chapters are written to be self-contained, so jumping to your modality of interest is fine.
【Coverage Limits】
The excerpts cover the book's structure, transformer fundamentals, autoencoders/VAEs, CLIP, and the start of diffusion, but do not detail the audio/music chapters or specific fine-tuning recipes. Claims about later chapters are inferred from the table of contents and part descriptions.
ages with astonishing realism. Although quite powerful, the quality of GANs has been surpassed by diffusion models in recent years. Where We’ve Been and Wher...
of millions of US dollars to train—just in computing power. That means that only a small set of institutions can train very large base mod‐ els, limiting the...
resent an input item, but the mission of the decoder is the same: given a point in latent space (z), show the pixels whose encoded representation is most sim...
il.ly/pc0EP. Esser, Patrick, Robin Rombach, and Bjorn Ommer. “Taming Transformers for High- Resolution Image Synthesis.” arXiv, June 23, 2021, https://arxiv....
x pooling, which selects the maximum value in a given patch. Pooling is applied independently to all the channels of the input tensor. In Depth: UNets and Al...
72 | Chapter 5: Stable Diffusion and Conditional Generation Project Time: Build an Interactive ML Demo with Gradio Until now, we’ve focused on running transf...
trix=cm, display_labels=label_names) Classifying Text | 201 This table is not exhaustive; there are many other open LLMs, such as Google Gemma, Mosaic MPT, a...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Hands-On Generative AI with Transformers and Diffusion Models (Omar Sanseviero, Pedro Cuenca etc.)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share to WeChat Moments
Hands-On Generative AI with Transformers and Diffusion Models (Omar Sanseviero, Pedro Cuenca etc.)(Z-Library)
Scan the QR code with WeChat to open this book
Tap the ··· menu in the top-right corner
Choose Share to Moments
You are already in WeChat. Tap ··· in the top-right corner and choose Share to Moments.
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Hands-On Generative AI with Transformers and Diffusion Models (Omar Sanseviero, Pedro Cuenca etc.)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment