LLM Training Phases for Enterprise Teams

LLM Training Phases for Enterprise Teams

• by Cliff • 1461 words • views

#ai #llm #training #fine-tuning #enterprise

Training a LLM involves a pipeline of distinct phases. Each phase teaches the model something different, updates different parts of its weights, and demands different data. For AI practioners, the question is rarely "should we train from scratch?" — it is "which phase do we actually need to master to deliver value with client data?" This post maps the three phases of LLM training, what the weights learn in each, and what a typical delivery looks like.

The three phases at a glance

Modern LLM development is usually described as:

  1. Pre-training — learn broad language and world knowledge from raw text.
  2. Mid-training (also called continual pre-training or domain-adaptive pre-training) — extend a pre-trained model with domain-specific unlabeled corpora.
  3. Post-training — align the model with instructions, tasks, and human preferences, typically through supervised fine-tuning (SFT) and reinforcement learning.

The boundaries are not always rigid, and some labs run multiple rounds within each phase. But the mental model is useful because it separates "learning to speak" from "learning the domain" from "learning to behave."

Pre-training

What it is. Pre-training creates the base model. The model is trained on trillions of tokens of broad web, book, code, and curated text using a self-supervised objective, most commonly next-token prediction. The result is a model that understands grammar, facts, reasoning patterns, and style, but does not yet follow instructions reliably.

What the weights learn. Almost everything: token embeddings, attention patterns, feed-forward knowledge storage, and the transformer layers that route information. The weights become a compressed representation of the training corpus. The model learns distributed facts, syntax, semantic relationships, and some reasoning heuristics, but it is not yet aligned to any particular use case.

Data requirements. Massive scale and diversity. Typical runs use 10⁹ to 10¹² tokens. The data is unlabeled, so the cost per sample is low, but the filtering burden is high: deduplication, quality scoring, toxicity filtering, privacy scrubbing, and mixing domains to avoid collapse. Data preparation here is an industrial pipeline, not a manual curation exercise.

Should you do this? Almost never. Pre-training a frontier model costs tens to hundreds of millions of dollars in compute and requires specialized infrastructure. Even domain-specific pre-training from scratch is usually unnecessary when mature base models exist.

Mid-training / Continual pre-training

What it is. Mid-training sits between general pre-training and task-specific fine-tuning. You take a base model and continue training it on a domain corpus — for example, government regulations, medical literature, legal contracts, or internal documentation — using the same next-token objective. It is sometimes called continual pre-training (CPT) or domain-adaptive pre-training.

What the weights learn. The model refines its internal representations to match the target domain's vocabulary, style, and facts. It does not yet learn instruction following or task format; instead, it absorbs the statistical patterns of the new corpus. This can improve downstream task performance even before any labeled fine-tuning, and it reduces the "cold start" problem when later SFT data is scarce.

Data requirements. Smaller than pre-training but still large: roughly 10⁷ to 10⁹ tokens. The corpus should be unlabeled (or lightly labeled), domain-relevant, and clean. A common challenge is catastrophic forgetting: if the domain corpus is too narrow, the model can lose general capabilities. Practitioners often mix in a small percentage of general-domain data or use techniques like model merging to preserve broad knowledge.

When to use it. Mid-training is worth considering when the client's domain is radically different from the base model's training data, or when the client has a large internal corpus (decades of reports, technical manuals, transcripts) and wants the model to internalize its language. For many enterprise use cases, however, a strong RAG layer plus post-training is enough.

Post-training

What it is. Post-training turns a base or mid-trained model into a product. It is the phase most AI practitioners actually touch. It usually includes:

  • Supervised Fine-Tuning (SFT): training on prompt-response pairs so the model learns to follow instructions and produce the desired format.
  • Preference tuning: training on pairs of responses ranked as better or worse, using methods like Direct Preference Optimization (DPO).
  • Reinforcement Learning from Human Feedback (RLHF): using a learned reward model to score outputs and optimizing the policy with PPO, GRPO, or related algorithms.
  • Reinforcement Learning with Verifiable Rewards (RLVR): using programmatic rewards such as unit-test pass/fail or exact-match correctness instead of human preference labels.

Is post-training just RLHF?

No. RLHF is one technique inside post-training, but post-training is broader. In practice, most enterprise pipelines start with SFT, optionally add DPO or RLVR, and only use full RLHF when there is a steady stream of high-quality human preference labels. For many government and enterprise projects, a well-curated SFT dataset plus DPO or RLVR delivers most of the behavioral change at a fraction of the operational cost.

What the weights learn. Post-training adjusts the model's output distribution: tone, format, instruction following, safety refusals, tool-use patterns, and reasoning style. With SFT, the model imitates high-quality demonstrations. With RL-based methods, it learns to prefer responses that score higher on a reward signal. Full fine-tuning updates all weights; parameter-efficient methods like LoRA and QLoRA freeze most of the base model and train small adapter matrices instead.

Data requirements. Quality dominates quantity. Typical post-training uses 10³ to 10⁶ curated samples. Each sample is expensive because it must be correct, well-formatted, and representative. SFT needs prompt-response pairs. DPO needs paired preferences. RLHF needs ranked outputs and enough data to train a stable reward model. RLVR needs a reliable grader. Synthetic data generated by stronger models is common, but it must be filtered carefully to avoid noise and style collapse.

Comparing the phases

Phase Typical data Labels What weights learn Cost Who does it
Pre-training 10⁹ – 10¹² tokens None (self-supervised) General language, world knowledge, reasoning primitives Very high Foundation labs
Mid-training / CPT 10⁷ – 10⁹ tokens None (self-supervised) Domain vocabulary, style, and facts Medium to high Specialized labs, some enterprise teams
Post-training 10³ – 10⁶ samples High-quality demonstrations or preferences Instruction following, format, tone, alignment, task skill Low to medium Most enterprise teams

For AI practioners, post-training is the phase you should know best. Your clients will not ask you to build GPT-5 from scratch. They will ask you to adapt an open-weight model — Llama, Qwen, GLM, Mistral — so that it speaks their language, follows their procedures, and runs in their environment.

Typical delivery setup

  • Base model: an open-weight or commercially licensed instruct model. For sensitive government workloads, this is usually downloaded and run on-prem or in a sovereign cloud region.
  • Data preparation: the client provides documents, Q&A logs, approved responses, SOPs, or transcripts. Your team converts these into SFT prompt-response pairs, and possibly preference pairs for DPO. Data must be scrubbed for PII and cleared for training use.
  • Training stack: Hugging Face Transformers, TRL, Unsloth, or Axolotl for the training loop; Weights & Biases or MLflow for experiment tracking; LoRA/QLoRA to keep hardware requirements modest.
  • Compute: a small cluster of GPUs — often one to eight A100/H100-class cards for a 70B-parameter model with LoRA. Full fine-tuning demands more. Air-gapped or private cloud deployments are common for government clients.
  • Evaluation: held-out test sets, human review, LLM-as-a-judge with a rubric, and task-specific metrics such as F1, exact match, or code-test pass rate. Safety and refusal evaluations are essential for government use.
  • Deployment: the tuned model is served via vLLM, TGI, or a similar inference engine, often behind an API gateway or inside an existing application. Adapters can be swapped without redeploying the base model.

Expected effectiveness

Expectations should be set honestly - Post-training is powerful but bounded:

  • Format and behavior: large gains. The model will follow instructions, adopt the desired tone, and produce outputs in the requested structure.
  • Domain recall: moderate gains. The model will better respond with knowledge it was trained on but it will not reliably memorize every document.
  • New factual knowledge: limited without mid-training or RAG. Post-training teaches the model how to respond, not necessarily what is true.
  • Hallucination reduction: partial. Good SFT and RLVR can reduce some classes of hallucination, but post-training alone does not guarantee factuality. RAG and grounded generation remain necessary for high-stakes claims.
  • Safety and compliance: meaningful but not automatic. Post-training can add refusals, style guardrails, and classification behavior, but must be paired with output filtering and human oversight.

Final note

Pre-training creates a generalist. Mid-training adapts it to a domain. Post-training makes it useful, aligned, and deployable. For AI practioners, the center of gravity is post-training: smaller data, lower compute, faster iteration, and direct relevance to end user outcomes. Master SFT data curation, LoRA/QLoRA workflows, preference tuning, and evaluation — and pair every tuned model with solid RAG and guardrails — and you will cover most of what various government and enterprise clients actually need.