Skip to main content
This guide demonstrates how to train a large language model from scratch across all 8 GPUs on an H100 node with S3 checkpointing for fault tolerance.

Table of Contents

Overview

This playbook covers:
  • Training an LLM from scratch across all 8 GPUs on an H100 node using DDP
  • Configuring S3 checkpointing for durability
  • Monitoring GPU utilization via the Observability dashboard
  • Recovering training from a checkpoint after interruption

Prerequisites

  • Access to an H100 node with 8 GPUs
  • AWS credentials configured for S3 access
  • S3 bucket created for checkpoints (see Checkpointing Guide)

Install Dependencies

Verify GPU Availability

Training Job with S3 Checkpointing

This example trains a GPT-2 style model from scratch using all 8 GPUs with PyTorch Lightning and saves checkpoints directly to S3. Create a new file named llm_training.py on your node and paste the following code:

Run the Training Job

Execute the training script within your configured environment. It is critical to export your AWS credentials as environment variables first, ensuring the script can authenticate and stream data to S3 immediately upon startup.

Verify Checkpoints in S3

Confirm that model artifacts are successfully persisting to cloud storage. Use the AWS CLI to list the contents of your bucket and validate that checkpoints are being generated at the expected intervals.

Monitoring with Observability Dashboard

While training is running, you can monitor GPU utilization through the Observability dashboard.

Steps

  1. Navigate to Observability in the left sidebar
  2. Select your cluster and node
  3. Set time range to 6h or 12h

What to Look For

Dashboard During Training

Training dashboard GPU metrics

Recovering from Failures

If training is interrupted, resume from the last S3 checkpoint.

Resume from Last Checkpoint

With PyTorch Lightning, resuming is straightforward. Just add the ckpt_path parameter to trainer.fit():