created November 27, 2026 · 10 min read
What more text did for my tiny language model
Same small model, same settings, 4.7 times as much Shakespeare. The error score on the original test text fell from 1.470 to 1.205, the biggest drop in the series, at no extra cost.
Question
In five earlier rounds, longer memory and a bigger model all hit the same ceiling: every run's best error score landed between 1.47 and 1.49. My guess was that the model had learned all it could from about one million characters of Shakespeare. So what happens if the same small model gets far more text to learn from?
Short answer
A lot. Trained on the complete works, 4.7 times as much text, the model's best score on the original test text dropped from 1.470 to 1.205. That's 20 times the biggest gain from any earlier change. It costs nothing extra, it barely memorises, and it does just as well on two plays it never saw. The one side effect: it now changes speaker less often than real scenes do, because the complete works have longer speeches and include poems.
Grade: A−.
The setup
- One change. Everything matches the best earlier setup, Round 2: the same model (6 layers, rows of 384 numbers, about 10.65 million settings), a 512-character window, 32 passages per step, the same dropout, the same random seed (1337), 5,000 training steps and the same learning-rate schedule. Only the practice text is different.
- The same test. Scores are still taken on the original held-back test text, the one every earlier round used, so the numbers line up with the rounds 1–5 post.
- A second, brand-new test. Two whole plays, Macbeth and Twelfth Night, were kept out of the practice text. No model in the series ever trained on them, so they're fair to all.
Preparing the text
- Source. The complete works from Project Gutenberg, which are public domain. I removed the Gutenberg header, footer and license.
- Same layout as before. The original text has a speaker name with a colon, then the speech, so I rewrote the complete works the same way. Stage directions, act and scene headings and cast lists came out.
- Same 65 characters. The model only knows 65 letters and symbols (Step 1). Curly quotes became straight ones, long dashes became two hyphens, accented letters lost their accents, and stray digits and brackets were dropped. Nothing new was added.
- No peeking. The original test text comes from The Taming of the Shrew and The Tempest, which are also in the complete works. I cut out every passage that matched it: 116,287 characters, 2.3% of the cleaned text. After that, no run of 8 words from the test text appears anywhere in the practice text.
Results at a glance
| Measure | Baseline | Round 2 | Round 6 | Round 7 |
|---|---|---|---|---|
| Practice text | 1.00M | 1.00M | 4.71M | 4.71M |
| Model settings | 10.65M | 10.65M | 10.65M | 25.21M |
| Best score (step) | 1.483 (2,250) | 1.470 (2,000) | 1.205 (4,750) | 1.179 (5,000) |
| End score | 1.675 | 1.646 | 1.206 | 1.179 |
| Two unseen plays | 1.692 | 1.664 | 1.338 | 1.338 |
| Speaker names per 1,000 | 4.18 | 2.50 | 1.84 | 1.69 |
| Copied stretches | 0.19% | 0.06% | 0.02% | 0.03% |
| Training time | 455 s | 456 s | 447 s | 802 s |
Scores are the held-back error score from Step 3: lower is better. Real test plays: 2.46 speaker names per 1,000 characters. The unseen-play scores use each model's best saved step. Round 7 is the bigger model on the same text as Round 6 (see below).
Error score while training
Step 3 shows the classic sign of memorising: the practice score keeps falling while the score on new text rises. On the small text, Round 2 ended with a gap of about 1.0 between the two. Round 6's gap is only 0.11. With 4.7 times as much to read, it never had the chance to learn the text by heart.
Every round on the same passages
The unseen plays rule out a lucky match with the original test text. Every model meets Macbeth and Twelfth Night for the first time, and Round 6 still wins by a wide margin.
Keeping track of who is in the scene
Fewer different names per 1,000 characters means the model keeps the same cast in a scene (Step 2 explains how it looks back). Round 6 goes past real scenes, to 1.84 against 2.46, and 82% of its speaker turns go to someone already in the scene (real: 75%). That isn't a memory problem. It copies the habits of its practice text: the complete works average 1.69 names per 1,000 characters against 2.16 in the small sample, partly because the poems have no speakers at all.
Writing quality and copying
Judged against the small sample's word list, Round 6 looks worse, but only because it uses real Shakespeare words the sample never contains. Against the complete works' word list it scores 98.9%, the same as the baseline. Only 0.02% of its 30-character stretches appear word for word in its practice text, the lowest in the series. Samples use the settings from Step 4: temperature 0.8, top 40, the same seed.
What I found
- The text was the limit. The same model, settings and cost, with 4.7 times the text, beat every earlier change many times over.
- It isn't a fluke of the test text. The gain holds on two plays no model trained on.
- More text stops the memorising. The score was still falling at the last step, with only a small gap between practice text and new text.
- It picks up the habits of what it reads. Longer speeches and poems in the practice text mean fewer speaker changes in what it writes.
Security analogy: one week of logs versus a month. Earlier rounds were like tuning an anomaly detector on one week of logs: bigger models and stricter rules all hit the same ceiling. This round gives the same small detector a full month of logs from the same company, with the test week removed so it can't cheat. It catches more on the test week and on two brand-new weeks, at the same cost, because it has seen far more normal behaviour. Where it breaks down: more logs from the same network are the same kind of data. Here the extra text is a different mix (longer speeches, poems, a different edition), so the model picked up slightly different habits, like changing speaker less often. And Shakespeare wrote no more plays, so this is the last easy pile of more text.
Round 7: a bigger model on the same text
One more run: Round 6 exactly, but with the bigger model from the rounds 1–5 post (8 layers, rows of 512 numbers, about 25.2 million settings). On the small sample, that model only memorised faster.
- Size barely helps once there's enough text. Its best score on the original test text is 1.179 against 1.205, a gap about as small as the ones between the earlier tweaks, from a single run. It no longer memorises, though: the practice and new-text scores stay close.
- The two models tie on unseen plays. Both score 1.338 on Macbeth and Twelfth Night.
- It costs 1.8 times as much. 802 seconds of training against 447, and 1.8 times the memory.
Grade: C+. The amount of text was the limit, and the small model is still the better deal.
Limits
- One seed. The setup ran once, with seed 1337. But the 0.27 gap is more than ten times any gap between the earlier rounds.
- A different edition. The complete works come from a different printing than the small sample, with slightly different spelling and punctuation. The cleanup matches the layout and the 65 characters, not every habit of the original.
- Overlap removal matches exact 8-word runs. Reworded near-copies could slip through, but a second, looser check found test-text matches no more often than for the brand-new plays.
- A different mix of text. More history plays and poems, longer speeches and no stage directions. That changes the speaker numbers and means they now compare against a different kind of text.
- Still improving. In 5,000 steps the model read the new text about 17 times over, against about 82 times for the small sample. Longer training might gain more.
- Coarse checkpoints. Scores were checked every 250 steps, so the true best could sit between checks.
Sources
- Model code: Andrej Karpathy's nanoGPT, open source under the MIT license.
- Original text: Tiny Shakespeare, from Karpathy's char-rnn.
- More text: The Complete Works of William Shakespeare from Project Gutenberg, public domain.
Earlier rounds: More memory or a bigger model? Five rounds on a tiny language model
Learn the pieces this tests: Step 1, how text becomes numbers · Step 2, how the model uses context · Step 3, how training sets the numbers · Step 4, how the model writes