2 weeksIntermediate1 h a dayWeek 1 free

Interview sprint in 2 weeks

Two weeks before an ML or AI engineer interview. Week 1 covers the maths and model questions that come up most, week 2 the LLM and systems rounds. About an hour a day, with a timed mock at the end of each week.

Start hereCompute every pairwise distance without a Python loop0 of 26 steps done on this device · Week 1 · Problem
Start
Week 1You are here

The questions that come up most

0 of 13 done · 12 problems
  1. ProblemCompute every pairwise distance without a Python loopEasy
  2. ProblemOne-hot encode class labels with fancy indexingEasy
  3. ProblemTrack mean and variance of a stream in one passEasy
  4. ProblemCompute the KL divergence between two diagonal GaussiansEasy
  5. ProblemCompute precision, recall and F1 from predictionsEasy
  6. ProblemMeasure how overconfident a classifier is with expected calibration errorEasy
  7. ProblemBinary cross-entropy straight from logitsEasy
  8. ProblemImplement GELU, the activation inside GPT and BERTEasy
  9. ProblemAdd momentum to gradient descentEasy
  10. ProblemClip a list of gradients by their combined global normEasy
  11. ProblemGenerate sinusoidal position encodingsEasy
  12. ProblemMeasure how focused each attention row is with entropyEasy
  13. MockTimed mock: ML Engineer
Week 2

LLM and systems rounds

0 of 13 done · 12 problems
  1. ProblemWrite scaled dot-product attention with a causal maskMedium
  2. ProblemSplit and merge attention headsMedium
  3. ProblemKeep the nucleus: top-p filteringMedium
  4. ProblemApply repetition, frequency and presence penalties to logitsMedium
  5. ProblemSplit a document into overlapping chunksMedium
  6. ProblemCombine keyword and vector scores with min-max normalizationMedium
  7. ProblemGenerate one token at a time with a KV cacheMedium
  8. ProblemAllocate KV cache memory in pages, like vLLMMedium
  9. ProblemVerify a draft model's guesses in speculative decodingMedium
  10. ProblemWrite the loop that runs a tool-calling agentMedium
  11. ProblemRetry a flaky tool with exponential backoffMedium
  12. ProblemQuantize weights to int8 and measure the errorMedium
  13. MockTimed mock: AI Engineer

Progress is saved in this browser. Solved problems, lessons you marked done and mocks you took tick themselves; tick anything else by hand.

Other plans: AI Engineer in 4 weeks, ML Engineer in 6 weeks, LLM internals in 3 weeks, ML and LLM engineer in 4 weeks, ML foundations in 8 weeks.