Post-Training Quantization with Per-Channel Scale Factors
MoE, Compression & Scaling DS practice problem on Onlearn.
Difficulty: hard.
Topics: Post-Training Quantization (PTQ) with Per-Channel Scale Factors, Symmetric Quantization, Per-Channel Calibration, Quantization Error Minimization, Dequantization Mapping, Fixed-point Scaling, Linear Algebra, Numerical Analysis, Deep Learning Optimization, Digital Signal Processing, Computer Architecture, Weight Quantization, Floating Point Arithmetic, Tensor Operations, Model Compression, Error Analysis.
Implement a function that performs 8 bit symmetric per channel quantization on a 2D weight matrix (shape: output channels x input channels). The function should return the quantized weights and the per channel scale factors used for dequantization.