Size the KV cache for a 7B model at 8K context

EasyConcept10 minRERSMLE

The question

A 7B model has 32 layers, 32 heads, head dimension 128, and runs in fp16. How much KV cache memory does one 8,192-token sequence take? Show the formula.

What the interviewer is looking for

  • Writes 2 x layers x heads x head_dim x bytes per token
  • Gets 512 KiB per token
  • Gets 4 GiB for 8,192 tokens
  • Explains how GQA or quantization would change it

Your answer

Saved in this browser only. Nobody else sees it.

Why this question

Written by BlogLLM in the style of a publicly reported MiniMax question type: KV cache memory formula with a worked example for a 7B model at 8K context.

Reported in: mj.mianlingai.com

Practice question written by BlogLLM based on publicly reported interview formats. Not an official MiniMax question.