All Questions
Llm Inference Serving hard

You switch a 70B-class model from fp16 to 4-bit weight-only quantization. Batch-1 decode became nearly 3x faster, but TTFT on 8K-token prompts barely moved, and at batch 128 the decode speedup shrank to about 1.2x. What explains this?

  1. A Weight-only quantization cuts bytes read per step, aiding bandwidth-bound decode, but prefill and large-batch decode are compute-bound and still do fp16 math.
  2. B 4-bit weights force the KV cache to 4-bit as well, which saturates the dequantization units during long prefills and large decode batches.
  3. C TTFT is dominated by tokenization and network overhead, and at batch 128 the larger KV cache spills to host memory, neither of which depends on weights.
  4. D Quantization error grows with sequence length and batch size, so the runtime silently falls back to fp16 kernels for long prompts and large batches.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions