You want to quantize an LLM to cut serving cost. How do you decide how far to quantize, and how do you make sure you haven't degraded quality?

technical-conceptual · Mid level · data-ml

What the interviewer is really asking

Tests whether the candidate understands quantization as a memory/cost-vs-accuracy trade — the difference between INT8 and INT4 and KV-cache quantization, that lower precision saves more but risks more degradation, and that the only honest way to choose is task-specific evaluation, not a perplexity headline.

What to say

What to avoid

Example answers

Strong: I wanted to cut serving cost on a classification-style extraction feature, so I quantized FP16 to INT8 first and ran it against our 400-example eval set: task accuracy held within half a point and cost dropped about 45%, so I shipped it. I tried INT4 too, but it dropped accuracy by 4 points on the hard slice, which wasn't worth the extra savings for this feature.

Weak: I'd quantize to INT4 since it gives the biggest savings, and the quality loss is usually small enough not to matter.

Want questions matched to your role? Paste a job title, job description, or CV and get a personalized set, or go Pro to unlock the full bank.