1:1 mentoring with Big Tech AI engineers
LLM & Agentic

LLM Lifecycle

Complete lifecycle of large language models from pre-training through fine-tuning, RLHF, and deployment — with architecture diagrams and production considerations.

Last updated

Foundations12 min read

After this section you can

  • Walk the five phases from training data to serving, and say which costs are one-off and which recur on every request
  • Explain what pretraining learns versus what post-training (SFT and RLHF) adds
  • Point at the phase responsible for a given quality, safety, cost, or latency problem
01

LLM Lifecycle — From Data to Deployment

The end-to-end journey of a modern large language model — from raw web text to a low-latency production endpoint. Every Staff FDE should be able to trace all five phases, because each one quietly sets the ceiling on quality, safety, cost, and latency that you inherit downstream.

KEY INSIGHT

A shipped model is the frozen output of a pipeline you never see. Pretraining decides what it knows; post-training decides how it behaves; inference is where you pay for it — over and over, on every single token, forever. Training is a one-time capital cost. Inference is the bill that never stops.

The Five Phases — where each cost lives
PHASE 1 DATA crawl · filter dedup · scrub ~15% survives PHASE 2 PRETRAIN predict next token trillions of tokens $10M+ · months PHASE 3 POST-TRAIN SFT → RLHF/DPO align + make safe weeks · human data PHASE 4 INFER OPT KV cache · quant spec decode · batch make it cheap PHASE 5 SERVE latency vs through- put · autoscale the recurring bill ONE-TIME COST (training) RECURRING COST (per token)

Related

More in LLM & Agentic

Get full access to all 74+ sections with code examples, diagrams, and interactive animations.

Unlock Premium