← Questions

LLM fine-tuning and generative models

0
GoogleAI/ML designLast asked Feb 2026

An AI/ML design interview question asked in Google's first round (coding), last asked Feb 2026. It tests fine-tuning, generative models and llm.

Explain how you would adapt a pretrained large language model to a new task or domain, and compare the main families of generative models. The interviewer wants the objectives, how training behaves, the trade-offs and the typical failures, not just names.

Requirements

  • Functional: cover full fine-tuning, supervised fine-tuning on instruction data, parameter-efficient methods (adapters, LoRA, prefix or prompt tuning) and preference tuning (RLHF, DPO); then autoencoders, variational autoencoders and VQ-VAE, and where they sit next to autoregressive and diffusion models.
  • Non-functional: limited labelled data, serving latency and cost, domain shift, safety.

Clarifying questions

  • How much labelled data is there, and how different is the target domain from pretraining?
  • What does serving look like: one model, or many tasks or customers on one base model?
  • What compute budget is there for training?
  • Is the goal new knowledge, a new format or style, or better instruction following?

What a strong answer covers

  • When prompting or retrieval is enough and fine-tuning is not worth it.
  • Full fine-tuning versus LoRA: memory, number of trained parameters, quality, and serving many adapters on one base model.
  • Failure modes: catastrophic forgetting, overfitting on small data, reward hacking and mode collapse in preference tuning, evaluation leakage.
  • Autoencoder objectives: reconstruction; the VAE's ELBO with its reconstruction and KL terms, the reparameterisation trick, blurry samples and posterior collapse; VQ-VAE's discrete codebook, commitment loss and codebook collapse.
  • How each family generates samples and what it is good at (representation learning, smooth latent spaces, discrete tokens for a second-stage model).
  • How you would evaluate the adapted model, including safety regressions.

Follow-ups

  • You have 2,000 labelled examples and a strict latency budget. What do you do?
  • How do you choose the LoRA rank and which layers to adapt?
  • Why do VAE samples tend to be blurry, and how do VQ-VAE or diffusion models avoid that?
  • After fine-tuning, the model refuses more safe requests. How do you find out why and fix it?

Where it's asked

  • Google · First round: coding · Last asked Feb 202645 min · Coding in a Google Doc, no syntax highlighting or autocomplete · No AI

What it tests

fine-tuning · generative models · llm

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing