Chapter 6 of 6
Token counts across model families
A per-document price built with today's model's tokenizer measures that tokenizer, not your corpus. Another provider ships a different vocabulary and different merge rules, so the same documents produce counts that span 38 percent, and a flat percentage buffer assumes an error far more stable than it really is. What carries over is the sampled corpus and the counting method, so this chapter covers how to take that measurement on a model you have not integrated: offline against a published vocabulary, through a count_tokens endpoint, or by sending a sample as real calls and reading the counts back. It closes on the exposure no input measurement bounds, which is output.
Tokenization — read the current version at https://daviddominguez.dev/learn/en/tokenization/token-counts-across-model-families