추론
추론은 학습을 마친 모델이 새로운 입력을 받아 결과를 내놓는 단계다. 가중치를 갱신하는 학습과 달리 서비스가 살아 있는 동안 계속 반복된다. 챗봇 답변 한 줄, 이미지 한 장이 모두 추론 한 번이다. 비용 구조도 다르다. 학습은 한 번의 대규모 투자지만 추론은 사용량에 비례해 매달 쌓이는 운영비다. LLM 추론은 두 단계로 나뉜다. 프리필은 프롬프트를 병렬로 읽어 연산량에 좌우되고, 디코딩은 토큰을 하나씩 만들어 메모리 대역폭에 묶인다. 출력 토큰 단가가 입력보다 비싼 이유다. 사업자들은 배치 처리, KV 캐시 재사용, 양자화, 추측 디코딩으로 단가를 낮춘다. Groq와 Cerebras는 빠른 디코딩을 겨냥한 전용 칩을 만들었고, vLLM과 TensorRT-LLM은 GPU에서 같은 목표를 좇는다. 초당 토큰 수만 보고 판단하는 것은 흔한 실수다. 첫 토큰까지의 지연, 동시 요청 상황의 처리량, 요청당 비용이 제품 체감에는 더 크게 작용한다.
Inference is the stage where a trained model takes new input and produces an output, as opposed to training, where its weights are updated. Every chatbot reply, generated image, and recommendation is an inference pass. The cost profile differs sharply from training: training is a one-time capital expense, while inference is a recurring bill that scales with usage. For a large language model, inference has two phases. Prefill reads the prompt in parallel and is compute-bound; decoding produces one token at a time and is limited by memory bandwidth, which is why output tokens usually cost more than input tokens. Providers reduce that cost with batching, KV-cache reuse, quantization, and speculative decoding. Groq and Cerebras built custom chips aimed at fast decoding, and vLLM and TensorRT-LLM pursue the same goal on GPUs. Prompt caching, offered by Anthropic and OpenAI, skips recomputation of a repeated prefix. A common mistake is judging a deployment only by tokens per second. Latency to the first token, throughput under concurrent load, and cost per request often matter more to a product than raw speed on a single request.
사용 예시
- •“추론 비용을 낮추지 못한 AI 스타트업들이 사용량 기반 과금으로 요금제를 바꾸고 있다”
- •“Groq가 초고속 디코딩을 앞세운 추론 전용 칩으로 GPU 시장에 도전장을 냈다”
- •“vLLM 도입 후 같은 GPU에서 처리하는 추론 요청 수가 눈에 띄게 늘었다”