Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Transformers for Natural Language Processing and Computer Vision

You're reading from   Transformers for Natural Language Processing and Computer Vision Explore Generative AI and Large Language Models with Hugging Face, ChatGPT, GPT-4V, and DALL-E 3

Arrow left icon
Product type Paperback
Published in Feb 2024
Publisher Packt
ISBN-13 9781805128724
Length 730 pages
Edition 3rd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Denis Rothman Denis Rothman
Author Profile Icon Denis Rothman
Denis Rothman
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. What Are Transformers? 2. Getting Started with the Architecture of the Transformer Model FREE CHAPTER 3. Emergent vs Downstream Tasks: The Unseen Depths of Transformers 4. Advancements in Translations with Google Trax, Google Translate, and Gemini 5. Diving into Fine-Tuning through BERT 6. Pretraining a Transformer from Scratch through RoBERTa 7. The Generative AI Revolution with ChatGPT 8. Fine-Tuning OpenAI GPT Models 9. Shattering the Black Box with Interpretable Tools 10. Investigating the Role of Tokenizers in Shaping Transformer Models 11. Leveraging LLM Embeddings as an Alternative to Fine-Tuning 12. Toward Syntax-Free Semantic Role Labeling with ChatGPT and GPT-4 13. Summarization with T5 and ChatGPT 14. Exploring Cutting-Edge LLMs with Vertex AI and PaLM 2 15. Guarding the Giants: Mitigating Risks in Large Language Models 16. Beyond Text: Vision Transformers in the Dawn of Revolutionary AI 17. Transcending the Image-Text Boundary with Stable Diffusion 18. Hugging Face AutoTrain: Training Vision Models without Coding 19. On the Road to Functional AGI with HuggingGPT and its Peers 20. Beyond Human-Designed Prompts with Generative Ideation 21. Index
Appendix A: Revolutionizing AI: The Power of Optimized Time Complexity in Transformer Models 1. Appendix B: Answers to the Questions

DALL-E 2 and DALL-E 3

DALL-E, as with CLIP, is a multimodal model. CLIP processes text-image pairs. DALL-E processes the text and image tokens differently. DALL-E 1 has an input of a single stream of text and image of 1,280 tokens. 256 tokens are for the text, and 1,024 tokens are used for the image.

DALL-E was named after Salvador Dali and Pixar’s WALL-E. The usage of DALL-E is to enter a text prompt and produce an image. However, DALL-E must first learn how to generate images with text.

This transformer generates images from text descriptions using a dataset of text-image pairs.

We will go through the basic architecture of DALL-E to see how the model works.

The basic architecture of DALL-E

Unlike CLIP, DALL-E concatenates up to 256 BPE-encoded text tokens with 32×32 = 1,024 image tokens, as shown in Figure 16.11:

A screenshot of a video game  Description automatically generated with medium confidence

Figure 16.11: DALL-E concatenates text and image input

Figure 16.11 shows that, this time, our cat image is concatenated with...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime