Two-Stage Fine-Tuning for LLMs: Combining Supervised Fine-Tuning and Reinforcement Learning for High-Quality Translation
After pre-training, a general-purpose large language model gains broad language understanding and generation abilities, but this "generalist" competence does not automatically translate into professional, stable, context-aware translation quality. This article explains a mature engineering paradigm known as two-stage fine-tuning: first establishing a reliable translation foundation through supervised fine-tuning (SFT), then aligning the model to a higher quality standard with reinforcement learning (RL). It covers the overall workflow, data construction and quality control in the SFT stage, the role of reward models and quality-oriented evaluation methods in the RL stage, the key coordination points that link the two stages, illustrative pseudocode, and practical engineering considerations. Readers will gain a clear understanding of how to decouple capability injection from quality alignment and apply this approach beyond translation to broader generation-quality optimization.
1. Background: Why General Models Struggle with High-Quality Translation
After a general-purpose large language model completes pre-training, it already possesses broad language understanding and generation capabilities. However, this “generalist” competence does not automatically translate into the professional, stable, and context-aware translation quality that real tasks demand. Practical translation work imposes three requirements on the model: semantic fidelity (preserving the source information without omission or distortion), natural language (conforming to the target language’s idiomatic expression), and contextual appropriateness (maintaining consistency and register across long texts and specialized domains).
No single training method can satisfy all these goals at once. Supervised learning can teach the model the correct output form, but it is easily constrained by the scale and diversity of annotated data; pure preference optimization, on the other hand, lacks a stable starting point of capability. For this reason, the industry has gradually converged on a mature engineering paradigm: two-stage fine-tuning. The idea is to first build a reliable translation foundation with supervised fine-tuning, then use reinforcement learning to align the model to a higher quality standard. This article provides a systematic explanation of that workflow.
2. Overall Workflow: A Layered Learn-then-Optimize Design
The core idea of two-stage fine-tuning is to decouple capability injection from quality alignment into two sequential stages:
- Stage 1 (Supervised Fine-Tuning / SFT): The goal is to let the base model reliably learn the input-output mapping of the translation task, producing well-formed output that is semantically accurate at a basic level.
- Stage 2 (Reinforcement Learning / RL): On top of a model that already has basic capability, reward signals further shape output preferences to make translations more natural and more contextually appropriate.
This layering is not arbitrary; it rests on a simple but critical observation: reinforcement learning needs a policy whose starting point is “good enough.” If RL begins directly from a base model that has not been adapted to the task, the exploration space is too large and the reward signal too sparse, so training easily becomes unstable or even collapses. Using SFT to bring the model to a reasonable level first provides a reliable initial policy for the subsequent RL stage and substantially reduces the difficulty of convergence.
3. Stage 1: Supervised Fine-Tuning (SFT)
3.1 Data Construction: Combining Synthetic and Human Data
The quality ceiling of the SFT stage is largely determined by the training data. A common and effective approach is to mix synthetic data with human translation data:
- Synthetic data: Translation samples generated in bulk by a more capable teacher model. Its advantages are scale, broad coverage, and low cost; it quickly expands the diversity and volume of the training corpus and compensates for the limited quantity and domain coverage of human data.
- Human translation data: High-quality samples produced by professional translators. Its advantages are accuracy, idiomaticity, and reliability, making it key to correcting systematic model errors and anchoring a quality floor.
Using either type alone has clear drawbacks: relying only on synthetic data tends to inherit the teacher model’s biases and a “translationese” style, while relying only on human data limits scale and domain coverage. Mixing the two is essentially about trading scale for breadth and human effort for quality, striking a balance between cost and effectiveness.
3.2 Data Ratio and Quality Control
The data ratio is an empirical challenge in this stage, and there is no universal fixed proportion that applies to all cases; it usually requires iterative tuning based on validation-set performance. In practice, several points are worth attention:
- Quality-tiered filtering: Apply confidence-based screening to synthetic data and remove clearly erroneous samples to avoid errors being “learned and amplified.”
- Difficulty and domain balance: Ensure the training set covers different language pairs, domains (general, legal, medical, etc.), and sentence-length distributions, so the model does not fail on long-tail scenarios.
- Deduplication and denoising: Avoid duplicate samples that cause overfitting, and clean up data with malformed formatting or encoding issues.
3.3 Training Strategy
Supervised fine-tuning is essentially a standard next-token prediction task, using a supervised loss (such as cross-entropy) to make the model’s output approximate the reference translation. This stage generally should not be trained for too long; otherwise the model easily overfits to the training distribution and sacrifices generalization. In practice, whether to apply early stopping is decided based on translation-quality metrics on the validation set.
4. Stage 2: Reinforcement Learning (RL)
4.1 The Role of the Reward Model
The goal of the RL stage is to further optimize output preferences on top of the SFT model. Its core component is the reward model: given a translation, the reward model outputs a scalar score representing the overall quality of that translation. The policy model (the translation model being trained) is then adjusted to maximize the reward.
The reward model matters because it converts the vague question of “is this translation good or not” into a numerical signal that can be optimized. It can be trained either on human preference data or with an automated quality-assessment model.
4.2 Quality-Oriented Evaluation Models
In this kind of translation RL, common reward sources are Quality Estimation (QE) models and automated scoring based on Multidimensional Quality Metrics (MQM):
- Quality Estimation reward models: Without relying on reference translations, these directly predict translation quality from the source text and a candidate translation. This property fits real-world scenarios well, because online translation often has no ready-made gold answer available for sentence-by-sentence comparison.
- Multidimensional Quality Metrics reward models: These break translation quality down into multiple dimensions such as accuracy, fluency, terminology consistency, and stylistic appropriateness, score each one, and then aggregate them into an overall reward. Compared with a single coarse score, multi-dimensional evaluation can guide the model to improve specific defects at a finer granularity.
The choice of reward model and the quality of its training data directly determine whether the RL stage points in the right direction. A reward model with systematic bias will steer the model toward “pleasing the evaluator” rather than genuinely improving the translation.
4.3 Reinforcement Learning Optimization
Once the reward signal is available, an algorithm such as Proximal Policy Optimization (PPO) is typically used to update the policy model. To prevent the model from drifting away from its original capability in order to farm a higher reward (reward hacking), practice commonly adds a KL-divergence constraint against a reference model, keeping the new policy “tethered” close to the SFT model so that both improvement and stability are preserved.
5. Key Coordination Design Across the Two Stages
Looking at the two stages together, several coordination points are worth emphasizing:
- Capability transfer between stages: The output of the first stage becomes the initial policy and reference model for the second. If SFT quality is insufficient, the ceiling of the second stage is clearly suppressed.
- Anchoring the reward to the objective: The RL stage should always aim at “more contextually appropriate, natural translations” as its final objective, and the reward model design must serve this objective rather than merely chasing a numerical metric.
- Iterative loop: The two stages need not be executed only once. High-quality samples produced in the second stage can be fed back as data for a new round of SFT, forming a continuous optimization loop of “generate–evaluate–retrain.”
6. Illustrative Pseudocode
The following pseudocode only illustrates the structure of the workflow and does not represent any specific product or interface:
# Stage 1: Supervised fine-tuningsft_model = load_base_model(base_weights)mixed_data = merge(synthetic_pairs=generate_with_teacher(...), # synthetic datahuman_pairs=load_human_translations(...) # human data)sft_model.train(mixed_data, loss="cross_entropy", stop_on=validate(sft_model))# Stage 2: Reinforcement learningreward_model = load_reward_model(kind="QE") # Quality Estimation reward modelpolicy = sft_model # use the SFT result as the initial policyreference = sft_model # reference model for the KL constraintfor batch in translation_prompts:candidate = policy.generate(batch)reward = reward_model.score(source=batch, translation=candidate)# policy optimization with a KL constraint to avoid drifting too far from the referencepolicy.update(reward=reward, kl_reference=reference)
7. Engineering Considerations
When putting two-stage fine-tuning into practice, beyond the algorithms themselves, several engineering capabilities need attention:
- Compute and training orchestration: SFT and RL have different compute demands, so mature training and scheduling infrastructure is needed to coordinate resources.
- Data pipeline: Batch generation of synthetic data and the collection and quality tiering of human data require a stable data-processing pipeline.
- Observability: On a cloud platform, object storage can be used to manage the corpus, container platforms to run training jobs, and logging and monitoring/alerting services to track training metrics and anomalies, keeping long-running training controllable and traceable.
- Evaluation system: An independent evaluation set covering semantic fidelity, language naturalness, and contextual appropriateness should be established to avoid the false impression that “the reward went up but real quality did not improve.”
8. Summary
Through the layered design of “SFT builds a reliable foundation + RL aligns the quality standard,” two-stage fine-tuning decouples capability injection from quality optimization. This addresses the problem that a single training method cannot balance accuracy and naturalness, and, by combining mixed data with a quality-oriented reward model, it systematically improves the contextual appropriateness of translations. Mastering its data-ratio logic, reward-modeling approach, and stage-coordination points makes it possible to extend the method beyond translation to a broader range of generation-quality optimization scenarios.
