跳到主要内容
AI News HubLIVE
站内改写5 分钟阅读

待翻译:Scaling MoE reinforcement learning on Amazon EKS with EFA and DeepEP with 40% more throughput

文章摘要

AI 服务暂时不可用,以下为来源摘要,待恢复后补全翻译:Learn how to scale Mixture-of-Experts (MoE) reinforcement learning on Amazon EKS using Elastic Fabric Adapter (EFA) and DeepEP. This post presents an architecture that combines Amazon EKS, EFA, and Amazon S3 and increased aggregate reinforcement learning rollout throughput by 40% for large-scale RLHF and GRPO training.

来源AWS Machine Learning Blog作者: Ashvin Nihalani
待翻译:Scaling MoE reinforcement learning on Amazon EKS with EFA and DeepEP with 40% more throughput
报告错误

纠错通道尚未开通,可先复制下方文章信息留存。

查看更正说明
直接读正文

AI 服务暂时不可用,以下为来源正文,待恢复后补全翻译。

When you post-train a Mixture-of-Experts (MoE) model with Reinforcement Learning from Human Feedback (RLHF) or Group Relative Policy Optimization (GRPO) at scale, three simultaneous challenges emerge. The first requires coordinating heterogeneous compute for rollout generation and policy training. Second, sustaining high-throughput communication across hundreds of accelerators. And third, dynamically orchestrating every subsystem to keep them in balance. On AWS, you can address these challenges using Amazon Elastic Kubernetes Service (Amazon EKS), Elastic Fabric Adapter (EFA), and DeepEP. Mixture-of-Experts (MoE) has become a standard architecture for scaling large language models (LLMs) to hundreds of billions or even trillions of parameters, while maintaining efficient inference through sparsity. However, sparsity doesn’t remove infrastructure complexity in training. As part of the standard training pipeline, these models must undergo pre-training, mid-training, supervised fine-tuning (SFT), and reinforcement learning (RL). Among these stages, large-scale RL training places unusual demands on infrastructure because it combines elastic inference work with tightly coupled model training that requires high-bandwidth communication. Reward models, verifiers, and checkpoint updates add further memory, networking, and orchestration pressure. This type of multi-workload optimization reflects a common infrastructure challenge when you run model training, inference, and evaluation on shared resources without creating bottlenecks or leaving capacity idle. Compared with dense models, post-training MoE models introduce a new infrastructure challenge: as newer MoE architectures become increasingly sparse to reduce inference costs, training becomes constrained more by communication than by compute. A key source of this communication overhead is Expert Parallelism (EP). EP introduces dynamic all-to-all token routing across devices, in addition to the dense, structured communication patterns of Tensor Parallelism (TP), Data Parallelism (DP), and Pipeline Parallelism (PP). In tightly coupled asynchronous RL workloads, the heterogeneous compute and communication demands of MoE training must be balanced with inference-based generation. Slow training steps stall inference workers, while insufficient inference throughput leaves training accelerators idle. This challenge is common across large-scale reinforcement learning workloads, including RLHF pipelines based on Proximal Policy Optimization (PPO) and newer approaches such as GRPO. PPO typically uses a critic model to estimate value during policy optimization, while GRPO avoids the need for a separate critic model by using group-based relative rewards. Although their algorithmic and model requirements differ, both impose similar infrastructure demands: large-scale rollout generation, tightly coupled policy training, and high-bandwidth inter-node communication. In this post, we describe an architecture optimized to accelerate MoE training that combines Amazon Elastic Kubernetes Service (Amazon EKS) and EFA to orchestrate and accelerate large-scale RL training and how DeepEP optimizes expert-parallel communication over EFA. Challenges of large-scale RL training Large-scale RL training presents three interrelated challenges: Balancing the competing resource demands of rollout generation and policy training. Managing accelerator compute, memory, and network bandwidth simultaneously. Handling the shift from high-bandwidth intra-node communication to lower-bandwidth inter-node links as jobs scale beyond a single instance. The rollout-training loop Large-scale asynchronous RL jobs have two distinct, simultaneous workloads to optimize: rollout generation and policy training. During rollout generation, the system performs large-scale distributed inference focused on maximizing aggregate throughput rather than minimizing time to first token (TTFT) or inter-token latency. In contrast, policy training requires tightly coupled workers that progress in lockstep, much like pre-training or SFT. Any latency spike or straggling worker can stall the entire job or trigger NVIDIA Collective Communications Library (NCCL) timeouts. RL systems must balance these two workloads because any mismatch in their rates can leave hardware idle or introduce training instability. Figure 1: The asynchronous RL loop, where rollout workers generate experience through distributed inference while policy-training workers consume batches and update model weights Compute, memory, and bandwidth pressure RL workloads have heterogeneous compute and communication demands. As a result, any RL system must balance three resource constraints: accelerator compute, memory, and network bandwidth. Policy training is compute-intensive and must keep pace with rollout generation. At the same time, distributed inference must manage KV-cache capacity and token generation. Balancing memory bandwidth and compute is critical for maximum throughput because MoE layers add sparse, dynamic all-to-all communication as tokens are routed across devices. Reward models provide feedback during training, and data movement adds further pressure. All of these subsystems must be balanced jointly to help prevent any one from becoming a bottleneck. Intra-node versus inter-node communication As RL training jobs scale beyond a single instance, model partitions and parallelism groups span multiple nodes, shifting communication from the high-bandwidth intra-node NVLink fabric to lower-bandwidth inter-node links. MoE models intensify this shift: unlike the structured patterns of Tensor Parallelism and Pipeline Parallelism, Expert Parallelism dynamically routes tokens across devices through sparse, fine-grained all-to-all communication traffic that becomes increasingly inter-node as the expert parallelism degree grows. Figure 2: Communication domains in multi-node MoE training, where NVLink carries high-bandwidth intra-node traffic while EFA handles inter-node token routing for Expert Parallelism, Tensor Parallelism, and Data Parallelism AWS accelerated computing instances such as P5 and P6 use two primary communication domains: an intra-instance NVLink fabric, typically connected through NVSwitch, and inter-instance networking through EFA. EFA provides high-bandwidth communication traffic between instances. On supported configurations, EFA works with NVIDIA GPUDirect RDMA and OS bypass to transfer data directly between GPU memory buffers across instances, reducing CPU and operating-system involvement in the communication path. Optimizing bandwidth utilization in RL workloads requires balancing these two communication domains by determining which operations can run efficiently over EFA and which must remain within the NVLink fabric. Architecture overview To scale RL workloads on AWS, we combine Amazon EKS, EFA, and Amazon Simple Storage Service (Amazon S3) so that orchestration, high-performance communication, and durable storage can scale independently. With Amazon EKS, you can manage the lifecycle and placement of heterogeneous workers. With EFA, you get the inter-node data path for communication-intensive GPU workloads. With Amazon S3, you can store datasets, model checkpoints, and completed training artifacts including the model weights. The following sections describe how to map the distinct layers of the RL system, covering orchestration, high-performance networking, and durable storage, and how each layer scales independently. EKS cluster topology The Amazon EKS cluster contains separate node groups optimized for each stage of the RL workflow. GPU-accelerated instances run rollout generation, reward-model inference, and policy training, while CPU instances execute environments and preprocessing tasks. Memory-optimized instances host experience buffers and checkpoint caches, allowing producers and consumers to exchange data without placing durable storage directly on the critical path. Figure 3: EKS cluster topology with GPU node groups for policy training and rollout generation, CPU node groups for environment workers and preprocessing, and memory-optimized instances for experience buffers and checkpoint caches RL job topology During rollout, the model generates samples through interactions with CPU-based environment pods, and the resulting experience flows into a memory-optimized buffer. From there, the policy-training step consumes batches, updates model weights, and publishes new checkpoints that feed back into the next round of rollout generation. Checkpoints and completed training artifacts are also persisted to Amazon S3 for durable storage, recovery, and downstream use. Policy training, weight updates, and new checkpoint generation can all run on the EKS cluster. Figure 4: RL job data flow on EKS, where rollout workers generate experience through CPU environment interactions and write to a shared memory buffer, and policy-training workers consume batches, publish updated checkpoints, and persist artifacts to Amazon S3 Network and execution layers EKS provides the control plane for scheduling, scaling, failure recovery, and coordination across different worker groups. Within GPU instances, NVLink and NVSwitch carry high-bandwidth intra-node communication. EFA supports latency-sensitive inter-node communication for distributed policy training and other tightly coupled GPU operations. The experience buffer and Amazon S3 form the data layer, separating high-frequency samples and checkpoint exchange from long-term artifact storage. Performance and cost optimizations This section covers two key optimizations: using DeepEP to reduce expert-parallel communication overhead over EFA, and using Amazon Elastic Compute Cloud (Amazon EC2) Spot Instances to help lower the cost of rollout generation. DeepEP over EFA DeepEP, along with other topology-aware expert-parallel communication techniques, is a common optimization for MoE workloads that aims to reduce communication bottlenecks. Standard all-to-all collectives are most efficient for dense, regular communication, but MoE workloads generate sparse, fine-grained, and imbalanced traffic as tokens are dynamically routed across experts. As Expert Parallelism spans multiple nodes, synchronization and per-message overhead increase, making inter-node communication a dominant bottleneck. DeepEP addresses this by replacing generic all-to-all collectives with specialized dispatch and combining kernels. These kernels use NVLink for intra-node communication and an RDMA-capable backend for inter-node communication. Amazon has contributed several features to migrate DeepEP’s communication primitives to libfabric. This makes the transport layer portable across libfabric-supported network fabrics and optimizes MoE training over EFA. With these changes, DeepEP v2 gains native EFA support. Additionally, NCCL 2.31 incorporates the latest EFA optimizations for dense collective communication. In the following section, we describe how DeepEP over EFA improves rollout-generation throughput by reducing the communication overhead of expert dispatch and combining operations. How DeepEP communicates over EFA DeepEP replaces standard NCCL all-to-all collectives with two specialized GPU kernels: a dispatch kernel that routes tokens from local GPUs to remote experts, and a combine kernel that gathers processed tokens back. For intra-node transfers, these kernels use NVLink through NVSwitch. For inter-node transfers, DeepEP uses libfabric to send data over EFA. On supported instance types such as P5 and P6, EFA works with NVIDIA GPUDirect RDMA to transfer data directly between GPU memory buffers across instances, bypassing the CPU and operating system. The upstream contributions from Amazon migrate DeepEP’s communication primitives from a CUDA-specific RDMA backend to libfabric. This makes the transport portable across EFA-supported [truncated for AI cost control]

展开要点与分析

文章情报

工程师进阶

要点

  • AI 服务暂时不可用,系统已先保留来源内容与降级元数据。
  • Learn how to scale Mixture-of-Experts (MoE) reinforcement learning on Amazon EKS using Elastic Fabric Adapter (EFA) and DeepEP. This post presents an architecture that combines Am…

要点与分析由自动化流程生成,可能有误,请结合原始来源核实。