Skip to content
nonconvexcard

Migrating quantization difficulty

NumericalIntermediate⏱ 30 minQuantizationsmoothquantscalingmigration

Problem

A channel jj has activation maximum ∣Xj∣max⁡=60|X_j|_{\max} = 60 and weight-row maximum ∣Wj∣max⁡=0.1|W_j|_{\max} = 0.1. Typical channels have activation max 22 and weight max 0.10.1.

  1. Compute the migration scale sjs_j at α=0.5\alpha = 0.5 and the resulting maxima.
  2. Repeat at α=0.75\alpha = 0.75.
  3. Compute the activation and weight dynamic ranges before and after in each case, and say which α\alpha you would choose given that weights are quantized per channel to INT8 and activations per tensor to INT8.

Compute the requested quantities and say what they mean. A number without an interpretation is not an answer.

Solution

Opening this before you have a real attempt on paper is the fastest way to feel like you understand something you cannot reproduce.

Related problems

All problems
SolvedProblemFieldTypeDifficultyTime
Derive the attention crossover lengthLLM OpsProofBeginner15 min
Effective bits lost to dynamic rangeQuantizationNumericalBeginner15 min
Mini-batching and the compute budgetSGDNumericalIntermediate30 min
The α/r scalingFine-TuningProofIntermediate30 min
Why attention divides by the square root of d_kDeep LearningProofIntermediate30 min