Mid-level interview questionAsked at Mistral AI · interview write-up
Explain the forward and reverse processes of a diffusion model, a common training objective, and how generation differs from training.
Model answer
The forward process is fixed: it adds Gaussian noise over T steps until data becomes noise, with a closed form for any step. The reverse process is learned: a network removes noise one step at a time.
# one DDPM training step, noise-prediction loss
t = torch.randint(0, T, (B,))
eps = torch.randn_like(x0)
a = alpha_bar[t].view(B, 1, 1, 1)
xt = a.sqrt() * x0 + (1 - a).sqrt() * eps
loss = F.mse_loss(model(xt, t), eps)
Training samples one random step per example. Generation starts from pure noise and runs the steps sequentially, so it's slow; DDIM samplers skip steps.
Practise the rest
12 Multimodal questions, 492 in all, each with a model answer. Free.
More from Mistral AI interview questions.
More Multimodal interview questions
- What has driven each generation of LLM improvements, how do multimodal LLMs work, and what role does normalisation play in LLMs?
- You need to deploy multimodal models under tight GPU and latency limits, and also support fast retrieval over video. How do you approach it?
- How does a vision encoder feed images into a multimodal LLM, and where are the bottlenecks?
- Design the training of a multimodal embedding model: architecture, supervision and losses, evaluation metrics and deployment.
- Turn a multimodal model that captions videos into a production service under tight compute and GPU memory limits.
- Design a classifier that assigns genres to games using text, images and tabular metadata, from label quality to serving and monitoring.