Hyun Choi
Back to Home홈으로

Capstone Research Project캡스톤 연구 프로젝트

Morpheme-Aware PTQ Calibration for Korean LLMs 한국어 LLM을 위한 형태소 인지 PTQ 캘리브레이션

H. Choi

Investigates whether morpheme-diversity-optimized calibration sets preserve model performance better than random sampling when quantizing Korean and multilingual LLMs using GPTQ 4-bit quantization. Validated across five model families on KoBEST and KMMLU benchmarks.

GPTQ 4비트 양자화로 한국어·다국어 LLM을 양자화할 때, 형태소 다양성이 최적화된 캘리브레이션 셋이 무작위 샘플링보다 모델 성능을 더 잘 보존하는지 검증한 연구입니다. KoBEST와 KMMLU 벤치마크에서 5개 모델 패밀리에 걸쳐 검증했습니다.

GPTQ Korean NLP Post-Training Quantization Morphological Analysis vLLM
Morpheme-Aware PTQ for Korean LLMs

Key Finding. Calibration data quality significantly impacts quantization outcomes. Morpheme-diversity-optimized Korean calibration (C_v3) achieved 97.4% FP16 retention on KoBEST — compared to 91.7% with English random sampling — a 3.5× reduction in performance degradation. Language-aligned calibration consistently outperformed generic English baselines across 5 model families.

핵심 결과. 캘리브레이션 데이터 품질이 양자화 결과에 큰 영향을 미칩니다. 형태소 다양성이 최적화된 한국어 캘리브레이션(C_v3)은 KoBEST에서 FP16 성능의 97.4%를 유지했습니다 — 영어 무작위 샘플링의 91.7%와 비교하면 성능 저하가 3.5배 감소한 수치입니다. 언어 정렬 캘리브레이션은 5개 모델 패밀리 전반에서 일반 영어 베이스라인을 일관되게 앞섰습니다.

Results결과

KoBEST RetentionKoBEST 성능 유지율

97.4%
FP16 performance retained after GPTQ 4-bit quantization (SOLAR-10.7B, C_v3 calibration) GPTQ 4비트 양자화 후 FP16 성능 유지율 (SOLAR-10.7B, C_v3 캘리브레이션)

VRAM ReductionVRAM 절감

72%
20 GB → 5.6 GB on TITAN RTX, with +4% throughput and −5% latency TITAN RTX 기준 20 GB → 5.6 GB, 처리량 +4%, 지연시간 −5%

Cross-Model Validation교차 모델 검증

5 Models5개 모델
SOLAR, EEVE, EXAONE, Qwen2, Llama-3 — morpheme-aware calibration led in 4/5 on reasoning tasks SOLAR, EEVE, EXAONE, Qwen2, Llama-3 — 추론 태스크에서 5개 중 4개 모델에서 형태소 인지 캘리브레이션이 우세

Method: Greedy Morpheme Diversity Selection (C_v3)방법: 그리디 형태소 다양성 선택 (C_v3)

  1. Extract 100K candidate sentences from NamuWiki
  2. Filter sentences requiring ≥8 morphological units and ≥70% Korean character ratio
  3. Score candidates using α × coverage_bonus + β × length_bonus + γ × sentence_final_bonus
  4. Greedily select 128 sentences maximizing cumulative morpheme coverage
  1. 나무위키에서 10만 개의 후보 문장 추출
  2. 형태소 단위 8개 이상, 한국어 문자 비율 70% 이상인 문장만 필터링
  3. α × coverage_bonus + β × length_bonus + γ × sentence_final_bonus로 후보 점수화
  4. 누적 형태소 커버리지를 최대화하는 128개 문장을 그리디하게 선택

The C_v3 design fixes a core issue in earlier versions: non-Korean character inflation artificially increased subword token counts, degrading GPTQ weight approximation quality. By enforcing Korean character ratio and morpheme unit thresholds, the calibration set better reflects the true token distribution of Korean text.

C_v3 설계는 이전 버전의 핵심 문제를 해결합니다. 비한국어 문자의 증가는 서브워드 토큰 수를 인위적으로 늘려 GPTQ 가중치 근사 품질을 저하시켰습니다. 한국어 문자 비율과 형태소 단위 기준을 강제함으로써 캘리브레이션 셋이 한국어 텍스트의 실제 토큰 분포를 더 잘 반영하도록 했습니다.

What I Built구현 내용

Related Writing관련 글

I documented the motivation behind this work in a Velog post about on-device AI and quantization: 성능만 보던 시선에서, On-device AI와 양자화를 다시 보게 되었다 .

이 연구의 동기를 On-device AI와 양자화에 관한 Velog 글로 정리했습니다: 성능만 보던 시선에서, On-device AI와 양자화를 다시 보게 되었다 .