This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Notebooks · lib/gpt/story_gpt

A small GPT, trained in your browser on one repeated line and then asked to continue a prompt, to be read as a story:

viv story lib/gpt/story_gpt.viv

tells the run in the words of lib/gpt/gpt.intent and lib/nn.intent, one line per training step with its loss and gradient norm (the watches in lib/gpt/gpt.debug), then one line per sampled character. The program prints the model's size, the loss before the first step and at the last, and what the model wrote; the tests hold all four.

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • Explore

    Run it and step through what each part did, with the code, values and plots beside it.

Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.

[1]lines 13–53