ML Training Reference Architectures & Tests

June 24, 2026 · View on GitHub

This repository contains reference architectures and test cases for distributed model training with Amazon SageMaker HyperPod, AWS ParallelCluster, AWS Parallel Computing Service (PCS), AWS Batch, and Amazon EKS. The test cases cover different types and sizes of models as well as different frameworks and parallel optimizations (PyTorch DDP/FSDP, Megatron-LM, NeMo...).

The major components of this directory are:

├── 1.architectures/               # CloudFormation templates for reference architectures
├── 2.ami_and_containers/          # Scripts to create AMIs and container images
├── 3.test_cases/                  # Reference test cases and/or benchmark scripts
├── 4.validation_and_observability/# Tools to measure performance or troubleshoot
└── micro-benchmarks/              # Micro-benchmarks (NCCL, NCCOM, NVSHMEM, etc.)

NOTE: The architectures are designed to work with the S3 bucket and VPC created using reference templates 1.architectures/0.common/ and 1.architectures/1.vpc_network/. You're strongly recommended to deploy these two templates before deploying any of the reference architectures.

0. Workshops

You can follow the workshops below to train models on AWS. Each contains examples for several test cases as well as nuggets of information on operating a cluster for LLM training.

NameComments
AI on SageMaker HyperPodWorkshop for SageMaker HyperPod, shows how to deploy and monitor it
AWS ParallelClusterSimilar workshop as HyperPod but on ParallelCluster
AWS Parallel Computing ServiceSimilar workshop as HyperPod but on AWS Parallel Computing Service

Blog

Posts about distributed ML training on AWS are published at https://awslabs.github.io/awsome-distributed-ai/. The Hugo source lives on the content branch.

Blog content is editorially curated by AWS authors. Code samples in this repo (1.architectures/, 3.test_cases/, etc.) accept external contributions as usual — see CONTRIBUTING.md.

1. Architectures

Architectures are located in 1.architectures and consist of utilities and service-related architectures.

NameCategoryUsage
0.commonStorageCommon resources (S3 bucket, event notifications)
1.vpc_networkNetworkCreate a VPC with subnets and required resources
2.aws-parallelclusterComputeCluster templates for GPU & custom silicon training
3.aws-batchComputeAWS Batch template for distributed training
4.amazon-eksComputeManifest files to train with Amazon EKS
5.sagemaker-hyperpodComputeSageMaker HyperPod template for distributed training
6.ldap_serverIdentityLDAP server for multi-user cluster access
7.sagemaker-hyperpod-eksComputeSageMaker HyperPod with EKS orchestration
8.accounting-databaseToolingAccounting database for job tracking
aws-pcsComputeAWS Parallel Computing Service templates with Slurm scheduler

You will also find documentation for EFA and the recommended environment variables.

2. Custom Amazon Machine Images

Custom machine images can be built using Packer for AWS ParallelCluster, Amazon EKS and plain EC2. These images are based on Ansible roles and playbooks.

3. Test Cases

Test cases are organized under 3.test_cases/ by framework (e.g. pytorch/, megatron/, jax/). Within each framework, directories are named after the training library or method (e.g. picotron/, FSDP/, megatron-lm/).

Each test case follows this general structure:

3.test_cases/
└── <framework>/                # e.g. pytorch, megatron, jax
    └── <library>/              # e.g. picotron, FSDP, megatron-lm
        └── <model>/            # e.g. SmolLM-1.7B (may be omitted for single-model cases)
            ├── Dockerfile      # Container / environment setup
            ├── README.md
            ├── slurm/          # Slurm-specific launch scripts
            ├── kubernetes/     # Kubernetes manifests
            └── hyperpod-eks/   # HyperPod EKS instructions

The top-level directory for each test case contains general introduction and environment setup (Dockerfiles, training scripts, configs), while subdirectories provide service-specific launch instructions.

Browse 3.test_cases/ to see the full list of available frameworks and test cases.

4. Validation and Observability

Utility scripts and tools for validating your environment and monitoring training jobs are under 4.validation_and_observability/.

NameComments
1.pytorch-env-validationValidates your PyTorch environment
2.gpu-cluster-healthcheckGPU cluster health checks
3.efa-node-exporterNode exporter with Amazon EFA monitoring modules
4.prometheus-grafanaMonitoring for SageMaker HyperPod and EKS GPU clusters
5.nsightShows how to run Nvidia Nsight Systems to profile your workload

5. Micro-benchmarks

Micro-benchmarks for evaluating network and communication performance are under micro-benchmarks/.

NameComments
nccl-testsNCCL collective communication benchmarks
nccom-testsNCCOM communication benchmarks
nvshmemNVSHMEM benchmarks
expert-parallelismExpert parallelism (MoE) benchmarks

6. Contributors

Thanks to all the contributors for building, reviewing and testing.

Contributors

7. Star History

Star History Chart