Checking how many agents are working

How this works
Kontakt
← Blog
A brass pocket watch and a folded paper note with a pencil resting beside it on a dark bench, lit in cold teal with a warm amber highlight, the AMARBARO mark and wordmark centered over them.
✎Blogbeitrag

Writing down a prediction before you measure

The short version

A prediction written down before a run shows which assumption was wrong, while a prediction made afterwards only confirms what happened.

Part 7 in Measuring things honestly. Earlier parts include why one run is not enough.

What this is about

Before you run a test, write down what you expect. A number, in a file, with the date and the reason.

Then run the test. If the result matches, good. If it does not, you have found something: one of your assumptions was wrong. That is the useful part.

This article is about that habit and one time it paid off.

Why it matters

After a result arrives, our minds are very good at telling a story in which we expected it. "Of course the cache helped, that makes sense." Memory is kind to us, and we forget how surprised we were.

A prediction on paper cannot be rewritten. It keeps the surprise honest. It also shows what we really believed about how the thing works, and that belief is the thing worth fixing.

How it works

Step 1: Write the number

Before the run, write the number you expect and the date. If there are several settings, write one number for each.

Step 2: Write the assumption

Write one sentence on why. "I expect this because the model reload will still happen." The reason is what you will check later.

Step 3: Freeze it

Save the note where you will not edit it. We call a note like this a preregistration, or prereg: a file written before the run that states what we expect and what would count as a pass or a fail.

Step 4: Run, then compare

Run the test. Put the real number beside the prediction. If they differ, look at the assumption, and not only at the number.

Step 5: Publish both

Publish the guess and the result together, even when the guess was wrong.

A real example

We were making short video clips on a server where a large text model, an encoder, sits next to the video model. We wanted to know how fast one shot could get.

Before the runs, we wrote down 40 seconds for a single-stage shot at 8 steps, 35 seconds at 6 steps, and 28 seconds at 4 steps. The reason we gave: 40 to 60 seconds of encoder and model swapping per shot would stay in every setting.

Then we measured. With the cache warm, the shots took 28 and 24 seconds at 8 steps, and 22 and 21 seconds at 6 steps. The prediction was too slow.

The swaps were the part we got wrong. On cache hits, the encoder was never loaded. The record shows zero encoder loads across the warm shots. Our reasoning had been sound if the swaps stayed, and they did not.

The note lines up with something we measured elsewhere on the same server: a first shot went from 95 seconds to 59 with a cache hit, and a warm shot from 85 to 49.

What else the number told us

There was a second lesson, which was not in the prediction at all.

Our goal for these shots was a real-time factor of 1 or below. That means one second of compute for each second of video. We started at 27: 72 seconds of compute for 2.7 seconds of video. The cache brought the shots to about 8 to 10 times real time.

That is a large gain, and it is still far from the goal. Writing the goal down next to the prediction made it impossible to call the result a win. The cache is not the road to real time.

We also noted what we could not say. The record had no walls for cache misses at these step counts, so we could not say whether our prediction held for them. A good note says what the data does not cover.

Another case: the twelve ideas

In a separate project we tried twelve ideas to improve a memory network. Five of them had a prereg file written before the run. For the other seven, our notes show a control arm and no prereg file, so we treat them with less trust. We said that in the open. The files that came first are the ones we trust most.

Rules of the habit

  1. Write the number and the date before the run.
  2. Write the assumption in one sentence.
  3. Do not edit the note afterwards. Add a new one if you must.
  4. Publish the guess beside the result.
  5. When you are wrong, look at the assumption first.

Glossary

  • Prediction: a number you write down before you run a test.
  • Preregistration (prereg): a file written before the run that states what you expect and what counts as a pass.
  • Assumption: something you believe without checking.
  • Cache: a store that keeps recent results so they do not need to be made again.
  • Encoder: a model part that turns your text into numbers the video model can use.
  • Real-time factor: seconds of compute per second of video.

Try it

Pick something you can time, such as how long a download takes. Write the time you expect on a piece of paper, with the reason. Run it. Is the reason still true?

You can read the full prediction, and how it went wrong, in Predicted 40 Seconds, Cache Made 24. More of our predictions are in the blog index. We would like to hear your own wrong guesses on gllm.forum.

What to remember

Write the guess down first. A wrong guess you wrote down is worth more than a right one you only remember.

Kommentare

Noch keine Kommentare.

Anmelden um zu kommentieren.