C.W.K.
Stream
Lesson 08 of 10 · published

Deep Learning 의 비용

~16 min · cost, infra, ops

Level 0Curious
0 XP0/73 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

청구서가 GPU 보다 커

사람들이 training 비용 ('H100 시간에 X 썼다') 에 집중하는데, 진짜 청구서는 data labeling, evaluation, monitoring, drift detection, retraining, 그리고 그걸 정직하게 유지하는 engineer 시간을 포함해. 대략적인 rule of thumb: training compute 가 진지한 deep learning system 평생 비용의 1/5 ~ 1/10 정도야.

Inference 비용이 production 에서 무는 line item 이야. 7B model 을 초당 1000 request 면 영원히 반복되는 적지 않은 GPU 청구서가 돼. Quantization, distillation, batching, KV-cache 재사용, serving framework (vLLM, TGI) 가 그 숫자를 견딜 만하게 만들기 위해 존재해.

숨은 비용

Data quality — label 이 noisy, distribution 이 shift, split 이 leak. '모델이 깨졌다' 디버깅의 대부분이 사실은 data 디버깅이야. Carbon footprint — 큰 training run 은 진짜 환경 결정이야. Reproducibility — code, data, config 없는 checkpoint 는 신뢰 못 할 weight 뭉치야.

주의: 팀이 '내일 이 모델이 silently 5% degrade 하면 누가 알아챌까?' 에 답 못 하면, production 에 model 이 있는 게 아냐. 운으로 살아남는 과학 실험이 있는 거지.

비용을 가시화하기

대부분의 재앙을 막는 싼 습관: 모든 training run 을 seed, code commit, dataset hash, hyperparameter, 최종 metric 과 함께 log. 매주 frozen test set 에서 eval suite 다시 돌려. Drift 를 server error 처럼 surface. 이걸 하는 비용은 작아. 안 하는 비용은 누가 model 이 이상하게 행동하기 시작한 이유를 묻는 날 나타나.

원칙: Deep learning 은 computationally 만 비싼 게 아니라 operationally 비싸. GPU 만 budget 에 넣는 게 나머지 청구서를 어렵게 발견하는 방식이야.

Code

Lineage metadata for every checkpoint·python
import json, subprocess, hashlib, torch
from pathlib import Path
from datetime import datetime

def save_checkpoint(model, optimizer, metrics, cfg, path: Path):
    git_sha = subprocess.check_output(
        ["git", "rev-parse", "HEAD"], text=True
    ).strip()
    manifest = Path("data/train_manifest.txt").read_bytes()
    data_sha = hashlib.sha256(manifest).hexdigest()[:12]

    payload = {
        "model_state_dict": model.state_dict(),
        "optimizer_state_dict": optimizer.state_dict(),
        "metrics": metrics,
        "lineage": {
            "git_sha": git_sha,
            "data_sha": data_sha,
            "config": cfg.to_dict(),
            "timestamp_utc": datetime.utcnow().isoformat(),
        },
    }
    torch.save(payload, path)
    print(f"Saved {path} with git={git_sha[:8]} data={data_sha}")

External links

Exercise

본인이 아는 deep learning system 하나의 평생 비용을 추정해 봐: training, labeling, eval infra, serving, monitoring, on-call. 어떤 숫자라도 '모르겠다' 면 그게 아무도 안 보고 있는 청구서 부분이야.

Progress

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

댓글 0

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

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