Build1 distinct publisher3 min readUpdated
A 452-configuration benchmark of the parmar pre-filter splits two effects that looked like one: denser tokens buy a flat 15% on gzip, while the gain that scales comes from window expansion.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
Two developers writing on dev.to, @ronak-create and @u84u, built a subword-tokenization pre-filter called parmar and then spent most of their effort on the rig that tests it: 452 benchmark configurations sweeping tokenizer, packing, compressor backend, transport, chunking and threading across four corpus tiers [1][8]. The idea holds up, but the mechanism is narrower than the intuition, and the narrow version changes who should bother.
The intuition is that BPE token IDs are a denser way to write English than UTF-8, roughly 45% smaller as a stream [2]. The mechanism that actually scales is a different one. LZMA2 and zstd look for repeats inside a fixed-size sliding dictionary window measured in bytes [3], so a 64 MiB window that covers about 64 MB of prose covers roughly twice as much prose once that prose has been pre-shrunk [4]; at a 45% reduction the arithmetic is about 1.8x [17]. None of that is measurable until the corpus is bigger than the window. On a 5 MB file everything already fits and pre-tokenization buys basically nothing [5]. So the deliverable is not a ratio, it is the curve of parmar ratio minus raw-byte ratio as corpus size grows [6].
The control that made the result readable was gzip. With a 32 KiB window gzip is saturated at every tier, and its +15% advantage is completely flat from 64 MB to 4 GB [12]: pure representation density, no window effect at all. On LZMA and zstd variants with multi-megabyte windows the gap climbs from 64 MB up through roughly 1 GB, then flattens once the corpus is well past the dictionary size [13]. zstd --long, with a 2 GiB window, was still climbing at the 4 GB tier, because 4 GB is only twice its window [14]. The authors say plainly that without the tiny-window control they would have credited window expansion for gains that were only density [15]. Worth noting how small the density effect is on its own: 15 points of advantage out of a representation that is 45% smaller, about a third of the shrink [20].
The harness discipline is the part worth copying. A literal cartesian product is 8,000-plus valid cells per tier, weeks of runtime, so they cut it to a 51-cell ratio grid plus a one-factor-at-a-time sweep for axes that should only move speed, while still logging ratio on the OFAT cells so that a supposedly speed-only axis that quietly moves ratio surfaces as a contradiction instead of being averaged away [10]. That is 204 ratio-grid cells across four tiers, with the remaining 248 of the 452 coming from the OFAT sweep [18], and roughly 1.4% of the full grid [19]. Every decompression was actually executed and checked against a sha256 in the archive footer, with failing cells excluded from averages and reported separately: 452 cells, 452 verified round trips, zero failures [11]. The corpus was PG-19, about 10,600 documents, tiered from 64 MB to 4 GB [9]. The pipeline never materializes the input: tokenize with tiktoken, pack IDs as LEB128 or a fixed 2-byte width, pipe into xz, zstd, gzip or bzip2 stdin [7].
It is not universal. On bzip2 pre-tokenization is a flat loss of about -3.9% at every corpus size, which the authors attribute to the Burrows-Wheeler transform [16]. Combined with the small-file result [5], the honest scope is: large-window backends, corpora well past the window, and a check that your backend is not bzip2.
What to watch is whether the zstd --long curve flattens the way LZMA's did once someone runs it at 8 GB or 16 GB, which is the prediction the plateau story makes [13][14], and whether the +15% density floor survives changes of tokenizer and packing, since only the ratio grid was built to move ratio at all [10].
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
Two developers, @ronak-create and @u84u, built parmar, a subword-tokenization pre-filter for byte-level compressors, plus a benchmarking rig, and published the results on dev.to.
Byte-level compressors such as LZMA2 and zstd find repeated patterns inside a fixed-size sliding dictionary window measured in bytes.
A 64 MiB dictionary window that normally covers about 64 MB of prose can cover roughly twice as much prose once the prose has been pre-shrunk by tokenization.
The pipeline tokenizes text with tiktoken, packs the token IDs as LEB128 or a fixed 2-byte width, and streams the result into an xz, zstd, gzip or bzip2 subprocess stdin; nothing is ever fully materialized in memory.
A literal cartesian product is on the order of 8,000-plus valid cells per tier, or weeks of runtime, so it was split into a 51-cell ratio grid isolating axes that move compression ratio plus a one-factor-at-a-time sweep for axes that should only affect speed; ratio is still logged on every OFAT cell so a speed-only axis that moves ratio shows up as a contradiction instead of being averaged away.
Every decompression is executed and checked against a sha256 written into the archive footer; if the check fails the cell's ratio is excluded from averages and reported separately. Across 452 matrix cells there were 452 verified round trips and zero failures.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Methodologically strong but single-source and self-reported
The experimental design is unusually disciplined for a blog-published result: a documented sampling strategy in place of an intractable cartesian product, a deliberate tiny-window control backend that changes the interpretation of the headline number, ratio logged on speed-only axes to expose contradictions, and 452 executed sha256-verified decompression round trips with zero failures. Against that, everything rests on one self-published account by the tool's authors, with no raw data, hardware spec, repository link or independent replication in the supplied material, and the body is truncated before the multithreading section concludes. That ceiling keeps the score in the moderate band.
Author-only release; no external uptake evidenced
The only adoption facts in the supplied material are the authors' own publication of parmar and their own 452-cell benchmark run. There are no downloads, stars, dependent projects, deployments, third-party evaluations or production usage disclosures anywhere in the source, so adoption is measured at the floor of a fresh self-release rather than inferred upward.
Slightly understated relative to its own evidence
The framing actively deflates the attention-grabbing number: the authors state the 45% smaller stream converts to only a flat +15% on a saturated window, cap the scaling gain with an explicit plateau, name a backend where their tool loses ~3.9%, and disclose that pre-tokenization forfeits close to a third of xz's multithreaded speedup. The title itself says 'mostly held up'. Nothing in the source overreaches beyond its measurements; if anything the transferable methodology contribution is undersold relative to how carefully it was executed. The small negative rather than a larger one reflects that generalisation is still limited to English prose on one corpus, which the write-up does not flag.
Author-promotes-own-project, no commercial stake disclosed
The write-up is by the creators of the tool it evaluates and published on a developer-audience platform, so there is a straightforward reputational and project-visibility incentive to report a win. No vendor sponsorship, employer, funding or commercial product is disclosed or implied anywhere in the source, and the self-interest is materially offset by publishing a losing backend, a plateau and a threading regression against the tool. That combination puts incentive pressure at moderate rather than high.
Internally consistent, externally unverified
Confidence is limited by structure rather than by content quality. One publisher, one self-authored item, no replication, no raw data, and a body that is cut off mid-argument mean the specific figures (+15%, -3.9%, 452 cells, ~1 GB plateau) cannot be cross-checked from the supplied material. What supports a middling-to-fair score is that the claims are mutually consistent, the mechanism offered is physically plausible, the measurement discipline is described in verifiable detail, and the conclusions are stated with their own limits attached.
build
The Tokenizer Is Your Real Price List, Not the Per-Million Rate Card1 distinct publisher
build
A JSON parser benchmark that scores refusal as a pass, and why the column order flips1 distinct publisher
build
Your MCP tool definitions cost 64% more than your token counter says1 distinct publisher
build
Artificial Analysis moves eval onto your data, and turns model choice into procurement1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 20, 2026