Getting very different text lengths than expected
# mix configuration
MIX = [["books3", 26], ["openwebtext2", 20], ["enwikipedia", 4], ["mix", 50]]
BIG_MIX = MIX + [["py-only", 25]]
# document length sum ratios we get out of the mixer/sampler
0.04 enwikipedia
0.14 books3-chunked
0.21 openwebtext2-chunked
0.26 the-pile
0.35 mysql-2021-03-06-noforkI'm guessing this is because code compresses better than natural language. We might want to adjust the mix ratios in the canonical mix before we re-encode. One way to do this would be decompress a file or two from each, check the compression ratio, and then use that ratio when computing how many files to sample.
Here's the compression ratio for our mix datasets, which confirms by above theory
{
"books3": 0.3605096382995953,
"enwikipedia": 0.37079073937011686,
"mix": 0.3328165769499958,
"openwebtext2": 0.3725931528444764,
"py-only": 0.20317927545983844,
}However you might also expect BPE to be more effective for code, so perhaps calculating based on the compressed values is better. For now I'll proceed with the heavily downweighted code above (100 -> 25)
Encoding trained on 100k documents, which took about 2 minutes start to finish on 96 cores
ff cat s3://anthropic-us-east-1/data/bitbox/encoding/canonical-v1_s1e+05_v5e+04.json | jq -C . | less -RContains pretty reasonable looking vocab
[ Draft PR]
Next steps:
- check BPE compression ratios on a couple datasets
- encode all the datasets in the mix