Post-Training for Open-Source LLMs: Techniques, Data, and Deployment
This article breaks down how post-training drives most of the practical capability gains in open-source large language models once the base architecture is fixed. It explains the three layers of post-training—supervised fine-tuning, preference alignment, and reinforcement learning with verifiable rewards—along with the data engineering practices that determine results, key training configuration trade-offs, a three-tier evaluation and rollout loop, and guidance on when an open-source base plus post-training is sufficient versus when broader pretraining coverage or retrieval augmentation is needed.
1. Where the Capability Gains Are Coming From
The capability curve of open-source large models has steepened noticeably over the past two years, and one conclusion keeps being confirmed: once the base architecture is fixed, most of the perceivable capability gains come from the post-training stage rather than from piling on more pretraining data. A year ago, the relationship between open-source and closed models was roughly a division of labor between “can write but not well” and “writes well but expensive.” As post-training methods have matured, that dividing line is being erased, and the gap has shifted from whether a capability exists to stability and controllability per unit of cost.
This judgment has boundaries. Knowledge breadth, long-tail facts, and multilingual coverage still depend heavily on pretraining and data mixture. What post-training is good at is drawing out existing capabilities, aligning them, and constraining them—not injecting new knowledge out of thin air.
2. The Three Layers of Post-Training
- Supervised fine-tuning: fixes formats and task paradigms. The goal is to make the model reliably follow instructions, output structures, and tool-calling protocols.
- Preference alignment: makes outputs better match human and business preferences, reducing verbosity, out-of-bounds behavior, and off-topic answers.
- Reinforcement learning with verifiable rewards: targets tasks that can be judged automatically, such as math, code, and logical reasoning, using rules or execution results as rewards to significantly improve accuracy and self-correction.
The three do not replace one another; they stack. Supervised fine-tuning sets the floor, preference alignment tunes the feel, and reinforcement learning raises the ceiling.
3. Data Engineering Decides Success
The upper bound on post-training results is determined by data quality, not by clever algorithms. Practical points:
- Deduplication and decontamination: run nearest-neighbor retrieval against evaluation sets to avoid inflated scores.
- Difficulty stratification: keep a certain proportion of hard samples so the model does not only learn templated answers.
- Rejection sampling: sample multiple times with the current model and keep only trajectories that pass verification, forming a self-distillation loop.
- Coverage control: balance intent, length, language, and refusal scenarios to avoid long-tail collapse.
An illustrative data pipeline:
def build_sft_set(prompts, model, verifier, k=8, keep_ratio=0.3):samples = []for p in prompts:for _ in range(k):y = model.generate(p)if verifier(p, y): # rule check or unit test executionsamples.append({"prompt": p, "response": y})samples = dedup(samples)return sample_by_difficulty(samples, keep_ratio)
4. Key Trade-offs in Training Configuration
- Learning rate and epochs: supervised fine-tuning calls for a small learning rate and few epochs; too many epochs easily cause catastrophic forgetting and rigid style.
- Parameter-efficient fine-tuning: methods such as low-rank adaptation can handle style and task adaptation with limited compute, making it easy to run multiple business lines in parallel.
- Reward design in the alignment stage: prioritize verifiable rewards (compilation passes, unit tests pass, exact answer match), then use model-based preference scoring to cover subjective dimensions.
- Stability engineering: gradient clipping, reward normalization, and reference-model constraints are standard means of suppressing reward hacking and output degradation.
5. Evaluation and the Launch Loop
Evaluation should have three layers: capability (reasoning, code, math), alignment (helpfulness and harmlessness), and business (pass rate on real traffic plus manual spot checks). After launch, use a canary release together with logging services and monitoring alerts, and feed failed samples back into the training set for weekly iterations. On the inference side, elastic scaling through a container platform, model and dataset hosting on object storage, and message queues for peak shaving help control cost per call.
6. Selection Guidance
If the task centers on format compliance, domain expression, and tool orchestration, an open-source base plus post-training already covers most scenarios with a clear cost advantage. If it depends heavily on broad knowledge and multilingual long-tail coverage, evaluate the coverage of the pretraining base or use retrieval augmentation to shore up factuality. The core principle: build the evaluation set and verifiers first, then talk about training—otherwise you cannot tell where the gains come from.
