The training dataset for a 29M model is constructed from two primary sources: a general corpus based on Wikipedia and a specialized domain corpus focused on psychology. The final training set uses a ratio of approximately 200,000 Wikipedia entries to 50,000 psychology-related texts.

Data extraction from Wikipedia utilized the WikiExtractor tool on a multistream dump. A single part of the multistream dump, approximately 380 MB in size, provided over 1.2 million paragraphs. The cleaning process involved removing section headers, empty brackets, and article titles, resulting in a clean file of 835.9 MB.

The psychology corpus was compiled from 587 files, including books on psychiatry and statistics. The processing script filtered out short lines and markdown formatting, yielding 382,327 paragraphs totaling 258.4 MB. This domain-specific data ensures the model understands the target field.

To optimize training time on T4 GPUs, the final dataset is limited to approximately 243,000 texts through subsampling. The pipeline includes filtering based on character count and alpha character ratio to remove noise, with a small portion reserved for validation.