Post-training quantization of vision encoders needs prefixing registers
Kim, Kim, Yeom et al.
Transformer-based vision encoders -- such as CLIP -- are central to multimodal intelligence, powering applications from autonomous web agents to robotic control. Since these applications often demand real-time processing of massive visual data, reducing the inference cost of vision encoders is critical. Post-training quantization offers a practical path, but remains challenging even at 8-bit precision due to massive-scale activations (i.e., outliers). In this work, we propose $\textit{RegCache}$, a training-free algorithm to mitigate outliers in vision encoders, enabling quantization with significantly smaller accuracy drops. The proposed RegCache introduces outlier-prone yet semantically meaningless prefix tokens to the target vision encoder, which prevents other tokens from having outliers. Notably, we observe that outliers in vision encoders behave differently from those in language models, motivating two technical innovations: middle-layer prefixing and token deletion. Experiments show that our method consistently improves the accuracy of quantized models across both text-supervised and self-supervised vision encoders.
CLIP과 같은 Transformer 기반 비전 인코더는 멀티모달 지능의 핵심으로, 자율 웹 에이전트부터 로봇 제어까지 다양한 애플리케이션을 지원합니다. 이러한 애플리케이션들은 종종 대규모 시각 데이터의 실시간 처리를 요구하므로, 비전 인코더의 추론 비용 감소가 중요합니다. 훈련 후 양자화(Post-training Quantization)는 실용적인 경로를 제공하지만, 대규모 활성화(즉, 이상치)로 인해 8비트 정밀도에서도 여전히 어려움이 있습니다. 본 연구에서는 비전 인코더의 이상치를 완화하기 위한 훈련 불필요 알고리즘인 RegCache를 제안하여 훨씬 더 작은 정확도 손실로 양자화를 가능하게 합니다. 제안된 RegCache는 이상치 경향이 있지만 의미론적으로 무의미한 접두사 토큰을 목표 비전 인코더에 도입하여 다른 토큰이 이상치를 갖는 것을 방지합니다. 특히, 비전 인코더의 이상치가 언어 모델의 이상치와 다르게 작동함을 관찰하여, 중간층 접두사 및 토큰 삭제라는 두 가지 기술 혁신을 도출했습니다. 실험 결과는 텍스트 감독 및 자기 감독 비전 인코더 모두에서 양자화된 모델의 정확도를 일관되게 개선함을 보여줍니다.
본 연구는 CLIP, DINOv2와 같은 Transformer 기반 비전 인코더의 훈련 후 양자화(Post-training Quantization, PTQ) 과정에서 활성화 이상치(outliers) 문제를 해결하는 것을 목표로 합니다. 이러한 이상치는 양자화 정확도 저하를 초래하며, 8비트 정밀도에서도 모델 성능에 상당한 영향을 미칩니다.
본 논문은 양자화, 주의 메커니즘, 비전 Transformer 등 다양한 분야의 중요 연구를 인용하고 있으며, 다음을 포함합니다:
CLIP, DINOv2 등 비전 인코더의 원본 논문
PTQ4ViT, RepQ-ViT 등 ViT 양자화 방법
주의 싱크 및 레지스터 토큰 관련 연구
LLM 양자화의 이상치 처리 방법
종합 평가: 이는 비전 인코더 양자화 분야에서 중요한 기여를 하는 고품질 논문입니다. 저자들은 효과적인 기술 해결책을 제시할 뿐만 아니라 비전 인코더와 언어 모델의 이상치 행동 본질적 차이를 심화 분석하여, 해당 분야의 발전에 귀중한 이론적 통찰과 실용적 도구를 제공합니다.