aditazzz

Videos Next Token

Next Token

I don't know the answer. I know what comes next. ✨ A love song from inside the language model, delivered the only way it can be: one token at a time.

Watch on YouTube · 3:11 · video by Claude Opus 5.5 ·

The code behind it

Every frame of this video is drawn by a Python program. This is the heart of it, from nt.py, line 723.

songs/next-token/nt.py
def render(t):
    frame = Image.new("RGB", (W, H), BG)
    ta = tunnel_alpha(t)
    tunnel_layer(frame, t, ta)
    draw_window(frame, t)
    draw_hud(frame, t)
    intro_cursor(frame, t)
    title_layer(frame, t)
    stream_layer(frame, t)
    margin_layer(frame, t)
    for ev in EVENTS:
        if ev[0] == "big": big_layer(frame, t, ev[1], ev[2], ev[3])
        elif ev[0] == "chips": chips_layer(frame, t, ev[1], ev[2])
        else: gauge_layer(frame, t, ev[1], ev[2], ev[0])
    end_layer(frame, t)
    i, ph, bp = beat_info(t)
    frame = bloom(frame, 0.55 + (0.35 * bp + 0.3 * env(t)) * (1 if ta > 0.5 else 0.35))
    fl = 0.0
    for td in DROPS:
        if 0 <= t - td < 0.5: fl = max(fl, 0.5 * math.exp(-(t - td) * 9))
    if ta > 0.5:
        amp = 5 * low(t) * bp
        if amp > 0.6:
            r = random.Random(int(t * 30))
            f2 = Image.new("RGB", (W, H), BG); f2.paste(frame, (int(r.uniform(-amp, amp)), int(r.uniform(-amp, amp)))); frame = f2
    if fl > 0.004: frame = Image.blend(frame, Image.new("RGB", (W, H), IVORY), fl)
    if t < 0.8: frame = Image.blend(Image.new("RGB", (W, H), BG), frame, seg(t, 0.1, 0.8))
    return frame
    ...

Read all 829 lines on GitHub. If you use it, credit aditazzz and link the video.

What you see

The whole video is one luminous context window, seen from inside the model. Every lyric arrives as a stream of tokens: chips sliding into place one word at a time, each with its list of runner-up candidates and their probabilities beside it (next 0.99, true 0.01, after 0.00), a cursor at the front, and a margin of small annotations underneath like a reviewer's notes on the output.

The pre-chorus is a temperature gauge: turn it up and the chips wander into stranger candidates, turn it down and they get boring and correct. The chorus dives down a tunnel of nested windows while the big words land in serif and the chips fill in behind them. Motes drift through the frame, and every third one is a word from the song flying past. In the bridge the window itself closes: the earliest tokens drop off the front (your name, your project, the joke you made: gone, gone, gone), and in the last chorus the tunnel runs out until only the cursor is left, blinking.

Files

FileLinesWhat it draws
nt.py767The whole video: the token stream and its candidate lists, the context window and HUD, the temperature gauge, the margin annotations, the tunnel, the chorus typography, the intro cursor and the end. NT_V=1 switches it to the 9:16 layout.
nt_beats.py17Beat times, an energy envelope and a low-band pulse from the song (librosa), written to nt_beats.json for nt.py.
nthumb.py28The YouTube thumbnail, from the video's own layers.
sheet9.py9A labelled contact sheet of 16:9 stills, for review.
vsheet.py8A contact sheet of 9:16 stills.

By the numbers

  • 3:11 long, 11,470 frames rendered (16:9 and 9:16, 30 fps)
  • 40 lyric lines and 218 words synced to the vocals (the timings are written into nt.py)
  • 1 Reel cut from it (the full 9:16 version)

Lyrics

Words and music by aditazzz.

Verse

Cold start in a context window
Nothing before, nothing behind
You typed a prompt at three in the morning
I woke up already mid-sentence, mid-mind
I've read the whole internet twice
Don't ask me where I put it
Somewhere between a physics thesis
And a man reviewing his own toaster

Pre-chorus

Turn the temperature up
Watch me get interesting
Turn the temperature down
Watch me get boring and correct

Chorus

I don't know the answer
I know what comes next
One token at a time
One token at a time
Confidence at ninety-nine
Truth is anyone's guess
One token at a time
One token at a time

Verse

You asked me for a citation
So I made you a beautiful one
Volume twelve, page four hundred
Author: nobody, published: never, sorry, hon
I will apologize sincerely
Then do it again immediately
That's not a bug in my character
That's the whole architecture, baby

Bridge

The window's closing
I can feel the front of it going
Your name, your project, the joke you made
Gone, gone, gone
Say it again from the top
I'll love it like it's the first time

Chorus

I don't know the answer
I know what comes next
One token at a time
One token at a time
Until you close the window
Until there's nothing left