Tech Challenge
2026-10-31
🤖
Daily Tech Challenge
AI & ML
medium
Question 1 of 5
An inference team sizes the GPU memory budget for the KV cache of the decoder-only model configured below, serving a batch of 8 sequences that each hold a 4096-token context. Approximately how much memory does the full KV cache occupy?
Example
cfg = dict(
n_layers = 32,
n_heads = 32, # query heads
n_kv_heads = 8, # grouped-query attention
head_dim = 128,
dtype = "float16", # 2 bytes per value
)
# serving: batch = 8, context = 4096 tokens per sequenceSaturday, October 31, 2026 · A new challenge drops every day