트랜스포머 기반 음성 인식 모델을 위한 정수 양자화 및 비선형 함수 근사 적용 및 분석
Analysis of Integer Quantization and Nonlinear Function Approximation for Transformer-based Speech Recognition Model
- 주제어 (키워드) 온디바이스 AI , 트랜스포머 , 양자화 , 스케일 팩터 , KLDivergence , 비선형함수 , 음성 인식 , On-device AI , Transformer , quantization , scale factor , nonlinear functions , speech recognition
- 발행기관 서강대학교 일반대학원
- 지도교수 이혁준
- 발행년도 2025
- 학위수여년월 2025. 2
- 학위명 석사
- 학과 및 전공 일반대학원 컴퓨터공학과
- 실제 URI http://www.dcollection.net/handler/sogang/000000079798
- UCI I804:11029-000000079798
- 본문언어 한국어
- 저작권 서강대학교 논문은 저작권 보호를 받습니다.
초록 (요약문)
With the rising demand for on-device AI, optimizing deep learning models for efficient inference in resource-constrained environments has become a critical challenge. Whisper, a Transformer-based deep learning model, currently demonstrates state-of-the-art (SOTA) performance in speech recognition but faces limitations in edge device applications due to its high computational resource requirements. Notably, some edge devices are equipped with NPUs (Neural Processing Units) capable of integer operations only, making floating-point operations infeasible. To address this, this study introduces an integer quantization approach that minimizes floating-point operations and analyzes its impact on memory usage and inference time. Furthermore, considering that nonlinear functions such as GELU, Softmax, and Layer Normalization still rely on floating-point operations, this research applies integer approximation methods for these functions to enhance compatibility with integer-only processors. The optimized Whisper model was evaluated on the LibriSpeech dataset, and performance comparisons before and after optimization demonstrated minimal degradation. Additionally, the study analyzed the effects of integer quantization and function approximation through various test configurations.
more초록 (요약문)
최근 온디바이스 AI 의 수요가 증가하면서 제한된 자원 환경에서의 효율적인 추론을 위한 딥러닝 모델 최적화가 중요한 과제로 부상하고 있다. 트랜스포머 기반 딥러닝 모델인 Whisper 는 음성 인식 분야에서 현재 SOTA (State-of-the-Art) 성능을 기록하고 있으나, 높은 연산 자원 요구로 인해 엣지 디바이스에서의 적용에 한계가 있다. 특히, 일부 엣지 디바이스는 정수 연산만 가능한 NPU(Neural Processing Unit) 프로세서를 탑재하고 있어 부동 소수점 연산을 수행하기 어렵다. 이를 해결하기 위해 본 연구는 정수 양자화 기법을 통해 부동 소수점 연산을 최소화한 모델을 만들고 메모리 사용량과 추론 시간을 분석한다. 또한, GELU, Softmax, 레이어 정규화와 같은 비선형 함수들이 여전히 부동 소수점 연산을 요구한다는 점을 고려하여, 정수 연산만 가능한 프로세서에 적합한 비선형 함수의 정수 근사법을 추가 적용하여 최적화를 한다. 최적화된 Whisper 모델의 성능은 LibriSpeech 데이터셋을 통해 평가 되었으며, 최적화 적용 전후의 성능을 비교한 결과, 성능 하락이 최소화됨을 확인하였다. 또한 다양한 구성의 테스트를 통해 정수 양자화와 함수 근사의 영향을 분석하였다.
more목차
제 1 장 서론 1
제 2 장 연구 배경 2
2.1 트랜스포머(Transformer) 2
2.2 양자화(Quantization) 5
2.2.1 균등(Uniform) 양자화와 비균등(Non-unform) 양자화 6
2.2.2 대칭(Symmetric) 양자화와 비대칭(Asymmetric) 양자화 7
2.2.3 정적(Static) 양자화와 동적(Dynamic) 양자화 8
제 3 장 제안 구조 9
3.1 기본적인 양자화 방식 9
3.2 가중치와 활성화 값의 양자화 방식 10
3.3 선형 레이어(Linear Layer) 양자화 10
3.4 멀티-헤드 어텐션 레이어 양자화 12
3.5 활성화 값의 정적 양자화 스케일 팩터 12
3.5.1 레이어별 최대값 사용 13
3.5.2 KL Divergence 사용 13
3.6 비선형 함수 (Non-linear Function) 15
제 4 장 실험 및 결과 분석 19
4.1 실험 환경 및 방법 19
4.1.1 실험 환경 19
4.1.2 평가 지표 20
4.1.3 LibriSpeech 데이터셋 21
4.2 실험 결과 및 분석 21
4.2.1 동적 양자화 21
4.2.2 정적 양자화의 스케일 팩터 21
4.2.3 모델 크기 24
4.2.4 실행 시간 24
4.3 비선형 함수 25
4.3.1 GELU 근사 적용 25
제 5 장 결론 및 향후 연구 26
참고문헌 28

