Group-Wise INT4 Quantisation

medium
Unit 22 · Distillation0/2 to milestone

Per-tensor INT8 uses one scale for the whole matrix, so a single outlier ruins precision everywhere. Group-wise quantisation (as in GPTQ, AWQ and llama.cpp's Q4 formats) gives every group of, say, 32 consecutive weights in a row its own scale.

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Group-Wise INT4 Quantisation · TechGradify