Dharma AI says a new tokenizer cut its essay grader's inference cost 77% on the same 4B model
Dharma AI, a company that builds specialised language models, says in a Hugging Face post dated 21 October 2026 that it cut the inference cost of a production essay grader by 77.0% by changing the model's tokenizer vocabulary, not its base model or training recipe. Dharma reports that average response length fell from 350 to 101 tokens and that its bench score, which combines grading accuracy with screening of off-topic essays, rose from 0.703 to 0.810. All figures are Dharma's own, and the paper behind them is under review.
Why it matters: Writing is the expensive half of a model call. Dharma measured a generated token at 7.4 times the cost of a token read, and says that ratio changes with hardware, batch size and context length. Its grader returns the same JSON envelope, competency names and stock phrases on every essay, so much of what it wrote was text that never varied. If your support agent or classifier returns a fixed format, part of your bill may buy the same words repeatedly.
The catch: This is one grader, one language (Portuguese), one RTX 5090 GPU and 500 requests, with no independent replication. Dharma gives no dollar figure and does not say what retraining with a new vocabulary cost in engineering time. Its first version fused each grade into the surrounding JSON as one token: cost fell 73.3%, but the score dropped to 0.689, below the production grader. Teams on a hosted API cannot change the tokenizer at all.
What to do: Take your highest-volume structured-output job and split a week of logged tokens into input and output. If the output repeats the same envelope, test shorter keys and fewer fields on 200 logged requests, and re-run your quality evaluation before accepting any saving. Change the tokenizer only if you self-host a small model and have an evaluation set to catch the first-version failure Dharma describes.
Our coverage →Dharma AI (Hugging Face team post, vendor-published): How Specializing the Vocabulary of SLMs Can Cut Inference Cost by 77% in Real Applications ↗