← All builds

ai/ml coursework · mba 290t · 2026

Seeing how language models learn by training a tiny one.

A word-level language model with 2 blocks and 4 heads, trained in about 14 seconds on a laptop. I ran it twice, on the starter corpus and then with my own files on grammar, opposites, and spatial relations, and scored both on the same 48 tests.

Role Builder · Team Solo · Timeline September 2026

Terminal chat with the tiny model and its odd replies

The problem

It's hard to build intuition for language models when the ones you use have billions of parameters. A model small enough to train in seconds makes every step visible: tokens, vectors, probabilities, and updates.

What I did

  • Predicted each result in writing before every run, then compared.
  • Wrote 355 new teaching passages on tense and agreement, opposites, and spatial relations, without reading the test items.
  • Trained two experiments with identical settings: 3,000 steps at a learning rate of 0.001, on a laptop CPU.
  • Traced one token all the way through: word to ID to vector to probability to gradient to update.
  • Built a small chat interface and was clear about what it is: a sentence continuer, not a chatbot.

Results

9 → 20of 48 tests, starter corpus
7 → 25of 48 tests, with my corpus
16/16familiar patterns
14 sto train

What I'd do differently

The model learned templates, not language. And because the public tests guided my choices, a good score doesn't prove it generalizes. Next: write my own held-out test set and never look at it while building the corpus.

Artifacts

Write-up and evidence on GitHub ↗