GPT-OSS-20B Multilingual Inference Fine-Tuning: Analysis of the Role Distribution between SFT and GRPO

AWS has fine-tuned GPT-OSS-20B on SageMaker HyperPod to improve its multilingual inference capabilities. The base model only inferred in the target language 22% of the time across 50 tests, but this was significantly enhanced with SFT. GRPO was effective in further optimizing the behaviors learned through SFT. The entire process was implemented using a distributed learning stack including LoRA, FSDP, and EFA.

Problem Definition: Multilingual Limitations of English-Centric Inference Models

GPT-OSS-20B is an open-weight inference model that performs its internal reasoning (Chain-of-Thought) in English. Even when asked to infer in French, German, Spanish, or Italian, it was observed that the model continues to reason in English after recognizing the instructions. In the 50 example multilingual inference tests published on the AWS Machine Learning blog, the base model had a target language inference rate of only 22%. The detailed figures by language are as follows.

LanguageInference Language Accuracy
English100%
French0%
German10%
Spanish0%
Italian0%

This gap leads to a catastrophic user experience degradation when deploying services to non-English speaking users. When a user asks a question in French, they expect the model to think and respond in French, but the model exposes or mixes English reasoning. Solving this issue was the core challenge of this fine-tuning project.

Dataset and Evaluation Framework: Multilingual-Thinking Benchmark

The experiment utilized the HuggingFaceH4/Multilingual-Thinking dataset. This dataset consists of reasoning problems translated into English, French, Spanish, German, and Italian, containing the reasoning process (Chain-of-Thought).

The evaluation metrics were divided into two categories.

The model receives a 'reasoning language' instruction as a system prompt and must overcome its strong English prior knowledge to perform reasoning and answering in the target language.

Role Distribution of SFT and GRPO: Behavior Learning vs Behavior Optimization

The AWS team defined the difference between the two techniques as follows.

SFT teaches behaviors that the model does not possess. GRPO optimizes behaviors that the model can already generate occasionally.

GRPO (Group Relative Policy Optimization) samples multiple responses per prompt and pushes the policy toward the higher average group. If the probability of the desired behavior converges to 0 in the base distribution, there is no signal for GRPO to reinforce. The authors stated that this principle explains almost all results of this experiment.

In other words, it is a structure where SFT plants the 'seed' of target language inference behavior, and GRPO 'grows' that seed. Significant improvements are possible with SFT alone, and GRPO adds value when there is headroom after SFT.

Learning Infrastructure: Distributed Fine-Tuning Stack Based on SageMaker HyperPod

The entire training pipeline was built on Amazon SageMaker HyperPod. The main components are as follows.

Hardware Configuration

Software Stack

ComponentGPT-OSS-20B ExperimentQwen2.5-7B Control Experiment
OrchestrationAmazon EKSAmazon EKS + Ray + KubeRay
TrainerPyTorch TRLveRL
Rollout GenerationBuilt-in TRLvLLM
Distributed StrategyFSDP Full-ShardRay Distributed
StorageAmazon FSx for LustreAmazon FSx for Lustre
InterconnectElastic Fabric Adapter (EFA)Elastic Fabric Adapter (EFA)
Precisionbf16bf16
Parameter EfficiencyLoRA (r=8, α=16)LoRA

All fine-tuning was conducted using LoRA (Low-Rank Adaptation) to ensure parameter efficiency. Checkpoints and datasets are stored in a persistent volume mounted on Amazon FSx for Lustre (`/fsx`), and collective communication between nodes is handled by the EFA + NCCL + aws-ofi-nccl stack.

End-to-End Data Flow

  1. user submission
  2. EKS control plane
  3. Ray head/worker pod scheduling
  4. FSx for Lustre mount
  5. veRL trainer + vLLM rollout
  6. EFA-based inter-node communication
  7. checkpoint FSx storage

1. User submits execution via SageMaker Studio or AWS CLI 2. The EKS control plane of HyperPod places pods on GPU nodes 3. The Ray head pod and worker pods (veRL trainer, vLLM rollout worker) are launched 4. All pods mount FSx for Lustre to share the base model, training data, and checkpoints 5. vLLM rollout streams to veRL trainer, which records checkpoints to FSx

Experimental Results and Implications: Is SFT Sufficient, or is GRPO Necessary?

GPT-OSS-20B Base Model Baseline

SFT Settings and Results

During SFT training, loss and gradient norm are output at each step, and normal execution shows a stable decrease in loss. After training completion, FSDP checkpoints are converted to PEFT format for inference and evaluation.

Generalization Observed through Qwen2.5-7B Control Experiment

The AWS team conducted control experiments with Qwen2.5-7B on two tasks to validate the criteria for technique selection based on 'capability gap'.

Conclusion: SFT performs most of the heavy lifting, while GRPO adds value when refining behaviors that the model can already occasionally succeed at. Matching techniques to the capability gap of the task determines the results.

Practical Application Guide: Environment Setup and Checklist for Reproduction

The following prerequisites must be met.

Summary of Reproduction Steps

1. `awsome-distributed-ai` le

Verified figures

Our take

This experiment is a rare case that empirically demonstrates the role distribution between SFT and GRPO. When teaching behaviors that the model could not perform at all, SFT is essential, while GRPO is limited to post-refinement. Applying this principle when the team designs fine-tuning strategies can save GPU time and engineering costs.

Open questions

Models mentioned

ProviderInputOutputContext window
OpenAI: gpt-oss-20b · OpenAI$0.03$0.13131,072

Source

Back to catalog