C.W.K.
Stream
Lesson 03 of 12 · published

Model 테스트

~11 min · model, testing, drift

Level 0Apprentice
0 XP0/101 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

모델은 비결정적; test 도 그래야

로컬 학습 / fine-tune 모델은 test 문제가 prompt regression 과 달라. '이 prompt 가 옳은 shape 생산하는가' 가 아냐 — '모델이 hold-out 평가 세트에서 regression 했는가'.

표준 model test

  • Held-out 정확도 — 동결 test 세트에서 점수.
  • Latency / throughput — 요청당 추론 예산.
  • 출력 형식 — 모델이 합의된 schema 여전히 생산?
  • Slice metric — 하위 그룹 정확도 (한국어 입력, edge-case 토큰, 긴 context).
  • Drift — 최근 traffic 샘플 점수 분포, baseline 대비.

CI 모양

Model test 는 보통 GPU runner + 모델 weight 필요. 세 옵션:

  1. Self-hosted GPU runner — 매 PR 에 full eval.
  2. Hosted cloud GPU (Modal, RunPod) — eval 당 과금, 0 으로 스케일.
  3. CPU-only smoke + 예약 GPU full eval — 저렴한 중간.

ML 에 macOS runner 쓰지 마. Linux 의 10× 비용 + GPU 사용 불가.

Code

Model test job — CPU smoke + 예약 GPU full·yaml
name: model-eval
on:
  pull_request: { paths: ['models/**', 'src/**'] }
  push: { branches: [main] }
  schedule: [{ cron: '0 6 * * *' }]

jobs:
  smoke:
    if: github.event_name == 'pull_request'
    runs-on: ubuntu-latest    # CPU
    steps:
      - uses: actions/checkout@v4
      - run: pip install -e '.[dev]'
      - run: pytest tests/model/test_smoke.py    # tiny held-out, CPU-runnable

  full:
    if: github.event_name != 'pull_request'
    runs-on: [self-hosted, gpu, linux-x64]
    timeout-minutes: 60
    steps:
      - uses: actions/checkout@v4
      - run: pip install -e '.[dev]'
      - run: pytest tests/model/test_full.py    # GPU-required held-out

External links

Exercise

CI 에 모델 있으면 test 분류: 어떤 게 CPU 가능 smoke 이고 어떤 게 GPU 필요. 2-tier 모양 (PR 엔 smoke, 일정엔 full) 설정하고 비용 떨어지는 거 봐.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.