whileai is, what we believe, and how that shows up in the code.
Read it before you add a public name, write a page, or run a recipe. The
routines that maintain the repository read it too. The text of record is
CONSTITUTION.md.
What we are
whileai is a scientific post-training library for language models: SFT
and RL, on open models, with the measurement that says whether training
helped. Simulate, grade, measure with intervals, select, train, prove on a
held-out set, serve, and feed the new traces back in. Build self-improving
systems.
It is for AI researchers, ML engineers and applied-AI developers, and the
goal is that it sits in every applied-AI and research department the way
PyTorch does. The platform (whileai.platform) is a separate, optional
service for hosted training and serving. The library needs no account.
What we believe
1
Repeatable science
A number is a result only with its interval, its noise floor, its seed
and the versions that produced it. A mean alone is not a result. A flat
result is a result. (
pass_at, eval_variance, delta_report,
holdout_size.)2
Replicated papers are the proof
We show the library works by reproducing recent post-training research
in it, one recipe per paper, under an hour on one GPU, with the number
it moved and the number it did not. Every reproduced paper is a post.
The proof point is the recipe, not the pitch. (
recipes/papers/.)3
The book is the map, the paper is the citation
Every default is named, sourced and tunable from the call.
rlhfbook.com (Lambert) is the map of the
field; the originating paper is the reference. A default with no
source says “convention, untested”. (
defaults.py,
scripts/check_no_hardcoding.py.)4
Bring your own keys
Your models, your compute, your accounts. Modal and Prime Intellect are
first-class: a
whileai environment becomes a verifiers environment
and back, selected rows become a trainer’s prompt set, eval results
flow back into measurement with intervals. Nothing in the loop requires
our hosting.5
Developer ergonomics are the product
The code reads like PyTorch, DSPy and Unsloth: one import, objects
carry configuration, calls carry data, reports print themselves, errors
name the fix, and a first-time reader can guess the next line. Rigor
lives behind a default, never behind a flag. (Style,
the ratchet test.)
6
Plain words, then the mechanism, then the proof
Every page, every docstring, every README section in that order. Book
vocabulary stays in the docstring that cites the chapter, never in a
public name.
7
Mass experimentation
A PhD or an engineer runs many experiments from one import, on their
own compute, and every run leaves a record that a person can decide
from.
8
Never big-bang
The internals carry the science and the tests. Change the front door,
migrate callers mechanically, keep the old name working for one release
with a warning that says the new one.