Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[AWS Summit Japan 2025] Optimizing Foundation M...

[AWS Summit Japan 2025] Optimizing Foundation Model Development with Amazon SageMaker HyperPod: Insights from Training the Amazon Nova Model

Amazon SageMaker HyperPod チームは Amazon Nova 基盤モデルの学習において Nova 開発チームが遭遇した様々な技術的課題を解決する機能をサービスに組み込んできました。本セッションでは、それらの技術的課題を概説しつつ、基盤モデルの開発者向けに、HyperPod の核となる分散コンピューティング基盤である UltraCluster と最適化された分散トレーニングフレームワーク、ハードウェア故障に対する自動復旧機能を活用することで、トレーニング時間とコストを削減する方法をご紹介します。

Avatar for Keita Watanabe

Keita Watanabe

June 29, 2025
Tweet

More Decks by Keita Watanabe

Other Decks in Technology

Transcript

  1. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. コスト 40% 減の秘密を公開︕ Amazon Nova 開発で実証済みの ⼤規模モデル学習ベストプラクティス 渡辺 啓太 A W S - 5 6 アマゾン ウェブ サービス ジャパン合同会社 Sr. World Wide Specialist Solutions Architect, Frameworks WWSO
  2. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Nova Pro Amazon Nova Lite Amazon Nova Micro ⼀般提供開始 ⼀般提供開始 ⼀般提供開始 Amazon Nova Premier 最も⾼性能なマルチ モーダルモデル 複雑な推論タスクに 対応し、モデル蒸留 における教師モデル として最適 ⼀般提供開始 Amazon Nova Reel 最先端のビデオ⽣成 モデル ⼀般提供開始 Amazon Nova Canvas 最先端の画像⽣成モ デル ⼀般提供開始 低コスト、低遅延な テキストモデル テキストのみ 低コストなマルチモ ーダルモデル テキスト以外に画像 、⾳声、動画に対応 ⾼性能なマルチモー ダルモデル テキスト以外に画像 、⾳声、動画に対応 より⾼い性能 より低いコスト とレイテンシー 理解モデル (Understanding models) クリエイティブコンテンツ⽣成モデル Amazon Nova 卓越した性能と費⽤対効果を実現する最先端のモデル Amazon Nova Sonic リアルタイムで⼈間 に近しい⾳声を理解 と⽣成 ⼀般提供開始
  3. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Building blocks Nova training stack Orchestration & Observability • Resource Orchestrator • Job Scheduler Algorithms & Software • ML Frameworks HyperPod Network • Wide bandwidth interconnect • Fast accelerator with large device memory Compute • Scalable distributed file storage Storage Amazon EC2 UltraClusters Infrastructures OBSERVABILITY Prometheus CloudWatch Grafana Amazon EKS NEMO JAX PyTorch NxD
  4. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Novaモデルの学習 Data Processing Large-Scale Training Compression Distillation Model Vending Customer Use Cases
  5. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon Novaモデルの学習 Data Processing Large-Scale Training Compression Distillation Model Vending Customer Use Cases
  6. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Building blocks Nova training stack Orchestration & Observability • Resource Orchestrator • Job Scheduler • Dashboards Algorithms & Software • ML Frameworks HyperPod Network • Wide bandwidth interconnect • Fast accelerator with large device memory Compute • Scalable distributed file storage Storage Amazon EC2 UltraClusters Infrastructures OBSERVABILITY Prometheus CloudWatch Grafana Amazon EKS NEMO JAX PyTorch NxD
  7. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 基盤モデルの学習には膨⼤なコンピュートリソース が必要となる Petabytes of unlabeled data + Millions of GPU Hours Foundation models Billions of parameters = Llama-3 70B を学習するために必要な計算基盤は︖ Question
  8. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 基盤モデルの学習には膨⼤なコンピュートリソース が必要となる Petabytes of unlabeled data + Millions of GPU Hours Foundation models Billions of parameters = Llama-3 70B は 6.4M1 H100 GPU hours を費やして学習 ≈ 256xp5 for 132 days Answer Source: 1https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md Llama-3 70B を学習するために必要な計算基盤は︖ Question
  9. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 1. Compute 要件 学習に必要なメモリ: Mixed precision 学習 18 bytes/param Llama3 70B → 1.2 TB~ スケーリング則[1]: FLOPS ≈ 6 x Parameters x Tokens Chinchilla 則[2]: モデルの学習には 20 tokens/parameter 必要 Parameters (FP32/Bf16) 420 GB Gradients (FP32) 280 GB Adam Optimizer States (FP32) 560 GB VRAM consumption Llama3 70B (Without Activations etc.) [1] Kaplan, J., McCandlish, S., Henighan, T., Brown, T.B., Chess, B., Child, R., Gray, S., Radford, A., Wu, J. and Amodei, D., 2020. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361. [2] Hoffmann, J., Borgeaud, S., Mensch, A., Buchatskaya, E., Cai, T., Rutherford, E., Casas, D.D.L., Hendricks, L.A., Welbl, J., Clark, A. and Hennigan, T., 2022. Training compute-optimal large language models. arXiv preprint arXiv:2203.15556. 6 × 70B 70 B x 20 × 0.6 million exaflops = ※ 近年のモデルではより多くの token 数を費やして学習している
  10. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 2. Network 要件 6 × 70B 70 B x 20 × 0.6 million exaflops = H100 (2000 TFLOPS/Bfloat16) ⼀枚で約 3500 ⽇かかる計算量。⼀⽉で学習を⾏ おうとすると 100 台以上の H100 が必要となる。つまり多数のインスタンスを強 調して動かすことが必要となってくる → GPU 間・インスタンス間のレイテン シ・スループットが学習に⼤きく影響する
  11. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 3. ストレージ要件 11 Data Tokens Size(Bytes) Wikitext 100 M~ 750 MB C4.EN (Colossal Clean Crawled Corpus) 156 B 305 GB RedPajama-Data-1T 1 T 5 TB RedPajama-Data-v2 30 T 170 TB [1] https://arxiv.org/abs/2104.08758 [1] https://huggingface.co/bigscience/bloom 広帯域・⼤容量の共有分散ストレージが必要となる Parameters 及び Optimizer States を保存する Ex.: Llama3 70B - Parameters: 420 GB Optimizer States: 560 GB Parameters (FP32/Bf16) 420 GB Adam Optimizer States (FP32) 560 GB Llama3 70B Checkpoints 内訳 基盤モデル学習には⼤規模コーパスが必要
  12. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon EC2 UltraClusters ⾼性能コンピューティング、ネットワーク、ストレージをサポートするスーパーコンピュータ Head-node Compute Nodes /fsx S3 Infrastructure GPU/EFA/FSx for Lustre
  13. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Building blocks Nova training stack Orchestration & Observability • Resource Orchestrator • Job Scheduler • Dashboards Algorithms & Software • ML Frameworks HyperPod Network • Wide bandwidth interconnect • Fast accelerator with large device memory Compute • Scalable distributed file storage Storage Amazon EC2 UltraClusters Infrastructures OBSERVABILITY Prometheus CloudWatch Grafana Amazon EKS NEMO JAX PyTorch NxD
  14. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 分散学習︓基盤モデル学習をスケールさせる モデルの各ブロック を分割処理 MLP・Attention ブロックを並列化 テンソル並列 モデルの各レイヤ を分割処理 パイプライン並列 学習が 単⼀GPU で完結する 単⼀ GPU
  15. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 分散学習︓基盤モデル学習をスケールさせる Replica 1 Replica 2 Replica 3 Replica 4 複数のモデルレプリカで異なるデータを分割処理 データ並列
  16. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. なぜ分散学習は困難なのか 分散学習 Compute Nodes A A A A A A A A A A A A A A A A
  17. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. なぜ分散学習は困難なのか 分散学習 Compute Nodes A A A A A A A A A A A A A A A A
  18. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. なぜ分散学習は困難なのか 分散学習 Compute Nodes A A A A A A A A A A A A A A A A
  19. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 分散学習はハードウェア不良との戦い 数万 GPU 数千 ホスト 3–4 ヶ⽉に わたる学習 ⼀⽇に 10~20 回のハードウェア不良
  20. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 主なハードウェア不良 ビット反転 Silent data corruption (SDC) PUI バスからの切断 XID エラー GPU が認識されなくなる 宇宙線のような外部要因が RAMのビットを反転 検出できないデータのエラー
  21. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 分散学習ベストプラクティス ハードウェア 不良を前提とした学習 すべてを計測する 素早く失敗 素早く復旧 1. 焼きなまし 2. モニタリング 3. チェックポイントの 頻繁な保存 4. 余剰 ハードウェア 1. 問題発⽣時の迅速な失敗 2. 起動時間の短縮 チェックポイント頻度の 最適化 1. メトリクスの収集 1. 学習 2. 通信 3. ホスト 2. メトリクスの可視化 3. KPI を設定: ex. goodput
  22. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon SageMaker HyperPod • Good news! Amazon SageMaker HyperPod を ⽤いることで、これらのベストプ ラクティスが実現できます HyperPod Amazon SageMaker Adventurous ML Teams 😎
  23. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Resiliency: 故障ノードの⾃動交換機能 チェックポイント 保存 復旧 ノード不良 発⽣ インスタンス 復旧 ノードの⾃動交換 学習 チェックポイント 保存
  24. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. HyperPod observability HyperPod cluster Compute Nodes Accelerator observability Cluster observability Maximize accelerator utilization for specific applications Maximize cluster utilization across applications
  25. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Building blocks Nova training stack Orchestration & Observability • Resource Orchestrator • Job Scheduler • Dashboards Algorithms & Software • ML Frameworks HyperPod Network • Wide bandwidth interconnect • Fast accelerator with large device memory Compute • Scalable distributed file storage Storage Amazon EC2 UltraClusters Infrastructures OBSERVABILITY Prometheus CloudWatch Grafana Amazon EKS NEMO JAX PyTorch NxD
  26. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. AWS Deep Learning AMIs (DLAMI) • 最新の NVIDIAドライバ, CUDAラ イブラリ, Lustreドライバ, EFA ソ フトウェアスタックでパフォー マンスを最適化 • GPU/Trainium 双⽅をサポート
  27. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. AWS Deep Learning ソフトウェアスタック HyperPod Deep learning GPU AMI PyTorch, JAX ML frameworks Communication libraries・SDKs DDP, FSDP, MegatronLM, DeepSpeed, torch-neuronx SMP, SMDDP NCCL Accelerator SDK + Optimized libs Neuron, CUDA AWS OFI NCCL libfabric EFA Kernel Driver Accelerator Driver GPU, Trainium EFA Device Hardware・ Kernel space
  28. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Customers are using Amazon SageMaker HyperPod to train FMs at scale
  29. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ⽇本の最新事例: Llama 3.3 Swallow https://swallow-llm.github.io/llama3.3-swallow.ja.html https://aws.amazon.com/blogs/machine-learning/training-llama-3- 3-swallow-a-japanese-sovereign-llm-on-amazon-sagemaker- hyperpod/
  30. © 2025, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Call to Action awsome-distributed training(分散学習 on AWS のベストプラクティス集) • https://github.com/aws-samples/awsome-distributed-training • AWS ParallelCluster/Amazon EKS/Amazon SageMaker HyperPod のレファレン スアーキテクチャ • Megatron-LM, Nemo, PyTorch FSDP, Mosaic-ML Composer 等のテストケース • NCCL tests などのクラスタテスト⽅法の解説 • Observability Stack のセットアップ (Prometheus&Grafana) Workshops • Machine Learning on ParallelCluster: https://catalog.workshops.aws/ml-on- aws-parallelcluster/en-US • SageMaker HyperPod Slurm Workshop: https://catalog.workshops.aws/sagemaker-hyperpod • SageMaker HyperPod EKS Workshop: https://catalog.workshops.aws/sagemaker-hyperpod-eks