Live
Architecting Conversational Supply‑Chain Workflows with Amazon Bedrock AgentCore and Amazon QuickFine‑tuning multilingual reasoning on SageMaker HyperPod: when SFT is enough and when GRPO helpsNVIDIA’s Open Foundation Models Enable Local Customization and On‑Prem Deployments for European TeamsGeneral Availability of Confidential G4 GPUs: What Engineers Need to KnowAgents SDK introduces createAI, consolidating workers‑ai‑provider and ai‑gateway‑providerDependabot alerts API adds version_requirement to dependency objectsDefault Source‑Map Upload in Wrangler 4.150 and cf CLI: What Engineers Need to KnowStep‑up authorization added to Cloudflare API MCP server – implications for engineersArchitecting Conversational Supply‑Chain Workflows with Amazon Bedrock AgentCore and Amazon QuickFine‑tuning multilingual reasoning on SageMaker HyperPod: when SFT is enough and when GRPO helpsNVIDIA’s Open Foundation Models Enable Local Customization and On‑Prem Deployments for European TeamsGeneral Availability of Confidential G4 GPUs: What Engineers Need to KnowAgents SDK introduces createAI, consolidating workers‑ai‑provider and ai‑gateway‑providerDependabot alerts API adds version_requirement to dependency objectsDefault Source‑Map Upload in Wrangler 4.150 and cf CLI: What Engineers Need to KnowStep‑up authorization added to Cloudflare API MCP server – implications for engineers
AWS

Fine‑tuning multilingual reasoning on SageMaker HyperPod: when SFT is enough and when GRPO helps

AI SummaryPowered by AI

We added supervised fine‑tuning (SFT) and optional Group Relative Policy Optimization (GRPO) to GPT‑OSS‑20B to make it reason in French, German, Spanish, and Italian on SageMaker HyperPod. Practitioners gain a clear pattern for choosing SFT alone or SFT + GRPO based on the model’s existing capability gap.

Engineers have now applied supervised fine‑tuning (SFT) and, where needed, reinforcement learning with Group Relative Policy Optimization (GRPO) to the open‑weight GPT‑OSS‑20B model so that its chain‑of‑thought reasoning appears in the requested non‑English language. The work runs on Amazon SageMaker HyperPod, using a modest 4‑node GPU cluster and LoRA adapters, and demonstrates a practical decision point for when the extra complexity of GRPO is justified.

Solution overview

The target task is multilingual chain‑of‑thought reasoning. The HuggingFaceH4/Multilingual-Thinking dataset provides 949 training examples and 50 validation examples, each paired with a system‑prompt that specifies the desired reasoning language (EN, FR, DE, ES, IT). Two success metrics are tracked: reasoning‑language correct and answer‑language correct. The baseline model produced the correct language only 22 % of the time, driven almost entirely by English examples.

How SFT and GRPO complement each other

SFT teaches the model a behavior it does not exhibit at all – producing chain‑of‑thought in a new language. GRPO refines a behavior that already appears sporadically by sampling multiple responses per prompt and nudging the policy toward the above‑average ones. The authors note that if the base distribution assigns near‑zero probability to the desired output, GRPO has little to reinforce, which explains why SFT handled most of the gap while GRPO only added measurable gains when the model already showed some correct language output.

Training stack on SageMaker HyperPod

The fine‑tuning jobs run on a SageMaker HyperPod cluster orchestrated by Amazon EKS. For GPT‑OSS‑20B, the PyTorch TRL library drives both SFT and GRPO phases. A control experiment with Qwen2.5‑7B uses the veRL trainer, Ray, KubeRay, and vLLM for fast rollout generation. All artifacts – base model, dataset, and LoRA checkpoints – reside on Amazon FSx for Lustre, mounted via a PersistentVolumeClaim named fsx-claim at /fsx. Inter‑node communication leverages Elastic Fabric Adapter (EFA) and NCCL collectives. The GPT‑OSS runs on four ml.g6e.12xlarge nodes (each with 16 × L40S 48 GB GPUs); the Qwen control uses two g6e.48xlarge nodes (also 16 × L40S each). After training, the LoRA adapter is written back to FSx for downstream evaluation or serving.

Operational and security considerations

Deploying this pipeline introduces several practical concerns. First, the reliance on shared FSx storage means that access controls for the file system must be aligned with the principle of least privilege, especially when checkpoints contain model weights. Second, the use of EFA and NCCL requires compatible networking configurations and up‑to‑date NVIDIA drivers; any mismatch can cause job failures or degraded performance. Third, the Ray/KubeRay orchestration layer creates temporary pods that inherit the IAM role of the EKS node group, so role scoping should be reviewed to avoid over‑privileged access to S3 buckets or other AWS resources. Finally, LoRA adapters are small enough to be versioned and audited, but the underlying base model remains unchanged; any security review of the base model still applies.

Related CloudNinjas coverage: AWS.

What This Means For Practitioners

When a target behavior is absent from the base model, start with SFT using LoRA on a HyperPod cluster; it will close the majority of the gap with minimal operational overhead. Introduce GRPO only if validation shows a non‑zero baseline success rate and you need to push the metric higher. Ensure that FSx for Lustre permissions, EFA networking, and node IAM roles are tightly controlled to keep the training environment secure and reproducible. Monitoring job logs for NCCL or Ray errors can surface configuration mismatches early, preventing costly re‑runs.

Originally published atAWS Machine Learning Blog