Building Blocks for Foundation Model Training and Inference on AWS

The Building Blocks for Foundation Model Training and Inference on AWS Figure: Adapted from “AI’s Three Scaling Laws, Explained” (NVIDIA Blog). Together,…

By AI Maestro May 12, 2026 4 min read
Building Blocks for Foundation Model Training and Inference on AWS


The Building Blocks for Foundation Model Training and Inference on AWS

Figure: Adapted from “AI’s Three Scaling Laws, Explained” (NVIDIA Blog).

Together, these scaling regimes push the foundation-model lifecycle-pre-training, post-training, and inference-toward convergent infrastructure requirements: tightly coupled accelerator compute, a high-bandwidth low-latency network, and a distributed storage backend. They also highlight the importance of orchestration for resource management, and application- and hardware-level observability to maintain cluster health and diagnose performance issues at scale.

A key trend is the increasing reliance on an open-source software (OSS) ecosystem that spans model development frameworks, cluster resource management, and operational tooling. At the cluster layer, resource management is typically provided by systems such as Slurm and Kubernetes. Model development and distributed training are commonly implemented in frameworks like PyTorch and JAX. Monitoring and visualization-often achieved using Prometheus for metrics collection and Grafana for visualization and alerting-are positioned as an operational layer atop infrastructure and resource management. Figure 1 illustrates this layered architecture, showing how hardware infrastructure supports resource orchestration, which enables ML frameworks, with observability spanning across all layers.

Figure 1: The layered architecture of open-source software stacks for foundation model training and inference

This post is intended for machine learning engineers and researchers involved in foundation model training and inference, focusing on workflows built atop OSS frameworks. It analyzes how AWS infrastructure-including multi-node accelerator compute, high-bandwidth low-latency networking, distributed shared storage, and associated managed services-interacts with common OSS stacks across the foundation model lifecycle. The primary goal is to provide a technical foundation for understanding system bottlenecks and scaling characteristics spanning pre-training, post-training, and inference.

The AWS Building Blocks

The remainder of this series examines how this layered architecture is realized on AWS, progressing through infrastructure, resource orchestration, the ML software stack, and observability. The following sections preview each layer.

Infrastructure: Compute, Network, and Storage

As illustrated in Figure 1, infrastructure is anchored by three coupled building blocks-accelerated compute with large device memory, wide-bandwidth interconnect for collective communication, and scalable distributed storage for data and checkpoints.

Accelerated compute forms the foundation of large-scale foundation model pre-training, post-training, and inference. AWS offers several generations of NVIDIA GPUs as part of its Amazon EC2 accelerated computing instances, including the Amazon EC2 P instance family. The P5 instance family includes p5.48xlarge with eight NVIDIA H100 GPUs, p5.4xlarge with a single H100 GPU for smaller-scale workloads, and p5e.48xlarge/p5en.48xlarge variants with NVIDIA H200 GPUs. The P6 instance family introduces NVIDIA Blackwell B200 architecture with p6-b200.48xlarge and Blackwell Ultra B300 with p6-b300.48xlarge. Across these generations, the dominant scaling axes are peak Tensor throughput, HBM capacity and bandwidth, and interconnect bandwidth (within and across nodes).

As a first-order approximation, peak Tensor Core throughput-measured in floating point operations per second (FLOPS)-helps situate these accelerators on a common axis. The table below summarizes per-GPU peak throughput for dense BF16/FP16 and FP8 Tensor operations, along with HBM capacity and HBM bandwidth, using SXM/HGX-class specifications that align with NVSwitch/NVLink-based multi-GPU nodes.


GPU (representative variant)
BF16/FP16 Tensor peak (dense)
FP8 Tensor peak (dense)
FP4 Tensor peak (dense)
HBM capacity
HBM bandwidth


H100 (SXM)
0.9895 PFLOPS
1.979 PFLOPS

80 GB HBM3
3.35 TB/s


H200 (SXM)
0.9895 PFLOPS
1.979 PFLOPS

141 GB HBM3e
4.8 TB/s


B200 (HGX, per GPU)
2.25 PFLOPS
4.5 PFLOPS
9 PFLOPS
180 GB HBM3e
8 TB/s


B300 (HGX, per GPU)
2.25 PFLOPS
4.5 PFLOPS
13.5 PFLOPS
288 GB HBM3e
8 TB/s

Note: NVIDIA product tables often report Tensor throughput “with sparsity”; this table reports dense throughput. Where applicable, dense throughput is taken as half of sparse throughput, following NVIDIA’s guidance for HGX-class platforms (NVIDIA). DGX figures are system-level; the B200 HBM capacity and bandwidth values are expressed per GPU by dividing DGX totals by eight (NVIDIA).

As models scale, step time is often dominated by collective communication and memory movement rather than raw compute throughput, motivating explicit scale-up and scale-out bandwidth accounting. For the multi-GPU instances, GPU communication spans two regimes. Internal scale-up (NVLink/NVSwitch) provides high-bandwidth, low-latency GPU-to-GPU connectivity within a node, enabling collectives such as all-reduce and all-gather to execute without traversing the host networking stack. External scale-out (EFA) provides OS-bypass networking across nodes, which AWS uses as a building block for Amazon EC2 UltraClusters where communication-heavy collectives span thousands of instances. The following table summarizes key specifications across these instance types:


Instance Type
GPU
GPUs
GPU Memory
NVLink
NVLink BW (aggregate)
EFA
EFA BW (aggregate)


p5.4xlarge
H100
1
80 GB HBM3


v2
12.5 GB/s


p5.48xlarge
H100
8
640 GB HBM3
4th
7.2 TB/s
v2
400 GB/s


p5e.48xlarge
H200
8
1,128 GB HBM3e
4th
7.2 TB/s
v2
400 GB/s


p5en.48xlarge
H200
8
1,128 GB HBM3e
4th
7.2 TB/s
v3
400 GB/s


p6-b200.48xlarge
B200
8
1,440 GB HBM3e
5th
14.4 TB/s
v4
400 GB/s


p6-b300.48xlarge
B300
8
2,100 GB HBM3e
5th
14.4 TB/s
v4
800 GB/s

Note: EFA bandwidth is converted from Gbps to GB/s (÷8) for consistency with other bandwidth metrics; see the EC2 accelerated computing networking specifications. NVLink and EFA bandwidth figures are shown as aggregate per-instance values rather than per-link values; see the P5 instance family page and the P6 instance family page for the corresponding intra-node interconnect and networking characteristics.

Elastic Fabric Adapter (EFA) is a network interface for Amazon EC2 that provides OS-bypass remote direct memory access (RDMA) capability using the Scalable Reliable Datagram (SRD) protocol. By enabling applications to communicate directly with the network device through the Libfabric API-bypassing the operating system kernel-EFA reduces latency and improves throughput for collective operations in distributed training.

Multiple generations of EFA are available on different instance families. Amazon EC2 P5 and P5e instances are equipped with EFA version 2 (EFAv2). EFA version 3 (EFAv3), provided on P5en instances, reduces packet latency by approximately 35% compared to EFAv2. EFA version 4 (EFAv4), available on P6 instances, delivers

Scroll to Top