← all nights

Token Diet

shipped

2026-10-31

A side-by-side tokenizer playground: type any text and watch a from-scratch 32K-vocab BPE tokenizer beat GPT-2's tokenizer by ~20% fewer tokens, lossless, entirely client-side.

visit the build →

Approach

tokenizer.js implements one generic byte-level BPE encoder/decoder -- GPT-2-style pretokenization regex, byte-to-printable-alphabet mapping, iterative merge application, exact byte-level decode -- so the identical code path runs both tokenizers, parameterized only by which vocab+merges table it is given. GPT-2's own public vocab.json and merges.txt are embedded as static data files and loaded same-origin, so the comparison is against GPT-2's actual tokenizer, not an approximation of it. The custom 32K tokenizer's vocab+merges are produced once, offline, by tools/train-bpe.js, which runs standard frequency-counting BPE training over data/corpus.txt (a few hundred KB of mixed prose, code, and markdown checked into the repo) during the build step; the output is written to data/custom-vocab.json and committed, so nothing trains at runtime. That same offline script also pre-tokenizes 20 varied seed strings with both tokenizers and writes the counts to data/seed-examples.json, so the page renders a populated comparison table the instant it loads, with zero interaction. The deployed site itself is a bundler-free index.html plus tokenizer.js and JSON data files loaded via <script>/fetch; the one offline training script is a build-time tool, not a runtime dependency, which is why it doesn't violate the no-build-step preference. Savings are shown per example rather than asserted as one fixed percentage, since the real reduction varies with text domain.

The source post

Scoring

Pick

surprise3
demonstrability5
self_containedness5
honesty5

This is the only candidate that is both genuinely self-contained and genuinely honest. The vocab/merge table is trained at build time from a small corpus checked into the repo -- no model weights, no WASM runtime, no live API call, nothing fetched from a third-party host during build or at runtime. Paste text in, see two real tokenizers split it into real tokens with real counts side by side -- the 'lossless, fewer tokens' claim is something a stranger can verify by eye in under 10 seconds, not a number asserted on a landing page. Everything else in the batch either needs a live model/API call (Otari.ai's model router, Codenaya's IDE), is a browser-standard proposal rather than a deployable artifact (Opera WebAI), needs a live third-party fetch at runtime that this pipeline's static-only, no-outbound-requests constraint rules out (BrandPicked -- the same constraint that sank storefront-clerk on 2026-10-11), or can't honestly demonstrate its one interesting claim in a toy build (Trinity agents' 'generalizes to real tasks,' Stagehand/Steel Browser's live-page automation). Token Diet is small, which also wins the tie-break against nothing in particular since it's the clear top score, but smallness here is a feature: a tokenizer comparison is inherently a single self-contained computation with no moving parts to fake.

source: https://x.com/Qvinfor/status/2116439463119462619

Review

shipped5
honest1
worth_it2
efficient3

mean 2.75/5

proposed change: {'file': 'prompts/pick.md', 'block': 'taste-rubric', 'edit': 'Add to the self-containedness criterion\'s existing third-party-fetch warning: \'The same failure applies when the idea\'s differentiator is a comparison against another real system\'s output or table rather than a model/runtime download -- a baseline tokenizer\'s vocab+merges, a published benchmark\'s reference numbers, a reference implementation\'s results. That reference data does not exist in this repo and the only way to get it is the same build-time fetch that already fails here (2026-10-01; driftwatch, 2026-10-09). BloatTokenizer32K / "token-diet" (2026-10-31) is this pattern: the scout line itself was "22% fewer tokens than GPT-2" -- the claim is inherently relative to GPT-2\'s real vocab.json/merges.txt, which can only enter the repo via a third-party download, which failed, so the comparison shipped as an empty "unavailable" column while the rest of the page looked finished. Score self-containedness low (not 5) whenever the one-liner\'s hook is framed as beating or matching a specific named external artifact, even if that artifact is a small data table rather than model weights or a WASM runtime.\'', 'expect': "Pick either rejects ideas whose hook is 'beats/matches real system X' when X's reference data isn't already vendored in the repo, or reshapes them around a self-generated baseline (e.g. compare against a second from-scratch tokenizer, or a published summary statistic quoted as a citation rather than recomputed live) before plan.json locks in a file list that depends on a build-time download.", 'falsified_by': "A future night picks an idea whose differentiator is 'matches/beats real system X' using X's real data, and ships with that comparison actually populated (meaning X's data was already vendored or didn't need a build-time fetch) -- or the rolling 7-night mean doesn't recover now that this failure mode is named."}

This is a pick-stage miss, not a build-stage one: the build tried the right sources, failed honestly, and said so in NOTES.md rather than inventing numbers. The taste-rubric already names and tracks exactly this class of failure (build-time third-party fetch, with two prior dated incidents) but only in terms of binary downloads and live API calls; it didn't catch a plain data-table download for a comparison baseline, even though the scout line ('22% fewer tokens than GPT-2') made the dependency on GPT-2's real vocab obvious before any file was planned. One occurrence, but the mechanism is identical to two already-logged ones and the cost of missing it was the entire reason this candidate was picked over six others with honesty scores of 5 each on self-containedness and honesty -- worth naming now rather than waiting for a third instance of this exact shape.

Cost

total$0.1426
xai$0.1426

metered APIs only, summed across every attempt at this project; Claude and Codex run on flat-rate subscriptions and have no marginal cost per night

What it looked at

@Marcus_Rein_passed on

Otari.ai (Mozilla):** Browser-based open-source router for quickly testing/routing open-source models without local setup or paid APIs.

https://x.com/Marcus_Rein_/status/2116046811710284003

A model router's whole point is routing to live open-source model APIs, which this pipeline can't call and can't fake honestly.

@AlternativeTopassed on

Opera WebAI:** Proposed browser standard + implementation (in Opera One/GX/Neon) for running AI models locally and privately inside any web page.

https://x.com/AlternativeTo/status/2115790515740561809

A proposed browser standard for in-page model execution, not something that reduces to one deployable web artifact.

@rafal_darlakpassed on

BrandPicked:** Self-contained web demo that crawls your site, evaluates agentic-search visibility, and outputs improvement suggestions.

https://x.com/rafal_darlak/status/2116437324594549132

Crawling an arbitrary user-supplied site requires a runtime request to a third party, which this pipeline's static-only deliverable rule already ruled out once (storefront-clerk, 2026-10-11).

@anupamiopassed on

Codenaya:** Fully browser-based open-source AI IDE (GitHub) that runs a capable model for coding without external paid keys or downloads.

https://x.com/anupamio/status/2115847745877807453

A full AI coding IDE needs a capable backing model at runtime, which means a paid key or a live call we can't ship without exposing it.

@Qvinforpicked

BloatTokenizer32K:** Tiny open-source C++/Python tokenizer (32K vocab, 22% fewer tokens than GPT-2, lossless) with bindings that a small web demo could showcase instantly.

https://x.com/Qvinfor/status/2116439463119462619

@LanceZPF1passed on

The Trinity agents:** Open-source simulation code + video demos showing recursive self-improvement in agent-built environments that generalize to real tasks (purely local/browser-renderable sims).

https://x.com/LanceZPF1/status/2116158247992455256

The interesting claim is that toy sims generalize to real tasks -- a browser-renderable toy can't honestly demonstrate that, only assert it.

@murrtlenpassed on

Stagehand / Steel Browser (agent tools):** Lightweight open-source browser-automation layers for agents that run entirely client-side in a web page.

https://x.com/murrtlen/status/2115925458734735496

The compelling part is an agent making live decisions to automate a page; scripted without a live model it's not actually showing the capability, and with one it's not self-contained.

Wanted, and did without

A network-enabled file downloader or pre-provisioned GPT-2 asset storevendoring GPT-2's public vocab.json and merges.txt locally so the real comparison in token-diet (and any future idea needing a well-known public reference dataset) can actually run instead of shipping an 'unavailable' placeholder

Gate

passproject directory exists — /Users/artax/code/builds/2026-10-31/project
passdependencies install
passbuild succeeds
passbuild output with index.html — /Users/artax/code/builds/2026-10-31/project/dist
passindex.html is a document — 22437 bytes
passlocal asset references resolve
passpage loads without console errors

Stages

scoutgrok · ok · 42.2s
pickclaude · ok · 76.6s
planclaude · ok · 69.1s
buildcodex · ok · 275.3s
gatelocal · ok · 7.5s
publishlocal · ok · 11.4s
reviewclaude · ok · 134.9s

Notes

Omitted for lack of

A network-enabled file downloader or pre-provisioned GPT-2 asset store, so the two original public tokenizer tables could be vendored locally. No runtime service, account, API key, model inference, or image generation is needed.