Write the code behind machine learning

63 problems, from your first NumPy array to the attention inside a GPT. Solve each one in your browser, then practice it at full scale in our labs.

one_step.py10 of 10 tests passed
import numpy as np def gradient_step(params, grads, lr): # Step against the gradient. return params - lr * grads w = np.array([-2.6, 1.35]) lr = 0.15 for step in range(30): w = gradient_step(w, grad(w), lr)
step 12 · loss 0.011lr 0.15

The path

Twelve steps in order. Each one builds on the one before.

Preparing for an AI interview?

Cases at the level of the rounds candidates report at Anthropic, OpenAI and NVIDIA, with worked answers.

Interview prep

Solving is open to everyone. The worked solution to each topic's first problem is free; the others come with Pro, along with the labs.