정의
LLM 추론 인프라는 GPU 클러스터에서 사용자 요청을 효율적으로 처리하기 위해, 추론 시간을 t_compute(계산 시간)와 t_memory(메모리 접근 시간)로 분해하고, 배치 크기 최적화를 통해 throughput을 극대화하는 시스템이다. 하드웨어(HBM 대역폭, FLOPs)와 모델 아키텍처(sparsity, MoE, KV cache 관리)가 결합하여 latency와 cost를 결정한다.
핵심 속성
- t_compute:
(batch × active_params) / FLOPs— 활성 파라미터 수와 배치 크기에 선형 비례. MoE로 인해 활성 파라미터는 전체 파라미터보다 훨씬 작아 계산 효율을 높인다. - t_memory:
(total_params + (batch × avg_context_len × bytes_per_token)) / memory_bandwidth— 모델 전체 weight 로딩 시간과 KV cache 접근 시간의 합. 배치 크기와 컨텍스트 길이에 영향을 받는다. - 배치 최적점:
t_compute ≈ t_memory가 되는 배치 크기에서 latency와 cost의 균형이 최적화된다. 이때의 배치는FLOPs/bandwidth × sparsity로 추정 가능하며, 현대 GPU에서 약 2400~3000 수준. - Latency lower bound: 항상
total_params / memory_bandwidth이상으로, 이 값은 약 20ms (GB300 기준)로 하나의 연산 사이클(drain time)을 정의한다. - 컨텍스트 길이 임계점: 200K 토큰 전후로 compute-bound에서 memory-bound로 전환되며, 이에 따라 가격 티어가 달라진다.
관계
- 20260606-inference-roofline-analysis — roofline analysis 방법론을 LLM 서빙에 적용한 구체적 사례
- 20260605-gpu-memory-hierarchy — HBM, DRAM, flash로 이어지는 메모리 계층과 cache TTL이 inference cost에 미치는 영향
- 20260605-total-parameter-loading-latency — weight fetch lower bound의 구체적 계산과 amortization 직관
- 20260603-sparse-attention — sparse MoE와 sparse attention이 compute/memory 비율에 미치는 효과
인용
“LLM inference에서 총 시간은 t_mem과 t_compute 중 더 큰 값에 의해 bound된다. 배치가 작으면 memory-bound, 배치가 크면 compute-bound가 된다.”
출처
- 📎 클리핑: 20260613-ep96-ko-transcript