9/16
Part 4 of 6 · Rent or pay per tokenLearn and do

A rented GPU costs the same busy or idle, so its price per token follows its traffic

Renting a GPU is the other way to serve the shop's model.

Lambda rents one H100 SXM for $4.89 an hour, and Runpod for $4.39. The latency lesson worked out a best case of 22,852 output tokens a second for the shop's 7-billion-parameter model on one H100 with a full batch.

The shop's 1.4 questions a second at 250 tokens each make 350 output tokens a second.

print(f"busy all hour: ${gpu_per_mtok(4.89, 22_852, 1.0):.3f} per million")
print(f"the shop's traffic: ${gpu_per_mtok(4.89, 22_852, 350 / 22_852):.2f} per million")
Predict

At the shop's 350 tokens a second, what does the rented H100 cost per million output tokens?

Pick one to see what it prints.
Pick an answer above to see the rest