Systems session 2/3 · Learner course

CPU vs GPU and quantization

Hardware fit depends on workload shape. Quantization can reduce model-weight memory, but compatibility, latency, and task quality still require measurement.

CPU and GPU roles

CPUs excel at general control flow, preprocessing, and modest workloads. GPUs expose many parallel arithmetic units and high memory bandwidth for dense tensor operations. Prefill is highly parallel; autoregressive decode remains sequential across token positions.

Memory estimate

A first weight-memory estimate is parameters × bits per weight ÷ 8. It excludes KV cache, activations, allocator overhead, runtime buffers, metadata, and sometimes unquantized layers.

Quantization release gate

Compare the quantized candidate with a higher-precision baseline on representative tasks. Record quality, time to first token, inter-token latency, throughput, peak memory, hardware, runtime, and artifact hash.

Open the interactive Open the interactive

Quick check

Does a smaller model file guarantee lower latency?

Show answer

No. Kernel support, dequantization, workload, and hardware can make a smaller artifact slower.

Does weight quantization automatically shrink KV cache?

Show answer

No. KV-cache precision and weight precision are separate choices.