Originally written in French. Translated by AI — the meaning has been preserved, not the prose.
Short definition
The unit for comparing a model's consumption, obtained by adding the tokens read and the tokens generated after applying their respective rates: one for an input token, five for an output token.
Full definition
Two counts coexist in audit reports: the number of tokens, which describes a volume, and the weighted cost, which describes an expense. The two don't rank the steps in the same order.
In the articles on this blog, "weighted cost" always designates the second and is expressed in "units". Conversion into currency isn't part of it: that depends on a dated price list and a contract.
Usage in the field
Used to compare operations of different natures with one another — reading files, generating documents, calling a script — and to express an optimization as a percentage of a total.
Synonyms and variants
"units", "total weighted cost", sometimes "real cost" in popularizing texts.
Not to be confused with
- tokens consumed — the raw count of a volume of text, with no rate applied. Two steps of the same volume can carry very different weighted costs.
- cost in euros — the amount invoiced, the product of a price list and a contract at a given date.
- Sliding window — the working capacity available over a period, which the weighted cost consumes.
Examples
A skill that reads 100,000 tokens and generates 20,000: 200,000 units.
Ambiguities / debates
The factor of five is an average, exact for certain models at a given date. Some counts add a discount on the cached share of the context, others ignore it.