NumPy allowed · plain Python earns 10 bonus points
Implement symmetric absolute maximum INT8 quantization to compress neural network weights with minimal accuracy degradation.
Implement quantize_int8(W). Compute scale = max(|W|) / 127.0. Round W / scale to nearest integer clipped to [-127, 127]. Return [quantized_W, scale].
quantize_int8(W: list[list[float]]) -> tuple[list[list[int]], float]