ml.lab
Python sleeps until you run code
00 The map

Checkpoint

The map

Ten questions on the landscape and on reading numpy shapes, set in new situations rather than the lessons' wording. You need 8 of 10 to pass. Answer everything, then submit once; the feedback explains every item. For the code item, run the tests before you submit.

  1. 1

    A company fine-tunes an open-weight model on 50,000 support conversations written by its best human agents, with the usual next-token loss. An engineer counts the loss on every token, the customers' messages included, instead of only on the agents' replies. What is the main effect of that choice?

  2. 2

    A base model, straight out of pretraining with no post-training at all, receives the prompt "Write a haiku about rain." What is the most accurate expectation?

  3. 3

    A lab gives a model thousands of math problems with known answers. For each problem the model writes several solutions, a program checks each final answer, and a reinforcement-learning update makes the solutions that reached the right answer more likely. What is this?

  4. 4

    X has shape (4, 4): 4 examples with 4 features each. You want to center every row on its own mean, and you write X - X.mean(axis=1). What happens?

  5. 5

    At one position in the training text, the model gave the actual next token probability 0.250.25. What is the cross-entropy loss at that position? Use the natural logarithm and give 3 decimal places.

    loss
  6. 6

    A 3-billion-parameter model was pretrained on 6 trillion tokens. You fine-tune the same model for one pass over 40,000 examples averaging 1,500 tokens each. Using C≈6NDC \approx 6ND, how many times more compute did pretraining use than your fine-tuning run?

    ratio
  7. 7

    What do a convolutional network and a recurrent network have in common?

  8. 8

    R-CNN ran a CNN separately on each of about 2,000 proposed regions of an image. What was the main change in Fast R-CNN?

  9. 9

    In numpy, X has shape (32, 512) and W has shape (512, 128). How many numbers are in X @ W?

    entries
  10. 10
    Code itGreedy next-token accuracy

    A model has scored every token of a vocabulary of size VV at each of nn positions. scores has shape (n, V), and targets has shape (n,) with the id of the token that actually came next. Write greedy_accuracy(scores, targets): the fraction of positions where the highest-scoring token is the actual next token. Use numpy, no Python loops.

    ⌘↵ runsPython sleeps until you run code
10 still unanswered. Unanswered questions count as wrong.