← Ziding Zhang

One Letter: a tiny language model picks the next letter by rolling a weighted die

A 34-second film of one real prediction inside microgpt, a 4,192-parameter GPT in pure Python. Every number on screen was recorded from the run.

November 14, 2026 · Project · What is not yet established


I wanted a short film that shows a language model making one choice, using only numbers taken from a real run. Claude, an AI model made by Anthropic, built the renderer, recorded the run and drafted this text for me.

One Letter, 1920×1080, 34 s, with sound. A vertical 9:16 cut is laid out separately for phones; it is not a crop of this one.

What you are watching

The model is microgpt, Andrej Karpathy’s single-file GPT written in plain Python with no libraries. It has 4,192 parameters: one layer, four attention heads and 16 numbers per letter. It was trained for 1,000 steps on about 32,000 first names from Karpathy’s makemore names.txt, and then it makes up new names one letter at a time.

The film follows one step of one invented name, kamon. The model has written ka and must choose the third letter.

  1. The letters become numbers. Each letter written so far becomes a column of 16 numbers.
  2. Attention. Each of the four heads looks back at earlier letters in its own way. One head spreads its weight almost evenly. Another puts 98% of its weight on the k.
  3. The MLP. The mix passes through a layer of 64 units, and 7 of them switch on.
  4. The 27 options. The result becomes a probability for each of 26 letters and “end of name”. The favourite is r, at 37%.
  5. The die. The model does not simply take the favourite. It draws a random number and walks along the probabilities until it passes it. This time it lands on m, at 2.7%.

That is not a rare accident. In this run, 67 of the 118 letters the model wrote were not its first choice. Sampling like this is why the same model gives different names on different runs.

Credits

Another film computed from data: Emission Time.

Agent context: sources, method and working notes

How it was made

  • Real numbers only. A copy of microgpt.py was given recording calls at seven points and nothing else changed. It printed the same 20 names as the unmodified script, which was the test for keeping the recording. The film shows only values from that recording.
  • Featured step chosen by a rule. The rule picks the first name of four letters or more with a step, at position 2 or later, where the model did not pick its favourite. It picked kamon. Nobody chose it by eye.
  • Every frame is a function of time. Each frame is drawn by Python code from the time t alone, so any moment can be rendered on its own. The sound is synthesised on the same timeline: the clicks of the die wheel fall exactly when the marker crosses each boundary. A script checks that every sound starts within one frame of its picture event.
  • Reviewed in stages. Brief, stills, rough cut, fixes and final mix were each checked before the next stage. After the first watch the film felt fast, so 9.7 s of pauses were added at points where the picture is still.

The process follows the “motion engineering” workflow described in a post on X: a written brief, a frame function you can jump to any time in, contact sheets for review, and sound placed on the same clock as the picture. The film’s source is public at sartoshi-foot-dao/one-letter: the renderer, the soundtrack, the sync checks, the recorded run and the notes from each review stage. The code is under MIT and the film under CC BY 4.0. The repository does not contain microgpt or the names data; a script downloads both and checks each against a fixed SHA-256 hash.

Changes
  • November 17, 2026: Shortened to the result and what it means; method, verification and limits moved under Agent context.
  • November 14, 2026: Linked the film's public source repository. The run was re-recorded from Karpathy's public gist and matched the original to floating-point rounding, so the film is unchanged.
  • November 14, 2026: First public version.

Have an answer, a counterexample, or a story? See Talk to me for open questions and live trials.

Credits: Ziding Zhang, with Claude (Anthropic) for the film, sound and recording code.