

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

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

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

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

以下のブログでは、SMP v1 の導入事例について説明しています。
+ [New performance improvements in the Amazon SageMaker AI model parallelism library](https://aws.amazon.com/blogs/machine-learning/new-performance-improvements-in-amazon-sagemaker-model-parallel-library/)、*AWS Machine Learning ブログ* (2022 年 12 月 16 日)
+ [Train gigantic models with near-linear scaling using sharded data parallelism on Amazon SageMaker AI](https://aws.amazon.com/blogs/machine-learning/train-gigantic-models-with-near-linear-scaling-using-sharded-data-parallelism-on-amazon-sagemaker/)、*AWS Machine Learning ブログ* (2022 年 10 月 31 日)

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

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

**注記**  
次の 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
```

**PyTorch の SMP v1 サンプルノートブック**
+ [Train GPT-2 with near-linear scaling using the sharded data parallelism technique in the SageMaker model parallelism library](https://github.com/aws/amazon-sagemaker-examples/blob/main/training/distributed_training/pytorch/model_parallel/gpt2/smp-train-gpt-sharded-data-parallel.ipynb)
+ [Fine-tune GPT-2 with near-linear scaling using sharded data parallelism technique in the SageMaker model parallelism library](https://github.com/aws/amazon-sagemaker-examples/blob/main/training/distributed_training/pytorch/model_parallel/gpt2/smp-fine-tune-gpt-sharded-data-parallel.ipynb)
+ [Train GPT-NeoX-20B with near-linear scaling using the sharded data parallelism technique in the SageMaker model parallelism library](https://github.com/aws/amazon-sagemaker-examples/blob/main/training/distributed_training/pytorch/model_parallel/gpt-neox/smp-train-gpt-neox-sharded-data-parallel.ipynb)
+ [Train GPT-J 6B using the sharded data parallelism and tensor parallelism techniques in the SageMaker model parallelism library](https://github.com/aws/amazon-sagemaker-examples/blob/main/training/distributed_training/pytorch/model_parallel/gpt-j/smp-train-gptj-sharded-data-parallel-tp.ipynb)
+ [Train FLAN-T5 with near-linear scaling using sharded data parallelism technique in the SageMaker model parallelism library](https://github.com/aws/amazon-sagemaker-examples/blob/main/training/distributed_training/pytorch/model_parallel/flan-t5/smp-train-t5-sharded-data-parallel.ipynb)
+ [Train Falcon with near-linear scaling using sharded data parallelism technique in the SageMaker model parallelism library](https://github.com/aws/amazon-sagemaker-examples/blob/main/training/distributed_training/pytorch/model_parallel/falcon/smp-train-falcon-sharded-data-parallel.ipynb)

**TensorFlow 用の SMP v1 サンプルノートブック**
+ [TensorFlow 2.3.1 と SageMaker モデル並列処理ライブラリを使用した CNN](https://sagemaker-examples.readthedocs.io/en/latest/training/distributed_training/tensorflow/model_parallel/mnist/tensorflow_smmodelparallel_mnist.html)
+ [SageMaker AI で TensorFlow 分散モデル並列処理ライブラリトレーニングを使用した HuggingFace](https://github.com/huggingface/notebooks/blob/master/sagemaker/04_distributed_training_model_parallelism/sagemaker-notebook.ipynb)