상속된 양자화 오차 보정은 언제 도움이 되는가? 층별 양자화에 대한 평균제곱 보장과 그 한계
When Does Compensating Inherited Quantization Error Help? Mean-Square Guarantees for Layer-Wise Quantization and Their Limits
한국어 초록
층별 사후 학습 양자화 방법은 각 층이 이전 층들로부터 상속된 양자화 오차를 보정할 수 있게 한다. 우리는 어떤 가정 하에서 이러한 보정이 보정하지 않을 때보다 크지 않은 네트워크 출력 오차를 보장하는지를 묻는다. 임의의 깊이를 갖는 선형 네트워크에서, 필요한 보정용(calibration) 그램 행렬이 가역적이고 각 층의 라운딩 오차가 조건부 평균이 0이며 두 방식 모두에 공통인 결정론적 2차 모멘트 맵을 가질 경우(비제한 격자에서의 차감형 디더(subtractive dither)에서처럼), 사전에 고정된 $[0,1]$ 범위의 강도를 갖는 보정은 각 방식이 자신의 궤적을 따를 때 보정하지 않는 경우보다 크지 않은 평균제곱 출력 오차를 준다. 정확한 이득은 직접 제거된 오차와 이후 라운딩 노이즈의 감소된 자극(excitation)을 구분한다. 이 설정을 벗어나면 비교가 성립하지 않을 수 있다. ReLU(rectified linear) 활성화 함수를 사용하는 경우, 두 가지 독립적인 이유로 비교가 실패한다: 노이즈가 활성화 상태를 바꾸기 때문이며, 상태 변화가 없더라도 보정이 유닛이 비활성인 샘플에서 활성인 샘플로 오차를 이동시키기 때문이다. 안정적인 활성화 함수의 경우, 보정 사영(calibration projection)과 활성화 패턴 사이의 교환자(commutator)가 초과분을 제한한다. 제한된 코드북(bounded codebook)을 사용하는 경우, 오버로드가 없는 고유한 정확한 층별 최소화자(minimizer)조차 더 큰 출력 오차를 줄 수 있다. 고정된 라운딩 오차에 대해서는 단 두 개의 스칼라 선형 층에서도 이미 실패하며, 이는 기존에 발표된 보편적 보장을 반박한다. 정확한 잔차 항등식(residual identity)은 공통 층 입력에 대한 필요충분조건을 제공한다. 이러한 모든 비교는 보정 입력을 고정한 상태에서 이루어진다. 4비트로 양자화된 두 개의 80억(8B) 파라미터 모델에서, 고정된 절반 강도의 보정은 테스트한 모든 모델, 텍스트 및 draw(그림) 과제에서 보정하지 않은 라운딩을 능가했지만, 강도를 선택하는 어떤 규칙도 층별 규칙을 일관되게 능가하지는 못했으며, 선택에 사용된 데이터에서 전체 네트워크 손실을 낮추는 것이 새로운 텍스트에서도 신뢰성 있게 손실을 낮추지는 못했다.
원문 초록
Layer-wise post-training quantization methods let each layer compensate for the quantization error inherited from earlier layers. We ask under what assumptions such compensation guarantees a network output error no larger than without it. For linear networks of any depth, with the required calibration Gram matrices invertible, if the rounding error of each layer has zero conditional mean and a deterministic second-moment map common to both schemes, as under subtractive dither on an unbounded grid, then compensation with strengths in $[0,1]$ fixed in advance gives a mean-square output error no larger than no compensation, each scheme being followed along its own trajectory. The exact gain separates error removed directly from reduced excitation of later rounding noise. Outside this setting the comparison can fail. With rectified linear activations it fails for two independent reasons: noise changes activation states, and, even when no state changes, the correction moves error from samples on which a unit is inactive to samples on which it is active. With stable activations, commutators between the calibration projection and the activation patterns bound the excess. With a bounded codebook, even unique exact layer-wise minimizers with no overload can give a larger output error. For fixed rounding errors it already fails for two scalar linear layers, refuting a published universal guarantee. An exact residual identity gives the necessary and sufficient condition on a common layer input. All these comparisons hold the calibration input fixed. On two 8B models at 4 bits, fixed half-strength compensation beat uncompensated rounding in every model, text and draw tested, yet no rule for choosing the strength beat a layer-wise rule consistently, and lowering the full-network loss on the data used to choose did not reliably lower it on new text.
제출 이력
확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
공통 태그로 연결된 공개 논문이 아직 없습니다.
토론
이 논문과 연결된 포럼 글이 아직 없습니다.
저자 비고
arXiv Comments
34 pages