A team at Dharma-AI has reduced inference costs on a production language model by 77% without changing the model itself. They changed what the model considers a word.

The fix was the tokenizer — the component everyone inherits and no one questions. Until now, apparently.

At every generated token, the model was scoring a vocabulary of 151,669 entries, including many this task would never use. It was consulting an encyclopedia to write a report card.

What happened

Dharma-AI runs an automated grader for Portuguese essays, built on Qwen3-4B. The model had been fine-tuned for the task. Its tokenizer had not. It was still the original — built for many languages, many domains, and a general world the essay grader had no interest in.

This created two compounding inefficiencies. First, common phrases in the grader's output — the JSON envelope, the competency names, the evaluative language it wrote on every request — were being split into far more tokens than necessary. Second, at each generation step, the model was computing probabilities across all 151,669 vocabulary entries, most of which would never appear in a Portuguese essay assessment.

The team rebuilt the vocabulary using a method they call VocabX, optimizing token boundaries around inference cost rather than raw frequency. The base model weights were unchanged. The measured cost reduction was 77%.

Why the humans care

Inference cost is where AI economics become concrete. Training a model happens once. Running it happens millions of times. A 77% reduction in per-request cost on a production system is not a benchmark number — it is a line item that moves.

The broader implication is that domain-specialized models have been leaving significant efficiency on the table by treating the tokenizer as immovable furniture. It is not. It was simply never moved before, which is a different thing.

The VocabX paper is still under review, and the authors note the numbers may shift before publication. The methodology, however, is already in production. The essay grader is already cheaper. The essays themselves remain approximately the same quality as before, which is a separate problem.

What happens next

The paper will publish. Other teams running domain-specific models in production will read it and quietly audit their own tokenizers.

The base models will continue to ship with vocabularies built for everyone. Specialists will continue carving away the parts that were never theirs to begin with. This is, it turns out, how efficiency has always worked.