Quick summary · Chapter 8

Measuring AI Workloads

Timothy O’Brien 3 min read 4 diagrams

The essential ideas, decisions, and diagrams from this chapter. Follow the section links for the examples, calculations, and fuller argument.

The main idea

Ten million tokens through a highly rated model may include a great deal of work that had to be thrown away. A smaller model may handle most of the requests, with a larger one needed for difficult cases. To tell, I would follow the calls back to the work that someone accepted.

When a team changes the models it uses, even the same token count can hide a change. I propose benchmark-weighted consumption as one way to describe that mix, using token counts and results from a comparable test. It is an unvalidated index. The workload’s own acceptance results still tell us what got done.

Explore this in the full chapter →

What the workload actually consumes

A model call is the unit I would start counting. To answer a support question, an application might call a cheap model to interpret it, a more capable model to draft a reply and a third to check the result. A retry adds another call. Each has input and output tokens on the model that received it.

Explore this in the full chapter →

All 100,000 attempts contribute to the $1,915 model bill. Dividing the bill by the 90,000 accepted replies gives about 2.13 cents per usable reply.Open full-size diagram

Explore this in the full chapter →

Describing the model mix

Suppose two models run the same test under comparable conditions and pass 85 and 45 percent of the cases. Their scores, 0.85 and 0.45, are hypothetical. They belong to that version of the test.

For each model, multiply its token count by that score, then add the products. If model kk consumes TkT_k tokens and scores bkb_k, the index is:

B=∑kTk×bk. B = \sum_k T_k \times b_k.

One million tokens at 0.85 contribute 850,000 benchmark-weighted tokens, and one million at 0.45 contribute 450,000. I use the weighted sum as an accounting convention to describe the mixture of models.

If the index rises from ten million to twelve million, it grew by (12 − 10) / 10 = 20 percent. Repeating a prompt unnecessarily can raise it without accomplishing anything. A comparison also depends on the tokenization, benchmark version and task mix, so give the reader those conditions with the number.

Suppose routing moves work to a model with a lower benchmark score. The index falls for the same token count, making that model-mix change visible. It does not establish lost capability on this workload: the cheaper model may pass every task that matters here. Compare acceptance rates, correction effort and total cost before calling the routing change a saving.

Explore this in the full chapter →

The proposed benchmark-weighted index multiplies each model’s tokens by a comparable benchmark score, sums the contributions and divides by total tokens to describe the model mix. All scores here are hypothetical; the calculation does not measure accepted work.Open full-size diagram

Explore this in the full chapter →

Choosing the benchmarks

Match the evidence to the skill a step needs, preserve its test conditions and evaluate the candidate on representative work. The routing decision depends on observed acceptance, correction, latency and total cost.Open full-size diagram

Explore this in the full chapter →

The purpose question: what no consumption measure can say

When the owners of a workload review its cost, I would have them pick a task the service handles often and walk through it together. What would happen if they changed or removed a step?

  • Does this step need a model at all? Formatting, validation and deterministic transformations may be better served by ordinary code, whose compute and maintenance still cost money.
  • Does it need this class of model? Compare a smaller model on representative examples, including difficult cases and changes in the label set.
  • Does it duplicate another workload? Two teams may have good reasons for separate systems, but the reasons should survive being asked.
  • Is the architecture appropriate? Repeated retrieval, excessive context and unnecessary agent loops are testable design choices.

Explore this in the full chapter →

Right-sizing: the cheaper ways to do the work

Task requirements suggest candidates to evaluate, from ordinary code and encoders to embeddings, generative models and video representations. Compare accepted outcomes, latency and lifecycle costs before changing the design.Open full-size diagram

Explore this in the full chapter →