Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a GPT model instance.
Prompt Engineering / GenAI
model = GPT([1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing image_size or latent_dim which are for image models.
✗ Incorrect
GPT models are built with layers, so specifying num_layers is correct.
2fill in blank
mediumComplete 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using num_layers which is for model architecture, not output size.
✗ Incorrect
DALL-E generates images, so image_size sets the output size.
3fill in blank
hardFix 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using layer counts or image sizes as step counts.
✗ Incorrect
Stable Diffusion typically uses many steps like 1000 for good quality sampling.
4fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up hidden size with image size or step count.
✗ Incorrect
GPT models use num_layers and hidden_size to define architecture.
5fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing latent_dim with number of layers or image size.
✗ Incorrect
Stable Diffusion uses many steps (1000), a latent dimension (512), and image size (256) for generation.