← All writing

Tokenization · Test-time training

How I got highlighted by OpenAI in their pretraining competition

Two small ideas: share vocabulary across capitalization, and let learning survive the end of a document.

On this page

OpenAI highlighted my CaseOps tokenizer in its Parameter Golf write-up. It started with a simple question: why should a tiny language model spend vocabulary entries learning that “apple,” “Apple,” and “APPLE” are related?

Parameter Golf gave us 16 MB for the model artifact, ten minutes to train on eight H100s, and ten minutes to evaluate. The score was bits per byte on held-out text: how many bits the model needed to predict each byte. Lower was better.

I worked on CaseOps, a tokenizer that shares vocabulary across capitalization patterns, and phased test-time training, which carries learning from one evaluation document into the next.

CaseOps: learn the word once#

A case-sensitive tokenizer can give “apple,” “Apple,” and “APPLE” different vocabulary entries or different subword splits. With only 8,192 entries, that duplication is expensive.

CaseOps separates spelling from capitalization:

The same lowercase pieces work in all three cases. Capitalization becomes a reusable operation the model can apply to any word.

Try the case transformBefore BPE tokenization

CaseOps representation

Decoded back

Same text. Shared lowercase pieces. Capitalization travels as operators.

The implementation is small: transform the text before BPE tokenization, then undo the transform when decoding. Title case and all caps each need one operator. Mixed case uses an operator that capitalizes the next letter; an escape operator handles literal control characters. Non-ASCII characters pass through unchanged.

The transformer itself doesn't change. We're giving it a representation where related words already share their spelling, instead of asking it to discover that relationship from scratch.

The detail that makes the score meaningful#

Adding capitalization operators changes the length of the encoded text. If we divided the loss by that new byte count, we could make the score look better just by making the representation longer.

So the exporter saves original byte counts alongside the tokens. The evaluator divides by those counts. The model pays to predict every capitalization operator, and the denominator still measures the text we started with.

My submission combined CaseOps with a late weight-decay taper on the existing phased-TTT stack: 1.06780 bits per byte, averaged over three seeds, in 15.94 MB, a new record. The code and tokenizer details are here.

Phased TTT: let learning survive the document#

The competition allowed the model to learn from text after scoring it, to help predict what came next. Earlier scores stayed fixed.

Samacqua's evaluator already used that within each document: score a chunk, train a small LoRA adapter on it, then predict the next chunk. At the document boundary, reset the adapter.

That gives the model a useful short-term memory. But every new document starts from the same base model. My addition was a second, slower learning loop: update the base model using completed documents, so later documents inherit what it learned.

Read → remember → learn → repeatThe next document gets a better starting point.
Scored documents collect in a buffer, then train the shared modelScore documents using local LoRA. Only after scoring, move them into the completed-document buffer. At a phase boundary use completed documents for SGD, then resume scoring with the updated base. Earlier scores remain fixed. SCOREBUFFERSHARED BASE Doc 1 local LoRAscore first then store 123456 0 documents scored SGD base v0 resume scoring with the updated base
Before the first phase

Documents enter the buffer only after their scores are recorded. The shared model learns from that completed prefix.

Three documents per phase here to make the flow visible. The first implementation used a 2,000-document prefix; later versions repeated the phases.

My first implementation paused after 2,000 completed documents, ran distributed SGD on that already-scored prefix, then resumed evaluation. Each new document still got a fresh local adapter, now on top of an improved base.

Why pause instead of learning continuously?#

I first tried mixing local and global updates more continuously. Synchronizing the shared model across GPUs kept getting in the way of the local work.

Phases made the coordination simple: score in parallel, pause for a shared training phase, then go back to scoring. It also makes the information flow obvious. Global training only sees documents whose scores are already recorded.

With pretraining unchanged, the three-seed mean improved from 1.07336 → 1.07281 bits per byte, a new record, while staying within the evaluation time limit.

Dexhunter extended it to three phases, and I built CaseOps on top of that version. Every later record built on both CaseOps and phased TTT.