Module quiz

ML systems and interviews quiz

58 questions across 3 lessons. Choose an answer, check it, and read why each option is right or wrong.

Checking answers needs JavaScript. You can still read every question and option below.

0 of 58 answered

Keyboard: arrow keys move between options. Space or Enter selects the focused option.

ML system design: framing, budgets, two-stage retrieval, serving, rollout and monitoring18 questions

ObjectiveDecide whether a problem needs ML, turn a business goal into an objective, a metric and constraints, and run the nine-step design framework out loud with trade-offs.

  1. Question 1 of 58A product team wants a model to route support emails to one of three queues. A three-line keyword rule already routes 88% of emails correctly, and nobody has labelled any past emails. What is the best first move in a design discussion?

    Choose one answer.

  2. Question 2 of 58A feed model is trained to maximise predicted clicks. After launch, clicks per session rise 6% but orders per session fall 2%. Which statement explains the problem and the fix?

    Choose one answer.

  3. Question 3 of 58Which statements about running the nine-step design framework in an interview are correct? Select all that apply.

    Choose all that apply.

ObjectiveChoose batch, online or streaming inference, and do back-of-envelope capacity, latency-budget and cost estimates with stated assumptions, using percentiles and not means.

  1. Question 4 of 58A card-payment fraud check must answer within the payment request. It uses the card's embedding (changes weekly) and the number of transactions on that card in the last 10 minutes. Which inference design fits?

    Choose one answer.

  2. Question 5 of 58At peak a service receives 600 requests per second. Each request takes 40 ms. One server handles 6 requests at once, and you plan to load servers to 60% of that. How many servers do you need?

    Choose one answer.

  3. Question 6 of 58A service has a mean latency of 45 ms and a p99 of 126 ms. The product requirement is that 99% of requests finish within 100 ms. What is the right conclusion?

    Choose one answer.

  4. Question 7 of 58Each backend call is slower than its own p99 one time in 100, independently. A page waits for 10 such calls made in parallel. About what share of pages see at least one call slower than that p99?

    Choose one answer.

ObjectiveExplain why large systems retrieve, rank and re-rank, measure each stage with recall@k and NDCG@k, and sketch recommender, search, fraud and ads designs at overview level.

  1. Question 8 of 58In a two-stage system the retriever puts only 28% of a user's relevant items among its 200 candidates. The team replaces the ranker with a much more accurate one. What should they expect?

    Choose one answer.

  2. Question 9 of 58A ranker returns items x, y, z in that order with gains 0, 2 and 3. The ideal order is z, y, x. Using gain divided by log2(rank + 1), what is NDCG@3?

    Choose one answer.

  3. Question 10 of 58Which statements about the four designs (recommender, search, fraud, ads) are correct? Select all that apply.

    Choose all that apply.

  4. Question 11 of 58In a payments flow, a missed fraud costs $45 and wrongly declining a good customer costs $5 in friction. With calibrated fraud probabilities, at what probability should you start declining?

    Choose one answer.

ObjectiveName the serving levers (batching, caching, quantisation, distillation), keep training and serving features consistent, and roll a model out by shadow, canary and A/B.

  1. Question 12 of 58A batch costs 10 ms fixed plus 0.4 ms per item. Requests may wait for a batch only if the batch itself finishes within 30 ms. Ignoring the time spent filling a batch, what is the largest allowed batch?

    Choose one answer.

  2. Question 13 of 58Offline AUC was 0.91, and in production the model is clearly worse. Feature code was written twice, once in SQL for training and once in the service. Which fix attacks the cause most directly?

    Choose one answer.

  3. Question 14 of 58A new ranking model must show it runs at the right latency and that its scores look sane, with no change visible to users. Which rollout step is for that?

    Choose one answer.

  4. Question 15 of 58Quantising a model to 8-bit integers makes it 4x smaller and faster on your hardware. What should you do before sending it to production?

    Choose one answer.

ObjectiveMonitor a live ML system, spot feedback loops, design fallbacks and human review, and name the main sources of ML technical debt.

  1. Question 16 of 58A dashboard shows model accuracy unchanged for a month, yet users complain that results got worse. Accuracy is computed on the requests the model answered. The fallback rate (requests served by the popular-items default) rose from 0.5% to 6%. What most likely happened?

    Choose one answer.

  2. Question 17 of 58A ranking model is retrained every week on clicks from items that the previous model chose to show. The same few items dominate more each week. Which change addresses the cause?

    Choose one answer.

  3. Question 18 of 58Which of these are sources of ML technical debt named in the hidden technical debt paper's abstract? Select all that apply.

    Choose all that apply.

Training at scale: memory arithmetic, parallelism, mixed precision and scaling laws24 questions

ObjectiveAccount for training memory (weights, gradients, optimizer states, activations), compute the 16-bytes-per-parameter budget for mixed-precision Adam, and say whether a model fits on one device.

  1. Question 19 of 58You plan to fine-tune a 7-billion-parameter model with mixed-precision Adam (fp16 weights and gradients, fp32 copy and two fp32 moments). How much memory does the model state take, before activations?

    Choose one answer.

  2. Question 20 of 58Which statements about the 16-bytes-per-parameter figure for mixed-precision Adam are correct? Select all that apply.

    Choose all that apply.

  3. Question 21 of 58A 7B model must train on 8 devices of 80 GB each, with an estimated 20 GB of activations and 4 GB of overhead per device. Plain data parallelism needs 112 GB of state per device. Which is the smallest change that makes it fit?

    Choose one answer.

  4. Question 22 of 58A model trains fine at batch 16, with the model state sharded so each device holds 14 GB of 80. Doubling the batch to 32 gives an out-of-memory error. What is the most likely cause?

    Choose one answer.

ObjectiveScale batch size and learning rate with the linear scaling rule and warmup, use gradient accumulation without changing the gradient, and explain mixed precision with loss scaling and master weights.

  1. Question 23 of 58A run uses learning rate 0.2 at batch 512. You move to batch 4,096 and follow the linear scaling rule with warmup. What is the target rate after warmup?

    Choose one answer.

  2. Question 24 of 58Why does the linear scaling rule come with a warmup phase?

    Choose one answer.

  3. Question 25 of 58You accumulate gradients over three micro-batches of 6, 6 and 3 samples (15 in total). Their mean gradients are g1, g2 and g3. Which expression equals the mean gradient of the whole batch of 15?

    Choose one answer.

  4. Question 26 of 58Which statements about gradient accumulation are correct? Select all that apply.

    Choose all that apply.

  5. Question 27 of 58Why do fp16 training recipes keep an fp32 master copy of the weights?

    Choose one answer.

  6. Question 28 of 58During fp16 training with dynamic loss scaling, a step produces infinities in the gradients. What should the training loop do?

    Choose one answer.

  7. Question 29 of 58A team moves from fp16 to bf16 and removes loss scaling. What makes that usually work, and what do they give up?

    Choose one answer.

ObjectiveChoose between data parallelism (all-reduce, DDP), ZeRO/FSDP sharding stages, tensor parallelism and pipeline parallelism, and estimate communication time and the pipeline bubble.

  1. Question 30 of 58You move a model that fits on one device from 1 device to 8 devices with DDP, each device processing 1/8 of the global batch. What happens to the model-state memory on each device?

    Choose one answer.

  2. Question 31 of 58Averaging the gradients of a 14 GB model takes 0.551 s with a ring all-reduce over 64 devices on 50 GB/s links. Roughly how long does it take over 1,024 devices with the same links, ignoring latency?

    Choose one answer.

  3. Question 32 of 58Which description matches PyTorch's FSDP strategy FULL_SHARD, and what does it cost compared with DDP?

    Choose one answer.

  4. Question 33 of 58A pipeline has 6 stages and each batch is split into 10 microbatches. Using the simple schedule, what share of the whole step does a stage spend idle?

    Choose one answer.

  5. Question 34 of 58You train a very large model on 8 servers with 8 devices each, with fast links inside a server and slower links between servers. Which placement is the sensible default?

    Choose one answer.

ObjectiveTrade compute for memory with activation checkpointing, find data-loading bottlenecks, and plan checkpoints, failure recovery and reproducibility for long runs.

  1. Question 35 of 58A network has 36 layers. With activation checkpointing, k segments are kept and the peak is k + ceil(36 / k) layer-activation units. Which k gives the lowest peak, and what is it?

    Choose one answer.

  2. Question 36 of 58What does activation checkpointing cost?

    Choose one answer.

  3. Question 37 of 58Each training step computes for 0.2 s. One data-loader worker needs 0.7 s to prepare a batch, and workers run in parallel and overlap with compute. How many workers keep the accelerator fully busy?

    Choose one answer.

  4. Question 38 of 58Which statements about checkpoints and reproducibility in large runs are correct? Select all that apply.

    Choose all that apply.

ObjectiveEstimate training compute with FLOPs of about 6ND, turn it into days on a cluster, and explain what scaling laws and compute-optimal training say about model and data size.

  1. Question 39 of 58Using the 6ND rule, about how many floating-point operations does it take to train a 3-billion-parameter model on 600 billion tokens?

    Choose one answer.

  2. Question 40 of 58Following Hoffmann et al., a lab's training compute budget grows 4 times. How should model size and token count change for compute-optimal training?

    Choose one answer.

  3. Question 41 of 58A colleague says every model should be trained on exactly 20 tokens per parameter, because that is what the Chinchilla paper proved. What is the best response?

    Choose one answer.

  4. Question 42 of 58A run needs 1e22 FLOPs. You have 512 devices, each with a peak of 2e14 FLOP/s, and expect 50% utilisation. About how long will it take?

    Choose one answer.

The ML interview playbook: structure, answer method, debugging procedures, estimates and project defence16 questions

ObjectiveDescribe how ML interviews are commonly structured (fundamentals, coding, system design, applied case, project, behavioural) and match each round to the method that fits it.

  1. Question 43 of 58In a coding round you are asked: write a function that returns precision and recall from two lists of 0 and 1 labels. Which opening is best?

    Choose one answer.

  2. Question 44 of 58Which statements about how ML interviews are structured are sound? Select all that apply.

    Choose all that apply.

ObjectiveAnswer an open ML question with the ten-step method (clarify, assumptions, baseline, metric, data, model, evaluation, failure modes, trade-offs, monitoring) and explain a concept with the intuition, maths, code and pitfall ladder.

  1. Question 45 of 58A product manager asks: can we use ML to prioritise our support tickets? What do you do first?

    Choose one answer.

  2. Question 46 of 58You are asked why dropout works as a regulariser. Which answer order is strongest?

    Choose one answer.

  3. Question 47 of 58In the first minute you say "I would use gradient boosting", and the interviewer asks "compared to what?". Which steps of the method did you skip?

    Choose one answer.

ObjectiveTurn a model-debugging symptom (flat or NaN loss, a train-validation gap, suspected leakage, an offline and online mismatch) into an ordered first step, and say which earlier lesson fixes it.

  1. Question 48 of 58A new classifier's training loss does not move from the very first step. What do you do first?

    Choose one answer.

  2. Question 49 of 58A ranking model gained 0.01 NDCG offline. A two-week A/B test shows no change in orders. What is the cheapest sensible first check?

    Choose one answer.

  3. Question 50 of 58Your validation AUC is 0.99 on a task where a trivial baseline reaches 0.70. What do you do next?

    Choose one answer.

  4. Question 51 of 58Training loss becomes NaN at step 50. Which early moves are reasonable? Select all that apply.

    Choose all that apply.

ObjectiveDo quick estimates and sanity checks (base rates, majority baseline, label-shuffle check, parameters and FLOPs) and state how uncertain a metric is with an interval.

  1. Question 52 of 58A screening test has prevalence 0.3%, sensitivity 90% and a false-positive rate of 3%. Of everyone who tests positive, roughly what share are truly sick?

    Choose one answer.

  2. Question 53 of 58A new model scores 182 of 200 correct and the old one 176 of 200. The 95% Wilson intervals are 0.862 to 0.942 and 0.828 to 0.918. Which statement is sound?

    Choose one answer.

  3. Question 54 of 58A dense network has layer widths 10, 40 and 3 and each layer has a bias. How many parameters does it have?

    Choose one answer.

ObjectiveDefend a past project with the STAR structure, measured numbers and what you would change, avoid the common traps, and run a repeatable mock-interview routine.

  1. Question 55 of 58Which sentence is the strongest result line in a project story?

    Choose one answer.

  2. Question 56 of 58In a project deep dive you realise that you used a random row split on data with several rows per user. The interviewer asks how you avoided leakage. What is the best reply?

    Choose one answer.

  3. Question 57 of 58Which of these are common traps in an ML interview answer? Select all that apply.

    Choose all that apply.

  4. Question 58 of 58After a mock interview you got a question on evaluation wrong. Which follow-up is most useful?

    Choose one answer.

Boss challenge: ML systems, training at scale and interviews in practice

A longer check of the whole module. It is optional, and nothing else on the site depends on it.

  • 10 questions, taken from the lesson quizzes above.
  • Pass mark: 7 correct of 10.
  • You can try it as many times as you like.
  • A correct answer is kept, so a pass can build up across several tries.
  • If you miss some, you get links to the lesson sections to read again.

Checking answers needs JavaScript. You can still read every question and option below.

0 of 10 answered

Keyboard: arrow keys move between options. Space or Enter selects the focused option.

  1. Question 1 of 10A feed model is trained to maximise predicted clicks. After launch, clicks per session rise 6% but orders per session fall 2%. Which statement explains the problem and the fix?

    Choose one answer.

  2. Question 2 of 10At peak a service receives 600 requests per second. Each request takes 40 ms. One server handles 6 requests at once, and you plan to load servers to 60% of that. How many servers do you need?

    Choose one answer.

  3. Question 3 of 10A ranker returns items x, y, z in that order with gains 0, 2 and 3. The ideal order is z, y, x. Using gain divided by log2(rank + 1), what is NDCG@3?

    Choose one answer.

  4. Question 4 of 10A 7B model must train on 8 devices of 80 GB each, with an estimated 20 GB of activations and 4 GB of overhead per device. Plain data parallelism needs 112 GB of state per device. Which is the smallest change that makes it fit?

    Choose one answer.

  5. Question 5 of 10A run uses learning rate 0.2 at batch 512. You move to batch 4,096 and follow the linear scaling rule with warmup. What is the target rate after warmup?

    Choose one answer.

  6. Question 6 of 10A pipeline has 6 stages and each batch is split into 10 microbatches. Using the simple schedule, what share of the whole step does a stage spend idle?

    Choose one answer.

  7. Question 7 of 10Using the 6ND rule, about how many floating-point operations does it take to train a 3-billion-parameter model on 600 billion tokens?

    Choose one answer.

  8. Question 8 of 10In the first minute you say "I would use gradient boosting", and the interviewer asks "compared to what?". Which steps of the method did you skip?

    Choose one answer.

  9. Question 9 of 10A new classifier's training loss does not move from the very first step. What do you do first?

    Choose one answer.

  10. Question 10 of 10A screening test has prevalence 0.3%, sensitivity 90% and a false-positive rate of 3%. Of everyone who tests positive, roughly what share are truly sick?

    Choose one answer.