0
0
Prompt Engineering / GenAIml~10 mins

Key models overview (GPT, DALL-E, Stable Diffusion) in Prompt Engineering / GenAI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a GPT model instance.

Prompt Engineering / GenAI
model = GPT([1])
Drag options to blanks, or click blank then click option'
Alatent_dim=512
Bimage_size=256
Cnum_steps=1000
Dnum_layers=12
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing image_size or latent_dim which are for image models.
2fill in blank
medium

Complete the code to generate an image using DALL-E.

Prompt Engineering / GenAI
image = dalle.generate(prompt, [1]=256)
Drag options to blanks, or click blank then click option'
Anum_layers
Bimage_size
Cnum_steps
Dlatent_dim
Attempts:
3 left
💡 Hint
Common Mistakes
Using num_layers which is for model architecture, not output size.
3fill in blank
hard

Fix the error in the Stable Diffusion sampling code.

Prompt Engineering / GenAI
sample = diffusion.sample(num_steps=[1])
Drag options to blanks, or click blank then click option'
A1000
B512
C256
D12
Attempts:
3 left
💡 Hint
Common Mistakes
Using layer counts or image sizes as step counts.
4fill in blank
hard

Fill both blanks to define a GPT model with 12 layers and 768 hidden size.

Prompt Engineering / GenAI
model = GPT(num_layers=[1], hidden_size=[2])
Drag options to blanks, or click blank then click option'
A12
B768
C256
D1000
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up hidden size with image size or step count.
5fill in blank
hard

Fill all three blanks to generate an image with Stable Diffusion using 1000 steps and 512 latent dimension.

Prompt Engineering / GenAI
output = diffusion.generate(steps=[1], latent_dim=[2], image_size=[3])
Drag options to blanks, or click blank then click option'
A1000
B512
C256
D12
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing latent_dim with number of layers or image size.