PhiloText / README.md
gustavecortal's picture
Show the share of training tokens by source as a table
63a609b verified
|
Raw History Blame Contribute Delete
3.7 kB
metadata
pretty_name: PhiloText
license: other
license_name: per-document
license_link: https://huggingface.co/datasets/gustavecortal/PhiloText#licences
language:
  - en
task_categories:
  - text-generation
tags:
  - philosophy
  - psychology
  - pretraining
  - language-modeling
size_categories:
  - 100K<n<1M
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*.jsonl.gz
      - split: validation
        path: data/validation-*.jsonl.gz
      - split: test
        path: data/test-*.jsonl.gz

PhiloText

PhiloText is the English pretraining and evaluation corpus for PhiloLM, a language model with 112M parameters, trained from scratch on open philosophy data. A web demo runs PhiloLM in your browser.

The corpus indexes 170,236 documents and 468.1M tokens. Philosophy and psychology account for 81% of training tokens. The remainder comes from general educational web pages.

Split Documents Tokens
Train 164,054 450.8M
Validation 3,134 8.6M
Test 3,048 8.6M

Sources and construction

Source Training tokens
FineWeb-Edu web pages 139.6M (31.0%)
Essential-Web web pages 120.6M (26.8%)
Books from Project Gutenberg, Standard Ebooks, Wikisource and Classics in the History of Psychology 68.8M (15.2%)
Stanford and Internet Encyclopedias of Philosophy, Notre Dame Philosophical Reviews 58.5M (13.0%)
Wikipedia 45.8M (10.2%)
PubMed Central reviews, open textbooks, Noba modules 17.7M (3.9%)

Web selection uses term-density and source-specific quality filters. Documents are split by work. The pipeline removes exact duplicates and screens additional documents for overlap using sampled word 13-grams. Shared passages and reprinted material can still cross splits.

Usage

from datasets import load_dataset

train = load_dataset("gustavecortal/PhiloText", split="train", streaming=True)
with_text = train.filter(lambda row: row["text"] is not None)

Each row contains id, split, source, url, title, author, license, tokens, on_topic, and text. The tokens count uses PhiloLM's tokenizer and excludes the end-of-text token. The on_topic flag marks domain-selected sources and pages. The data is stored as gzipped JSON Lines.

For link-only rows, text is null. These rows include both philosophy encyclopedias, Notre Dame Philosophical Reviews, Noba, and some books and historical psychology texts. Rebuilding the full train or evaluation splits requires obtaining the original text for those rows.

Licences

The compilation and metadata are released under ODC-By 1.0. Reuse of document text is governed by each row's license and the upstream source terms. Web corpus attribution and underlying site terms still apply. Public-domain status can vary by jurisdiction. Licence labels come from source metadata and release rules and were not individually verified.

Limitations

The corpus is English-language and includes historical perspectives. Web documents can contain residual boilerplate, generated text, and personal information. PhiloText adds no personal-information filtering beyond upstream processing.

Citation

@misc{cortal2026philotext,
  author = {Cortal, Gustave},
  title = {PhiloText: the training corpus of PhiloLM},
  year = {2026},
  url = {https://huggingface.co/datasets/gustavecortal/PhiloText}
}