ML Coding at Each Company
ML coding rounds differ more between companies than LeetCode rounds do. Some companies ask a classic algorithm in a phone screen, some hand over a paper figure, some give you broken code, and some ask for a model trained end to end in an hour. Knowing which kind you will get decides what to practice.
Everything below comes from candidates' interview reports, each linked to its question page. Formats change and vary by team and level, so treat this as what has been asked, not as a promise of what will be.
Anthropic
Anthropic's reports cover the widest range of formats, and they share one theme: the code has to run, and then you
have to show you understand it. A research engineer candidate described two back-to-back phone-screen rounds, one
of them ML fundamentals: hand-write a small neural network with a loss, then its forward and backward passes
(the question). An ML engineering phone screen asked the same
thing, deriving and writing an MLP's cost, gradient and backpropagation, and the candidate only just finished in
the hour. The onsite had an ML programming round: implement an unusual attention variant in PyTorch, make it run
and test it, then answer questions such as why the scores are scaled and why there is a norm
(the question). The candidate added that einsum is only a tool;
the round checks implementation and understanding.
Other reports show the other formats:
- From a paper. An ML phone screen handed over a figure from the Attention Free Transformer paper. The candidate wrote it in about five minutes, was then asked to write tests without being told what to look for, and realized the interviewer wanted overflow and numerical-stability tests (the question).
- An online assessment. A research scientist assessment, pure NumPy and no interviewer, built a one-layer transformer in five questions: softmax, an attention head, a single-layer transformer, then a question combining token embeddings with attention and bigram scores (the question).
- Debugging. A research engineer round on RL fundamentals asked candidates to debug GRPO training code:
NaNs from sampling without a softmax and from an advantage normalized without an epsilon, then questions on the probability ratio, clipping and why the printed ratio isn't 1 (the question). The Fellows program's CodeSignal assessment had a 60-minute Python debugging round on an existing NumPy codebase with failing unit tests (the question). - Applied ML. An ML engineer onsite, with all coding in Colab, asked candidates to train a harmful versus not-harmful classifier on a prompt dataset with pitfalls in the data, debug it after training, and discuss deployment; the candidate used scikit-learn (the question).
Anthropic also asks ML-adjacent coding in non-ML loops; a Growth software engineer phone screen was a tokenizer (the question). Prepare for backprop by hand, attention and its variants, numerical stability and debugging, and expect "why" questions after every piece of code.
Waymo
Waymo's reports center on classic algorithms in phone screens and model parts in onsites, written in a shared editor where the code must run. K-means is the most reported. A machine learning engineer phone screen asked for it from scratch with an emphasis on NumPy broadcasting and vectorization, followed by improving the initialization (the question). Software engineer phone screens asked it too, with the first k points as starting centroids and the stopping rule left to the candidate; one candidate had to write a function to parse the test input, and said the interviewer cared more about finishing than about the initialization.
The other rounds go deeper into model parts:
- A research scientist screen had no LeetCode: hand-write BatchNorm in Python (the question).
- A senior ML engineer onsite asked for a transformer encoder runnable in CoderPad, from the input through
QKV, multi-head attention and the feed-forward layer, then why the scores are divided by
sqrt(d_k), encoder-decoder versus decoder-only, and complexity (the question). - An ML intern phone screen was built around a classification problem: logistic regression versus a neural network, optimization algorithms and backpropagation (the question).
- An ML systems onsite had a debugging round on NumPy tensor helpers, with an aliasing bug in a zeros
constructor, a missing
axis=1and a conversion that truncated remainders (the question). The candidate noted it was not ML coding as such, and failed the round.
Not every ML-role screen is ML coding: one candidate for an ML-related role got a grid shortest-path question in the phone screen (the question), and an ML engineer onsite paired an ML coding round, which the candidate called simple, with a data structures round. Prepare k-means, normalization and the transformer block, and keep graph search fresh.
Nuro
Nuro's reports are machine learning phone screens with short NumPy tasks, and the theme is softmax and its
gradient done properly. A machine learning engineer phone screen, announced by the recruiter as coding and run by
a research scientist, asked for cross-entropy in NumPy and then for sampling without replacement from k colors
of balls with given counts, at O(log k) per sample (cross-entropy,
sampling). The candidate noted that prefix sums with binary
search only give sampling with replacement.
A new-grad machine learning phone screen asked for softmax with numerical stability, then for the backward pass and a gradient update, all in NumPy (the question); the same loop included a sparse matrix class. Another machine learning engineer phone screen asked for k-means, followed by complexity questions and detailed questions on the algorithms on the candidate's resume (the question). Prepare softmax and cross-entropy, sampling and k-means, and be ready to discuss anything on your resume at the level of its math.
Mercor
Mercor's ML engineer onsite reports describe the mini-project format: build and train a small language model in about an hour. One report had a 60-minute round, with a coding agent allowed, to implement an autoregressive LLM and train it end to end on Shakespeare, followed by questions on transformer fundamentals: the architecture, pre- versus post-norm, self-attention, position embeddings, and greedy, beam, top-k and top-p decoding (the question). Another described an hour of coding plus 30 minutes of review on a nanoGPT-style model and transformer fundamentals (the question), and stressed that the company weighs communication heavily, so pitch your explanations to what the interviewer knows.
The other rounds in those loops were a coding question about finding the top k with a noisy comparator, and system design. Prepare Train a Tiny GPT end to end, plus decoding and positional encoding for the follow-ups. With an agent allowed, the graded part shifts to how quickly you get a correct, training model and how well you explain it.
What the Reports Have in Common
Across companies, four patterns repeat, and they are worth more than any single question:
- The code must run. Shared editors such as CoderPad, Colab and CodeSignal run your code, and several interviewers asked for tests on the spot. Code that looks right but was never executed doesn't pass.
- The follow-ups test understanding. Why scale by
sqrt(d_k), why a norm, why the printed ratio isn't 1, what the complexity is, how to initialize better. Have a one-paragraph answer for the "why" behind every line. - Numerical stability is tested directly. Overflow tests, stable softmax, epsilons in normalizations: they show up in from-scratch, debugging and test-writing prompts alike.
- Debugging is its own format. Anthropic and Waymo both ran rounds built on someone else's broken code, so practice reading code and tests as much as writing it.
Key Takeaways
- Anthropic: backprop by hand, attention variants in PyTorch, paper-to-code with stability tests, NumPy assessments and debugging rounds, with "why" questions after the code.
- Waymo: k-means with vectorization in phone screens (software roles too), BatchNorm and a transformer encoder in deeper rounds, a NumPy debugging round, and graph search in some ML screens.
- Nuro: short NumPy tasks in phone screens: stable softmax, cross-entropy and its gradient, sampling, k-means.
- Mercor: train a small autoregressive model end to end in about an hour, then transformer fundamentals.
- Everywhere: runnable code, tests, numerical stability and a clear explanation.