One email each morning — yesterday's AI, sortedGet it in your inbox

METAL LAB

Claude, Codex build toy tokenizers in 30 minutes but fail at production scale

Liquid AI added a loop structure and both coding agents completed production-grade work

코덱스와 클로드 코드 검증 흐름을 보여주는 시스템 구조도

이미지: X — 모델·오픈소스 화면 갈무리

Summary

  • Liquid AI has published results from an experiment conducted in late 2025 in which it tasked Claude Opus 4.5 and Codex (GPT-5.2) with building a production-grade BPE tokenizer trainer
  • Both agents produced a working toy trainer within 30 minutes, but both failed when run on an actual large-scale corpus
  • Only after introducing a "loop" structure of run-error-diagnose-fix did the agents complete the work, and the resulting trainer, "toktoktok," has been open-sourced on GitHub
실험 시기
2025년 말
투입 에이전트
Claude Opus 4.5, Codex(GPT-5.2)
결과물
오픈소스 BPE 토크나이저 트레이너 toktoktok (GitHub 공개)
검증용 하드웨어
AMD EPYC 9755, 128코어 256스레드, 메모리 2TB
1차 결과
양쪽 모두 30분 내 장난감 트레이너 완성, 자체 테스트 통과
실전 실패 지점
목표 코퍼스의 약 1% 처리 시점에서 메모리 부족 등 7개 문제 발견
해결 방식
실행→오류 보고→진단→수정→재실행을 반복하는 루프 구조 도입

A toy built in 30 minutes collapses in production

Liquid AI published the results of an experiment it ran in late 2025 on its engineering blog. The question was simple: can a coding agent solve production-grade problems on its own, without human supervision? To find out, the company assigned the same task to two agents widely considered the strongest coding models available at the time — Claude Opus 4.5 and Codex (GPT-5.2).

The outcome was identical for both agents. Each produced a working trainer within 30 minutes, passed its own unit tests, and even trained a toy tokenizer on a few megabytes of data. But when fed an actual production-scale corpus, neither trainer survived.

이미지: X — 모델·오픈소스

Why a tokenizer trainer, specifically

While researching how vocabulary size affects performance in on-device (edge) LLMs, Liquid AI needed a byte pair encoding (BPE) trainer — a tokenization method that builds a vocabulary by merging frequently occurring character pairs — capable of processing trillions of tokens on a single machine. Existing tools all fell short: sentencepiece was optimized for non-BPE methods and ran slowly, Hugging Face's tokenizers library ran out of memory on large corpora, and tiktoken had no training functionality to begin with.

Liquid AI chose this task as its test case for three reasons. First, it was a genuine deployment target, not a porting exercise of an existing system into another language. Second, it required two distinct areas of expertise simultaneously — an ML researcher who understands tokenizer training, and a Rust engineer who can write memory-aware, multithreaded code. Liquid AI said it wanted to see "whether an agent could cover a breadth of expertise that none of our own engineers could handle alone." Third, the output had to load directly into tiktoken and Hugging Face tokenizers as an external validation condition, leaving the agent no room to fake success.

Separating the goal from the verification

Before either agent wrote a single line of code, the experiment's designers prepared two things. The first was a specification document — AGENTS.md and CLAUDE.md — that defined the goal. It contained only outcomes and constraints, not implementation methods: since memory was the tightest constraint, the trainer had to reliably handle corpora far larger than available RAM, and compute and I/O simply needed to be handled with Rust and multithreading.

The second was a verification mechanism the agents could not touch. The agents were given sandboxed access to an actual production training dataset and to a server (an AMD EPYC 9755 with 128 cores/256 threads and 2TB of memory) capable of processing it. The trained vocabulary was loaded into both tiktoken and Hugging Face tokenizers to check whether encode-decode round trips matched, and whether results held up across multiple languages, numbers, currency notation, tabs, newlines, and source code.

The code passed, so why did it fail

The problem was scale. Flaws that never surfaced on a test dataset of a few megabytes emerged one after another once real corpora were used. Liquid AI summarized seven issues it found:

Issue foundHow it surfacedWhat caught itTime to fix
File encoding mismatchFine in tests, silently broke on the corpusActual corpus filesSeveral hours
Lack of memory awarenessRan out of memory at about 1% into the target corpusFull-scale run2–3 days
Poor parallelizationThroughput fell short even with all cores busyFull-scale run1–2 days
Pre-tokenization slowdownRegex backtracking caused a sharp drop in processing speedProfilerSeveral hours
Rank ordering errorsVocabulary loaded but encoded differently than intendedExternal verification toolSeveral hours
Duplicate mergesVocabulary count fell short, shifting all subsequent ranksExternal verification toolSeveral hours
Numeric encoding errorThe two libraries disagreed only on numbersExternal verification toolOne-line fix

What changed once the loop was introduced

At this point, Liquid AI changed its approach. It introduced a cycle in which the agent ran the code on real data, reported symptoms when it hit a wall, diagnosed and fixed the issue itself, and then ran the code again. Liquid AI said that through multiple iterations of this cycle, both agents worked through the problems listed in the table above one by one. The resulting BPE tokenizer trainer, toktoktok, is now open-sourced on Liquid AI's GitHub account.

Editor's view

What makes this experiment interesting is that it didn't ask whether an agent writes good code. What Liquid AI actually tested was whether an agent could pass production-level verification without a human in the loop — and that's where the split happened. The toy trainer produced in 30 minutes looked like a success at first glance, since it passed its own tests, but the real failure only surfaced once scale entered the picture. This experiment suggests that many of the success stories commonly seen in benchmarks or demos may still be stuck at this "toy stage."

Applying similarly sized coding-agent tasks to real work tends to lead to the same conclusion every time — the first output looks plausible, but hidden assumptions break the moment it meets real data scale or edge cases. The fact that the memory failure in this experiment hit at just 1% into the target corpus is proof of that: an error that a small test would never catch.

The practically meaningful takeaway is the design principle of "separating the goal from the verification." Specifying only outcomes and constraints instead of implementation methods, and verifying with external libraries the agent cannot touch, is a minimal condition worth referencing for teams considering handing real work to agents. It implies that rather than having humans substitute for code review, verification itself needs to be automated and structured to allow repeated execution first.

It's likely that similar "loop-based" agent evaluations will emerge from other companies in the coming weeks. Amid ongoing competition over coding benchmark scores among frontier models, an evaluation approach like this one — distinguishing "toy" from "production" — could establish itself as a new standard for testing benchmark reliability.