The Doc Quatrain Corpus

Ten short poems by a writer who does not exist, and everything needed to train a model on them. Downloadable one file at a time, until I move all of it to GitHub.

What This Is

The training corpus and the runnable kit for Fine-Tuning at Home. Everything here is what the series actually uses, so you can reproduce it against the same bytes.

Doc Quatrain is invented and none of these incidents happened to anybody. The corpus was written to be trained on, and a rhyming voice was chosen so the result can be checked from across the room rather than argued about.

There is no repository yet. All of this is going to GitHub eventually, and until it does, each file is fetched on its own from this page.

Running It

From an empty directory to a trained adapter. Download the files below into one folder, then:

python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

python3 build_corpus.py     # -> train.jsonl, holdout.jsonl
python3 train.py            # -> out/adapter
python3 generate.py "Write a field note about monitoring that failed silently."

# the smaller track, about 6 GB of VRAM instead of 11
BASE_MODEL=Qwen/Qwen3-1.7B python3 train.py

build_corpus.py needs nothing but Python. train.py needs an NVIDIA GPU. Both default to their own directory, so they run from inside this folder with no arguments and no paths to edit.

The Kit

README.md 5 KB

What this is, the voice it encodes, and how to run the kit.

Python packages for the training run.

Turns the ten poems into the two JSONL files. Standard library only.

train.py 5 KB

The fine-tune itself: QLoRA on one GPU.

Generate from the trained model, and from the base, at matched settings.

The same run as an Axolotl config, if you would rather use one.

train.jsonl 13 KB

8 training examples, built from the poems below.

2 examples held back, never shown to the training run.

The Ten Poems

05

Held out. Never shown to the training run, so there is something to test against that the model cannot have memorized.

10

Held out. Never shown to the training run, so there is something to test against that the model cannot have memorized.