May we use cookies so Meta, Google, LinkedIn and ChatGPT see your visit and we learn which ads work? PrivacyMay we use cookies to see which pages help, and let Meta, Google, LinkedIn and ChatGPT see your visit, so we know which of our ads work? That way we spend less on ads that do not work. We do not sell your data, and the site works the same if you decline. You can change your answer at any time under Cookie settings at the foot of the page. Privacy policy
Loading...
AI Engineering · Serving And Inference
Free preview: the first 2 parts of this 32-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
Generative AI and Agentic AI Engineering
Unlock this lesson and the 208 other paid lessons
$35 once, by card or PayPal
See the Generative AI and Agentic AI courseread the rest of this lesson in
Generative AI and Agentic AI Engineering
Unlock this lesson and the 208 other paid lessons
$35 once, by card or PayPal
See the Generative AI and Agentic AI coursein Serving And Inference
This lesson is part of the AI Engineering course. Unlock the full course, a separate one-time payment, for lifetime access.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime AccessFoundation lessons of this course are free, no payment needed. Try them now
Let me start in a small corner shop.
The shopkeeper pays rent for her shop every month. She pays it whether ten people come in or a hundred. At the end of the month she wants to know one thing: how much did each sale really cost her?

The rent alone cannot tell her. She also needs to know how many sales the rent paid for. In a busy month each sale is cheap. In a quiet month each sale is dear, even though the rent did not change. Coins go on one side of her scale, and the work they paid for goes on the other.
A machine learning service has this problem too. You rent a computer by the hour, and it answers questions with a model. In this lesson I measure how many answers one hour of a rented computer can give, on five different computers, and work out what 1,000 answers really cost.
This is lesson 11 of the chapter on serving a model. Serving a model means running it as a small program that answers questions while people wait.
The model is the features chapter's model. It looks at six numbers about one customer of a real online shop, such as the days since their last order. It gives a score between 0 and 1: how likely they are to buy again in the next 30 days.
Lessons 2 to 10 measured this service on one kind of rented computer. They asked how fast it is, how it behaves when busy, and how much memory it uses. None of them asked about money.
So here is my question: what do 1,000 predictions cost? A prediction is one answer from the model, one score for one customer. To answer, I need two numbers for each computer. The first is its price per hour, which Amazon publishes. The second is how many answers it gives in that hour while still answering quickly. Nobody publishes that one, so I measured it.