Menu

📰
87

Inference cost at scale with napkin math

Hacker News·3 months ago
#ocIRDD39
#injuly#memory#cost#cache#times#user
Reading 0:00
15s threshold

index about blog work now If you serve AI models as a part of your product stack, you've likely wondered what kind of scale your GPU cluster tops out at. With some rudimentary knowledge about your hardware and model architecture, we can work out the dollar cost-per-user on the back of a napkin 1 . If you're comfortable reasoning about GPUs and/or LLMs, use this legend to skip to sections of relevance: Resources on a single GPU Cost of a Matrix Multiplication An Overview of Language Models Attention in Greater Detail Reducing Compute with KV-Cache How much does a token cost? How many users can you serve realistically? Optimizing for hundreds of users on a GPU Tokens Per Second Dollar cost per user Resources on a single GPU On any GPU's spec-sheet you can find these metrics: Peak throughput: Number of floating-point operations per second. Usually in TeraFLOPs (1 TFLOP/s = \(10^{12}\) ops/sec). Memory bandwidth : Amount of data that can be moved from global memory (VRAM) to registers (SRAM).Usually in TB/sec.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More