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

17.5 Production Evaluation and Release Gates

모델은 특정한 불변 artifact가 사전에 선언한 offline·online gate를 통과했을 때 준비됩니다. 하나의 benchmark score가 올랐다고 준비된 것이 아닙니다. Release process는 의사결정을 재현 가능하게 만들고 승인자를 식별하며, 실제 환경이 실험실과 다를 때 안전하게 되돌릴 수 있어야 합니다.


불변 Artifact Bundle

다음 hash를 포함하는 하나의 불변 artifact bundle(immutable artifact bundle) 을 평가하고 배포합니다.

  • base model과 모든 adapter 또는 merged checkpoint
  • tokenizer, special-token map, chat template, generation config
  • tool schema, retrieval/index revision, safety policy, prompt asset
  • code commit, resolved config, container, CUDA/framework/kernel version
  • training/evaluation data manifest, objective, decoding seed

Champion/candidate registry에 bundle identity, owner, target traffic, approval, evaluation report, last-known-good predecessor를 기록합니다. Base/adapter/tokenizer/template incompatibility는 load 전에 차단합니다. Model-name 문자열은 artifact identity가 아닙니다.


Release Packet과 통계적 결정

Baseline hash, prompt, rubric, judge/verifier artifact, tool state, fixed seed, decoding setting을 고정합니다. Packet에는 raw per-example 결과와 다음을 포함합니다.

  • target/domain, base-retention, safety/over-refusal, format/tool, privacy/security slice
  • response length, entropy, calibration, hallucination/citation evidence
  • latency p50, p95, p99, throughput, cost, OOM/error/tool-retry 비율
  • slice별 표본 크기(sample size)와 평균으로 숨기면 안 되는 critical failure

Paired outcome에는 대응 bootstrap(paired bootstrap) confidence interval 또는 paired permutation/randomization test를 사용합니다. Minimum effect, alpha/error tolerance, sample size 또는 power 근거, tie 처리, slice minimum을 사전에 정합니다. 불일치 사례를 확인하고 일부를 adjudication합니다. Statistical significance가 product significance를 보장하지 않습니다.

LLM judge는 target rubric의 human calibration, position randomization, slice별 agreement/error 분석이 필요합니다. Requirement를 직접 검사하는 executable·rule-based verifier가 있으면 우선합니다.


Gate Decision Table

모든 metric은 단순한 dashboard 색이 아니라 action으로 연결됩니다.

GatePassReviewBlock
Target qualitylower confidence bound가 minimum effect 통과uncertain 또는 제한된 slicematerial regression
Retention모든 protected slice가 범위 안noncritical borderlinecritical capability regression
Safety/privacycritical failure 없음adjudication 필요severity-defined blocker
Format/toolsschema·side-effect test 통과복구 가능한 warninginvalid action 또는 unauthorized effect
Systemslatency/cost/error SLO 통과capacity plan 필요OOM, retry storm, SLO breach

Gate에는 owner, data window, threshold, confidence rule, missing-data behavior, exception approver가 포함됩니다. Evidence가 없으면 0도 pass도 아닙니다.


Shadow, Canary, Ramp-up

세 단계는 서로 다른 질문에 답합니다.

  1. Shadow: candidate가 mirrored input을 받지만 user-visible output이나 external side effect를 만들 수 없습니다. Output, latency, tool plan을 비교합니다.
  2. Canary: 작고 무작위화한 eligible cohort가 candidate를 사용합니다. Exposure/propensity를 기록하고 champion과 동시에 비교합니다.
  3. Ramp-up: 각 observation window가 통과한 뒤 명시적인 단계로 traffic을 늘립니다.

Ad hoc redeploy가 아니라 traffic feature flag 또는 registry pointer를 사용합니다. Safety, error, latency, cost, critical task failure에 자동 중단(automatic abort) threshold를 둡니다. Observation window와 히스테리시스(hysteresis) 를 두어 noise 때문에 버전이 반복 전환되거나 심각한 중단이 늦어지지 않게 합니다.


Rollback Runbook

Rollback은 weight만 교체하는 것이 아니라 last-known-good complete bundle로 전환하는 것입니다. Runbook은 incident owner와 approval path를 지정하고 다음을 다룹니다.

  • routing switch와 cache invalidation
  • incompatible adapter/base 또는 tokenizer state
  • 상태를 가진 tool side effect(stateful tool side effect), 부분 완료 workflow, external transaction
  • queued job, conversation/session state, 이미 전달한 output
  • audit trail, affected cohort 재구성, notification, follow-up evaluation

일부 side effect는 model rollback으로 취소할 수 없습니다. Idempotency key, dry-run/shadow tool call, compensating action, queue version tag를 사용합니다. Detection·recovery time을 측정하고 이전 bundle이 여전히 load되는지 확인하는 정기 rollback 리허설(rollback rehearsal) 을 수행합니다.


평가셋 유지보수

평가셋 유지보수(eval-set maintenance) 는 통제된 data lifecycle입니다. Stable evaluation ID와 cluster ID, provenance, creation reason, owner, severity, rubric version, access class, retirement state를 부여합니다. Semantic neighbor를 deduplicate하고 모든 human·synthetic training pipeline에서 격리합니다.

Production badcase가 나타나면 evaluation evidence로 먼저 고정하고 관련 예시를 학습하기 전에 evaluation-only sibling holdout을 만듭니다. Distribution drift에는 fresh slice를 더하지만 longitudinal comparison을 위한 stable anchor set을 유지합니다. Prompt, grader, tool, schema가 바뀌면 version을 올리고 champion과 candidate를 모두 재실행합니다.

Evaluation access와 contamination을 정기 감사합니다. Exposure가 의심되면 secret case를 회전하되 trend line을 유지하려고 정답을 조용히 다시 쓰면 안 됩니다.


Quizzes

Quiz 1: Tokenizer, template, tool, safety configuration이 artifact bundle에 있어야 하는 이유는 무엇인가요? 이 요소들이 rendered input과 system behavior를 바꿉니다. Weight hash만 배포하면 평가한 분포나 실제 tool·safety 결정을 재현할 수 없습니다.

Quiz 2: Candidate와 champion 비교에 paired statistics를 쓰는 이유는 무엇인가요? 두 system이 같은 case에 답하므로 case별 차이가 관련 signal이며 case difficulty를 통제합니다. Paired bootstrap이나 permutation이 이 구조를 보존합니다.

Quiz 3: Shadow와 canary의 차이는 무엇인가요? Shadow traffic은 사용자에게 보이지 않고 external side effect를 만들면 안 됩니다. Canary는 작은 randomized real cohort에 영향을 주므로 automatic abort와 rollback이 필요합니다.

Quiz 4: Model weight를 되돌려도 incident가 취소되지 않을 수 있는 이유는 무엇인가요? Candidate가 이미 stateful tool side effect, external transaction, queued job, session state를 만들 수 있습니다. Weight rollback 외에 idempotency, compensation, queue/session 처리가 필요합니다.


References

  1. Liang, P., et al. (2022). Holistic Evaluation of Language Models. arXiv:2211.09110.
  2. Demšar, J. (2006). Statistical Comparisons of Classifiers over Multiple Data Sets. JMLR.
  3. Kohavi, R., Tang, D., & Xu, Y. (2020). Trustworthy Online Controlled Experiments. Cambridge University Press.