Generative AI · Interview Prep Part 7

Text, image, and multimodal generation — seen, not just read

“What is text generation?” is easy to memorize and hard to picture. This lab renders the three core generation styles in 3D: autoregressive token prediction, diffusion-style denoising, and multimodal fusion. Play with the dials, then drill the interview answers below.

Text mode. Each block is a token. The model predicts one token at a time, conditioned on everything before it — that's why output streams word by word. Higher temperature = flatter probability distribution = more surprising picks (taller, more colorful scatter).

The three generation styles in one paragraph each

Text generation is next-token prediction: the model outputs a probability for every token in its vocabulary (~50k–250k options), samples one, appends it, and repeats. Sampling knobs — temperature, top-p, top-k — trade determinism for creativity. Uses: chatbots, article drafting, code completion.

Image generation (diffusion) starts from pure noise and removes it over many steps, each step nudging pixels toward something that matches the text prompt's embedding. 20–50 denoising steps is typical; more steps generally means cleaner detail at higher compute cost. Uses: design mockups, product shots, concept art.

Multimodal generation maps different media into a shared embedding space so one model can read an image and write text about it, or read text and emit audio/video tokens. The key interview phrase: “a shared latent space aligns modalities so the model can condition on one and generate another.”

Interview drill — say it out loud

Q61What is text generation?
The process where a model creates human-like text from a prompt by repeatedly predicting the next token given all previous tokens (autoregression). Examples: chatbots, article and email drafting, code assistants, summarizers.
Q62What does temperature do?
It rescales the logits before sampling. Temperature < 1 sharpens the distribution (safe, repetitive); temperature > 1 flattens it (diverse, riskier). At 0 you get greedy decoding — the argmax token every time. Try it on the slider above: at 0 the token bars become uniform and predictable.
Q63How does diffusion generate images?
Training teaches a network to predict the noise that was added to real images. At generation time you start from random noise and iteratively subtract predicted noise, guided by the prompt embedding (classifier-free guidance), until an image emerges — watch the Image tab converge from static to structure.
Q64What makes a model “multimodal”?
It can consume and/or produce more than one modality — text, images, audio, video — usually via encoders that project each modality into a shared embedding space, plus a decoder conditioned on that space. Example: describing a chart (image→text) or generating a narrated clip (text→audio+video).
Q65Autoregressive vs. diffusion — when would you pick each?
Autoregression suits sequential, discrete data (text, code) and streams results token by token. Diffusion suits continuous, spatial data (images, audio) where global coherence matters and you can afford multi-step refinement. Some modern systems mix both (e.g., autoregressive planners over diffusion decoders).
Enjoy this tool? Build your own with Super