파운데이션 모델 엔지니어링

9.2 Dataset Quality vs Quantity

Post-training 데이터는 단순한 예시 모음이 아니라 모델 행동을 조절하는 제어면입니다. LIMA와 AlpaGasus처럼 일부 조건에서는 작고 엄선한 데이터가 크고 노이즈가 많은 데이터보다 좋을 수 있습니다 [1] [2]. 그러나 이는 보편적인 역스케일링 법칙이 아닙니다. 결과는 base model capability, task coverage, diversity, label process, optimization, evaluation에 따라 달라집니다. 같은 패턴의 반복이 아니라 빠진 분포를 채운다면 데이터 양도 중요합니다.


품질을 측정 가능한 속성으로 정의하기

“고품질”은 다음과 같은 검증 가능한 차원으로 풀어 써야 합니다.

  • 정확성: 사실, 실행 결과, rubric 기준이 맞습니다.
  • 관련성: 요청을 회피하지 않고 실제 요구를 충족합니다.
  • 범위: task, domain, language, safety, difficulty, length slice가 제품 분포를 반영합니다.
  • 일관성: role format, tool schema, citation policy, refusal style이 일관됩니다.
  • 다양성: 흔한 paraphrase가 드물지만 중요한 행동을 밀어내지 않습니다.
  • 출처: license, consent, PII/secrets 처리, deletion obligation을 알 수 있습니다.

노이즈에는 항상 지수적으로 더 많은 compute가 필요하다거나 특정 duplication 비율이 최적이라고 추론하면 안 됩니다. 반복은 sample weighting처럼 작동하며 효과는 모델, schedule, example difficulty, evaluation distribution에 따라 달라집니다. unique/repeated token exposure를 측정하고 통제된 mixture로 비교합니다.

Data Quality vs. Quantity Simulator

Adjust the sliders to see how data curation impacts SFT model performance.

Estimated Model Performance (OOD Generalization)

50.0 / 100

이 시각화는 직관을 돕는 도구이지 경험 법칙이나 기본 threshold의 근거가 아닙니다.


불변 매니페스트와 평가 격리

모든 release candidate는 source/revision, license 또는 consent 근거, 수집 시점, language/domain label, filter version, quality score, mixture weight, tokenizer/template version, shard hash, stable sample ID가 들어 있는 불변 매니페스트(immutable manifest) 를 가리켜야 합니다. 출처를 추적해 제거할 수 있도록 PII/secrets 결정과 deletion lineage도 저장합니다.

큐레이션 전에 평가 격리(evaluation quarantine) 를 만듭니다. public benchmark item, private release prompt, rubric, semantic neighbor, 과거 judge example, teacher-generated variant가 포함됩니다. 모든 사람 작성·합성 학습 소스와 exact hash, normalized text, semantic neighbor를 비교합니다. contamination 검사는 학습 전뿐 아니라 최종 rendering/tokenization corpus에도 다시 수행합니다.


Deduplication과 의미 클러스터링 후 Split

안전한 순서는 다음과 같습니다.

  1. raw provenance를 보존하면서 보수적으로 normalize합니다.
  2. exact deduplication과 near-duplicate 탐지를 수행합니다.
  3. 관련 문서, 대화, entity, synthetic sibling을 묶는 의미 클러스터(semantic cluster) 를 만듭니다.
  4. cluster 전체를 train/dev/test 중 하나에 배정합니다.
  5. mixture weight를 계산하고 train partition에서만 sampling합니다.

먼저 split하면 paraphrase와 sibling이 validation으로 유출됩니다. cluster ID와 split 결정을 기록합니다. preference data는 한 prompt의 양쪽 응답과 모든 annotation을 같은 split에 둡니다.


Judge는 측정 도구이지 정답이 아니다

Reward model logit 1.5 같은 값은 이식 가능한 품질 threshold가 아닙니다. 점수는 reward model의 chat format, domain, length distribution, checkpoint에 의존합니다. Judge는 verbosity, 익숙한 표현, 자기 모델 계열의 스타일을 선호할 수 있습니다.

target slice의 사람 label gold set으로 judge를 보정(calibration)합니다.

  1. judge가 문서화한 tokenizer-native format을 사용합니다.
  2. domain, language, length, safety slice별 ranking accuracy와 calibration을 측정합니다.
  3. precision/recall과 review budget으로 accept/review/reject threshold를 정합니다.
  4. raw score, rubric version, judge artifact, 거부 사유(rejection reason) 를 보존합니다.
  5. 불확실하거나 judge가 불일치하거나 고위험인 샘플은 사람 감사(human audit) 로 보냅니다.

code, math, structured output, tool task에는 가능하면 실행 기반 검증을 사용합니다. 하나의 scalar reward가 모든 것을 결정하지 않도록 독립적인 신호를 결합합니다.


Mixture 설계와 Acceptance Test

명시적인 목표 분포를 만듭니다. source별 example/token 수, filtering 후 실제 sampling probability, response length, supervised-token fraction, duplication exposure를 기록합니다. Temperature sampling이나 capped upsampling으로 작지만 중요한 domain을 보호할 수 있으나 반복 예시가 update를 지배하지 않는지 검증합니다.

본 실행 전 동일한 checkpoint, tokenizer, token budget, optimization, evaluation harness로 candidate manifest를 비교합니다. 판단이 근소하면 여러 seed를 사용합니다. 평균 win rate만이 아니라 paired uncertainty, slice minimum, 사람이 판정한 raw example을 보고합니다.

다음을 만족할 때만 데이터 release를 승인합니다.

  • schema, template, EOS, language, tool-format 검사를 통과합니다.
  • license/consent와 PII/secrets 정책의 owner가 있습니다.
  • exact, near, semantic, benchmark contamination 비율이 선언한 한도 안에 있습니다.
  • critical slice의 사람 감사가 목표 precision에 도달합니다.
  • 작은 SFT probe가 target slice를 개선하고 base-retention·safety regression 한도를 넘지 않습니다.

승인한 manifest를 버전으로 고정하고 제자리에서 수정하지 않습니다. 거부한 샘플도 거부 사유를 보존하면 중요한 증거입니다.


Quizzes

Quiz 1: “품질이 양을 언제나 압도한다”가 안전한 계획 원칙이 아닌 이유는 무엇인가요? 품질과 양은 상호작용합니다. 좁은 행동에는 작은 clean set으로 충분할 수 있지만 domain, language, safety, difficulty coverage에는 다양한 추가 데이터가 필요할 수 있습니다. 고정한 token budget과 evaluation harness로 검증해야 합니다.

Quiz 2: 의미 클러스터링을 train/dev/test 배정보다 먼저 해야 하는 이유는 무엇인가요? 먼저 split하면 paraphrase, 관련 entity, conversation sibling, teacher variant가 양쪽에 들어갈 수 있습니다. 그러면 validation은 일반화가 아니라 cluster 암기를 측정합니다.

Quiz 3: Reward model logit threshold를 다른 데이터에 그대로 쓸 수 없는 이유는 무엇인가요? 점수 scale이 checkpoint, format, domain, length distribution에 의존하기 때문입니다. target-domain human label로 threshold를 보정하고 slice별로 감사해야 합니다.

Quiz 4: 승인한 데이터 버전에 어떤 증거가 따라야 하나요? 불변 매니페스트, provenance와 legal/PII 결정, filter와 split version, contamination report, mixture 통계, human-audit 결과, uncertainty가 포함된 pilot 평가, 정확한 tokenizer/template hash가 필요합니다.


References

  1. Zhou, C., et al. (2023). LIMA: Less Is More for Alignment. arXiv:2305.11206.
  2. Chen, L., et al. (2023). AlpaGasus: Training A Better Alpaca with Fewer Data. arXiv:2307.08701.
  3. Lee, K., et al. (2021). Deduplicating Training Data Makes Language Models Better. arXiv:2107.06499.
  4. Sainz, O., et al. (2023). NLP Evaluation in Trouble: On the Need to Measure LLM Data Contamination for Each Benchmark. arXiv:2310.18018.