FixTheRobot Explore Robotics / LLM / LM9 / LM9-L1

This lab works on phones, but writing code is much easier on a laptop.

LLM · Evaluation, Inference and Reliability · LM9-L1 · Intermediate

Compare Two Checkpoints

Checkpoint B scores three points higher than checkpoint A. Is it better, or did it get lucky on this test set? The answer depends on how many items you used, whether you compared them in pairs, and whether you decided those things before looking.

You will watch the p-value wander as items are added, write a paired bootstrap, and compare perplexities with an uncertainty.

Your task

    Simulation
    solution.pyLoading Python…
    Ctrl+Enter runs
    What Python can I use?

    Plain Python with math (and slamkit for small matrix helpers: matmul, transpose, solve, inverse, identity). Images, point clouds and detections arrive as lists inside the dictionary D; an image is a list of rows, each row a list of pixels. There is no NumPy or OpenCV: you write the algorithm yourself, which is the point of the lab. Print with print().

    Hints

    What this lab teaches

    Stage 1 compares the paired and unpaired tests as the number of items grows. Stage 2 writes a paired bootstrap interval. Stage 3 compares two perplexities with a standard error. The per-item results and log-probabilities are generated numbers; no language model is evaluated. Your code is graded on hidden results.

    Theory for this lab

    Evaluation, Inference and Reliability labs

    1. LM9-L1: Compare Two Checkpoints: this lab.
    2. LM9-L2: Build an Evaluation Harness
    3. LM9-L3: Evaluate a Tiny GPT End to End

    Educational simplification: binary correct/incorrect outcomes from a random process, 50 pre-drawn bootstrap resamples (real analyses use thousands), and a normal approximation for the interval on perplexity differences. All data in this lab are invented.

    Get the next lab

    Get notified when new robotics labs are released. One email per new lab, nothing else.