openai recently shared perplexity numbers for their models on their internal codebase. this is super valuable information and we need more public comparisons like this, so here is a first try with open models
introducing v0 of pre-training index
https://eliebak.com/pretraining-index
it covers 27 open models (base and post-trained) on ~260 curated sources (code, math & science, systems writing, essays) + uncheatable eval
there are a few challenges with comparing perplexity across models. first if the model is train on a document it can easily mememorize it and then have veryyy low ppl on it. one obvious fix is to only use very recent documents that can't be in the pretraining corpus, which is what uncheatable eval does (50% of the index). but i was a bit frustrated because it cuts a lot of the sources you can include, so i tried a few ideas
first, you can compute a win rate, if a model memorized a doc its loss collapses, but if you use win rate that only counts as one win (hence kinda normalize the importance of each document)
second, you can try to detect outliers (document where model have insanely low loss on)
loss(model, doc) ~ difficulty of the doc + skill of the model + r
difficulty is the median loss of all models on that doc, skill is how much better the model usually is than the median of other document in the sources and r is what's left. r < -2 means a loss 4x lower than expected
this seems to work pretty well. on uncheatable eval (published after every model's cutoff) only ~1% get flagged, vs 27% of older docs. by default the index drops every old doc that any model flags (with r < -2 as the threshold) for all models
some other notes
- i didn't have time to "base recover" the post-trained models, so keep in mind their base model perplexity is likely much lower! i think there is a lot to study here, especially the impact of SFT, distillation and RL on ppl
- for the curated sources, i took some of my favorite blogs and some i know high quality sources, gave them to neon, opus, sol and a few more models and asked them to find more like these and just iterate with models and looking at data. i know source quality is probably not the biggest differentiator here, oai does it only on their held out codebase, but there is something cool about evaluating how well models do next token prediction on the best stuff humans wrote
- i would prefer held out set for everything obviously, but i wanted to try to see a bit how we could detect memorization, and if/how it matters for different model and training process likely have impact on this! you can make the index 100% of uncheatable eval to remove as much as possible memorization
- i also asked a model to filter out heavily ai generated code/text on some sources, but i think it's relatively fine to have some llm generated data here (i know there is some). it might be a bigger issue for oai/anthropic models since they write a lot of code
- you can customize everything and build your own index by changing the weight of each domain, toggling sources on/off, picking the r cutoff, and clicking any document to see which models look like they memorized it
- there is also a lot of cool work on compression/memorization by nicholas carlini and others that i need to look into more!
- this first version of the index is OBVIOUSLY not good to compute ppl threshold to release model or not, probably a lot of way to under/overfit on it, and not the goal here
wanted to share this publicly quickly, i'll keep improving it when i have time and look for better ways to handle memorization. please give feedback and send cool resources to include!!
