cd /news/large-language-models/william-a-tiny-poetry-model-in-the-b… · home topics large-language-models article
[ARTICLE · art-41796] src=akshit.org ↗ pub= topic=large-language-models verified=true sentiment=· neutral

William: A tiny poetry model in the browser

William, a tiny poetry language model trained by a developer, runs entirely in the browser using ONNX Runtime Web. The 6-layer transformer was trained on the Gutenberg Poetry Corpus and fine-tuned on Poetry Foundation poems, then quantized to a 14 MB int8 model. Users can edit a title line and generate short poems locally without any server endpoint.

read1 min views1 publishedJun 27, 2026

William is a tiny local language model I trained to write short poems. The model on this page is loaded by the browser and sampled locally, one token at a time. There is no server endpoint behind the button.

William...

The title line is editable. William tokenizes it in the browser before generating the poem.

William is a small decoder-only transformer: 6 layers, 384 hidden dimensions, 6 attention heads, and a 256-token context window. I trained it locally with

MLX on Apple Silicon. The training pipeline was two-stage. First, the model learned general poem-shaped text from the biglam/gutenberg-poetry-corpus line corpus after filtering out Project Gutenberg boilerplate, headers, editorial apparatus, prose-like blocks, and non-English fragments. Then I fine-tuned it on title/body poem pairs from

, with extra filtering for rows that were too long or too prose-like for the short context window. I also used

`suayptalha/Poetry-Foundation-Poems`

[locally as a grading model to help reject low-fitness fine-tuning rows and audit pretraining artifacts.](https://huggingface.co/prism-ml/Bonsai-8B-mlx-1bit)

`prism-ml/Bonsai-8B-mlx-1bit`

For this page, the MLX checkpoint was converted to ONNX and dynamically quantized to int8. The page downloads that static model file and runs it with ONNX Runtime Web in your browser; the model asset is around 14 MB.
── more in #large-language-models 4 stories · sorted by recency
── more on @mlx 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/william-a-tiny-poetr…] indexed:0 read:1min 2026-06-27 ·