Building a language model of one's own no longer requires a data centre. This tutorial trains one from scratch, tokenizer included, on one consumer GPU, and shows how to tell whether it is good for the tasks of a specialist domain. It proposes no new method. It releases a tested Python package and two notebooks in Brazilian Portuguese with autoregressive and masked diffusion generation on one network, a preregistered comparison protocol, legal tasks built from text alone with a Kneser-Ney floor and public yardsticks, reference numbers for models of 11 to 12M parameters, and a catalogue of defects that only measurement revealed.
- It releases a tested Python package and two notebooks in Brazilian Portuguese with autoregressive and masked diffusion generation on one network.
- It provides a preregistered comparison protocol.
- It includes legal tasks built from text alone with a Kneser-Ney floor and public yardsticks.
- It provides reference numbers for models of 11 to 12M parameters.
- It provides a catalogue of defects that only measurement revealed.
训练动态
On Brazilian prose and federal laws, at minutes per run, the autoregressive mode peaks at 64 epochs over the same text and then memorises it, while masked diffusion improves up to 256.
- Autoregressive mode peaks at 64 epochs over the same text and then memorises it.
- Masked diffusion improves up to 256.
测试可能性
At their best points on test, the diffusion bound exceeds the autoregressive likelihood by 0.06 bits per byte, within the preregistered minimum effect.
对未见过的法律与事后法案的似然
On held-out laws and on acts published after training, the model ties a 6-gram floor in likelihood on the same windows, and it loses to the floor at continuing those acts.
对篡改文本与交叉引用的评估
- It beats the floor at detecting tampered text.
- It fills cross-references more often than the floor and public models of 160M and 630M parameters, only in decrees, a genre absent from training, where those scorers stay near or below chance, and in filling the blank only when each group weighs the same, since per item it ties the 630M model.
在法律上与公开模型的比较
On laws, the public models, trained with about 5x10^2 to 10^5 times its compute, lead in tampered text and continuation.
人类盲读评估
The blind human reading is preregistered and not part of this version.