Plan GPU Memory for Serving a 70B Model on One Node
Last updated: November 29, 2026
Quick Overview
Given an 8-GPU 80 GB node, work out how much memory remains for KV cache when serving a 70B grouped-query-attention model, how many concurrent sequences fit, and whether one tensor-parallel-8 replica or two tensor-parallel-4 replicas is the better deployment.
Together AI
November 29, 20260
0
0 solved
Given an 8-GPU 80 GB node, work out how much memory remains for KV cache when serving a 70B grouped-query-attention model, how many concurrent sequences fit, and whether one tensor-parallel-8 replica or two tensor-parallel-4 replicas is the better deployment.
Choosing parallelism and precision for a dedicated endpoint is a daily decision for Together AI's inference engineers, and customers ask why a deployment needs a given number of GPUs. This onsite question checks back-of-envelope rigor: KV bytes per token, the weight versus cache split, and how that split drives throughput and latency trade-offs.
What the Interviewer Expects
- Derives KV bytes per token from layers, KV heads, head dim and dtype
- Subtracts weights and a reserve for activations and runtime overhead
- Converts the KV pool into tokens and concurrent sequences at a stated context length
- Compares TP8 with two TP4 replicas on memory, communication and latency
- Shows the effect of FP8 weights and FP8 KV cache
Key Topics to Cover
How to Approach This
- Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
- Choose data structures based on access patterns, not familiarity.
- Prefer immutable data and message passing over shared mutable state for concurrency.
- Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
- When does pipeline parallelism beat tensor parallelism for serving?
- How much does FP8 KV cache cost in quality, and how would you measure it?
- How would this change for a mixture-of-experts model with the same active parameters?
- Why might a TP2 deployment fit the weights but still be a bad idea?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Model: 70B parameters, 80 layers, 8 KV heads, head dim 128. Hardware: 8 GPUs with 80 GB each. Keep 10% of memory for activations, CUDA graphs and fragmentation. Report the KV pool, tokens it holds, an...
High-Level Design
KV bytes per token , where 2 is for K and V. In bf16 that is $2 \times 80 \times 8 \times 128 \times 2 = 3...