

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Amazon SageMaker AI モデル並列処理ライブラリ v2 の例
<a name="distributed-model-parallel-v2-examples"></a>

このページには、SageMaker モデル並列処理 (SMP) ライブラリ v2 を実装して SageMaker AI で分散トレーニングジョブを実行する方法について、実践的な例を紹介したブログ記事や Jupyter Notebook の一覧を掲載しています。

## ブログと導入事例
<a name="distributed-model-parallel-v2-examples-blog"></a>

以下のブログでは、SMP v2 の導入事例について説明しています。
+ [Amazon SageMaker AI model parallel library now accelerates PyTorch FSDP workloads by up to 20%](https://aws.amazon.com/blogs/machine-learning/amazon-sagemaker-model-parallel-library-now-accelerates-pytorch-fsdp-workloads-by-up-to-20/)

## PyTorch のサンプルノートブック
<a name="distributed-model-parallel-examples-v2-pytorch"></a>

サンプルノートブックは、[SageMaker AI サンプル GitHub リポジトリ](https://github.com/aws/amazon-sagemaker-examples/tree/master/training/distributed_training/)で提供されています。サンプルをダウンロードするには、次のコマンドを実行してリポジトリをクローンし、`training/distributed_training/pytorch/model_parallel_v2` に移動してください。

**注記**  
次の SageMaker AI ML IDE でサンプルノートブックをクローンし、実行してください。  
[SageMaker JupyterLab](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-updated-jl.html) (2023 年 12 月以降に作成された [Studio](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-updated.html) で利用可能)
[SageMaker Code Editor](https://docs.aws.amazon.com/sagemaker/latest/dg/code-editor.html) (2023 年 12 月以降に作成された [Studio](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-updated.html) で利用可能)
[Studio Classic](https://docs.aws.amazon.com/sagemaker/latest/dg/studio.html) (2023 年 12 月以降に作成された [Studio](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-updated.html) でアプリケーションとして利用可能)
[SageMaker ノートブックインスタンス](https://docs.aws.amazon.com/sagemaker/latest/dg/nbi.html)

```
git clone https://github.com/aws/amazon-sagemaker-examples.git
cd amazon-sagemaker-examples/training/distributed_training/pytorch/model_parallel_v2
```

**SMP v2 サンプルノートブック**
+ [Accelerate training of Llama v2 with SMP v2, PyTorch FSDP, and Transformer Engine by running FP8 training on P5 instances](https://github.com/aws/amazon-sagemaker-examples/blob/main/training/distributed_training/pytorch/model_parallel_v2/llama_v2/smp-train-llama-fsdp-tp-fp8.ipynb)
+ [Fine-tune Llama v2 with SMP v2 and PyTorch FSDP at large-scale using tensor parallelism, hybrid sharding, and activation offloading](https://github.com/aws/amazon-sagemaker-examples/blob/main/training/distributed_training/pytorch/model_parallel_v2/llama_v2/smp-finetuning-llama-fsdp-tp.ipynb)
+ [Train GPT-NeoX with SMP v2 and PyTorch FSDP at large scale](https://github.com/aws/amazon-sagemaker-examples/blob/main/training/distributed_training/pytorch/model_parallel_v2/gpt-neox/smp-train-gpt-neox-fsdp-tp.ipynb)
+ [Fine-tune GPT-NeoX with SMP v2 and PyTorch FSDP at large-scale using tensor parallelism, hybrid sharding, and activation offloading](https://github.com/aws/amazon-sagemaker-examples/blob/main/training/distributed_training/pytorch/model_parallel_v2/gpt-neox/smp-finetuning-gpt-neox-fsdp-tp.ipynb)