Kefir 1 corpus filter

students.pkl is a bundle of five logistic-regression classifiers by Edoardo Avenia and Rocco Angelella, used to filter and score documents for the Kefir 1 pretraining corpus. They share one hashed character- and word-n-gram TF-IDF feature extractor.

What it predicts

A decision model, the teacher, labelled 15,922 random documents from NVIDIA Nemotron-ClimbMix (revision 5eaa64b9c0c85b7f56af01d7dffdb0795816b12b). Each classifier predicts the probability that the teacher would give one label. The bundle holds the classifiers only: not the teacher, its labels or responses, or the documents.

Classifier Probability that the teacher judged the text Use in the corpus build Held-out ROC AUC vs teacher
poor_english poor English: spun, machine-translated, garbled or truncated Reject at ≥ 0.80 0.863
not_prose not connected English prose: lists, menus, tables, keyword pages, other languages Reject at ≥ 0.80 0.902
symbolic symbolic Reject at ≥ 0.70 0.997
reasoning_dense largely verbal argument or explanation Packing stratum (score quartile) 0.921
reasoning_none statement, list, narration or advertising without reasoning Recorded only 0.940

Thresholds were chosen precision-first on a held-out 15% of the labelled documents. The AUC values, from the filter provenance, measure agreement with the teacher on that split, not human accuracy or performance on other domains. In the corpus build the classifiers ran after the structural rules and the fastText English check; the first threshold reached, in table order, is the recorded rejection reason.

Download and score

students.pkl is 50,334,573 bytes. Loading a pickle can execute arbitrary code. Use only a trusted copy and verify its SHA-256 before opening it; a matching checksum proves identity, not safety.

From a clone of the GitHub repository, with the Hugging Face CLI, in the Python 3.12 corpus environment pinned in data/pretraining/requirements.txt (scikit-learn 1.5.2, NumPy 1.26.4, SciPy 1.13.1):

hf download abcastor/kefir-1-corpus-filter students.pkl --revision main --local-dir data/pretraining/assets
printf '%s  %s\n' b8b8472278bc63a04f124b66fbefff9972a30d39ae98b13b541b772874135959 data/pretraining/assets/students.pkl | sha256sum -c -
cd data/pretraining
python -c 'from student_gate import StudentGate; print(StudentGate().verdict("Some document text."))'

StudentGate checks the same hash before unpickling and refuses any other file. scores(text) returns the five probabilities; verdict(text) returns the rejection reason, or None, with the scores.

Licence

CC BY-NC 4.0, as recorded in this repository's NOTICE. The training text comes from NVIDIA Nemotron-ClimbMix; a decision model supplied the teacher labels. The teacher model's terms say nothing about training on its outputs. The MIT licence of the GitHub code does not apply to students.pkl.

Questions: GitHub issues.

Related: GitHub · Pretraining corpus · Kefir 1 Base

Chip, the Castor beaver, by Castor, we give a dam

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train abcastor/kefir-1-corpus-filter