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. Question 1 of 10.

    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. Question 2 of 10.

    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. Question 3 of 10.

    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. Question 4 of 10.

    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. Question 5 of 10.

    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

    Type a number: 0.25, -2, 3/4 and sqrt(2) all work.

  6. Question 6 of 10.

    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? Enter the ratio as a number; scientific notation such as 2.5e4 is accepted.

    ratio

    Type a number: 0.25, -2, 3/4 and sqrt(2) all work.

  7. Question 7 of 10.

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

  8. Question 8 of 10.

    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. Question 9 of 10.

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

    entries

    Type a number: 0.25, -2, 3/4 and sqrt(2) all work.

  10. Question 10 of 10.

    Run the tests before you submit. This question counts as correct if your latest run passes every check.

    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.

    ⌘+Enter runsPython sleeps until you run code
    Write your code where the starter says raise NotImplementedError, then press Run tests. Each check says what it expects.
0 of 10 answered. Unanswered questions count as wrong.