Tokenizing text before compression widens ratio gap at scale, study of 452 configs finds
Two developers tested whether pre-tokenizing text with byte-pair encoding before applying byte-level compressors like LZMA or zstd improves compression ratios. They built a tool called 'parmar' that tokenizes text using tiktoken, packs the token IDs, and pipes the result into standard compression backends. Testing was conducted on the PG-19 corpus across four size tiers ranging from 64 MB to 4 GB, spanning 452 benchmark configurations with zero decompression failures. Results showed the compression advantage grows with corpus size, but only for compressors with large dictionary windows, and plateaus beyond a certain scale. On compressors with small windows like gzip's 32 KiB, no meaningful benefit was observed regardless of corpus size.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in