Train and deploy models on Amazon SageMaker HyperPod using the new HyperPod CLI and SDK
AWS•How-to••by Giuseppe Angelo Porcelli, Nicolas Jourdan and Shweta Singh•AWS Artificial Intelligence Blog
In this post, we demonstrate how to use the new Amazon SageMaker HyperPod CLI and SDK to streamline the process of training and deploying large AI models through practical examples of distributed training using Fully Sharded Data Parallel (FSDP) and model deployment for inference. The tools provide simplified workflows through straightforward commands for common tasks, while offering flexible development options through the SDK for more complex requirements, along with comprehensive…
The new HyperPod CLI and SDK (v3.1.0) submit FSDP training jobs and deploy JumpStart or custom models for inference on HyperPod EKS clusters, with CLI commands and matching Python SDK code.
Who it is for
Data scientists and ML engineers running distributed LLM training or endpoints on SageMaker HyperPod clusters orchestrated by EKS.
Key points
Requires sagemaker-hyperpod 3.1.0 or later, Python 3.8 to 3.11, plus the HyperPod training and inference operators installed in the cluster.
The example trains Llama 3.1 8B with FSDP on 8 ml.g5.8xlarge nodes, with checkpoints on an FSx for Lustre PVC.
Deployment can create a SageMaker endpoint and an ALB with a generated TLS certificate stored in S3.
AI:SageMaker AI now has an inference router that sends model requests across registered endpoints in several Regions and accounts, preferring the local Region and failing over when it cannot serve reliably.
AI:SageMaker AI's inference router sends each model request to the healthiest SageMaker endpoint across Regions and accounts, so a saturated local endpoint can fail over without changing app code.
AI:Anyscale's managed Ray service can run on Amazon EC2 through EC2, EKS or SageMaker HyperPod, mapping each AI pipeline stage to different instance types with the same code.