Estimate How Many Concurrent Requests Fit on One GPU

Last updated: November 29, 2026

Quick Overview

Given a model's parameter count, weight precision, GPU memory, and per-request activation and cache sizes, write a small estimator for how many requests can be served concurrently, and explain what changes between bf16 and int8 weights and between a diffusion and an autoregressive model.

Inception
Software Engineering Fundamentals
Software Engineer
Inception
November 29, 2026
Software Engineer
Phone Screen
Software Engineering Fundamentals
Easy

0

0

0 solved


Given a model's parameter count, weight precision, GPU memory, and per-request activation and cache sizes, write a small estimator for how many requests can be served concurrently, and explain what changes between bf16 and int8 weights and between a diffusion and an autoregressive model.

Generalist and serving engineers at Inception routinely do back-of-envelope GPU sizing when choosing deployments for Mercury models. The interviewer checks unit discipline (GB vs GiB, bytes per parameter), a sensible memory breakdown, and whether the candidate knows which terms dominate.

What the Interviewer Expects
  • Compute weight memory as parameters times bytes per parameter
  • Reserve headroom for the runtime, CUDA context and fragmentation
  • Estimate per-request memory from sequence length and hidden size
  • Show how quantization and tensor parallelism change the answer
  • Keep units consistent and sanity-check the result
Key Topics to Cover
GPU Memory
Quantization
KV Cache
Capacity Planning
Back-of-Envelope Estimation
How to Approach This
  1. Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
  2. Choose data structures based on access patterns, not familiarity.
  3. Prefer immutable data and message passing over shared mutable state for concurrency.
  4. Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
  • How does the per-request term change for a diffusion model that re-runs the full canvas each step?
  • Why does the answer for throughput differ from the answer for memory?
  • What is the effect of grouped-query attention on cache size?
  • When would you choose two GPUs with tensor parallelism over one quantized GPU?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Inputs: parameters in billions, bytes per parameter (2 for bf16, 1 for int8), GPU memory and count, sequence length, hidden size, layer and head shape. Output: max concurrent requests. Assume weights ...

High-Level Design

Total memory = weights + per-request state x N + reserve. Weights for 30B in bf16 are 60 GB, which already uses most of an 80 GB card. Per-request state has two parts: transient activations (only a co...


Submit Your Answer
Markdown supported

Related Questions