AI Cloud Architect

Train CodeFu-7B with veRL and Ray on Amazon SageMaker Training jobs

AWSHow-to by Bruno Pistone, Giuseppe Angelo Porcelli, Chen Wu and Yin SongAWS Artificial Intelligence Blog

In this post, we demonstrate how to train CodeFu-7B, a specialized 7-billion parameter model for competitive programming, using Group Relative Policy Optimization (GRPO) with veRL, a flexible and efficient training library for large language models (LLMs) that enables straightforward extension of diverse RL algorithms and seamless integration with existing LLM infrastructure, within a distributed Ray cluster managed by SageMaker training jobs. We walk through the complete implementation…

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

Shows how to run GRPO reinforcement learning for the CodeFu-7B coding model using veRL and Ray on SageMaker training jobs, with a worked code-execution reward setup.

Who it is for

Teams running RL fine-tuning of LLMs on SageMaker AI that want distributed Ray clusters without managing the cluster themselves.

Key points

  • Requires a quota for at least 2 ml.p4de.24xlarge instances (8 A100 GPUs each); P5 (H100) instances are also supported.
  • Reward is -1 for non-executable code, -0.5 for compile failure, 0 for time-limit overrun, otherwise fraction of private tests passed.
  • Ray dashboard and Grafana metrics are reached through SSM port forwarding; the code is on GitHub.

The same at other vendors