aws / aws/amazon-sagemaker-examples

SageMaker OOM on 11_train_gptj_smp_tensor_parallel_notebook.ipynb

Open
#3,782 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
11k
Forks
7k
Avg merge
8h 29m
Merged PRs (30d)
8

Description

[Link to the notebook.](https://github.com/aws/amazon-sagemaker-examples/blob/main/training/distributed_training/pytorch/model_parallel/gpt-j/11_train_gptj_smp_tensor_parallel_notebook.ipynb)

I am trying to run the example notebook above on SageMaker using the gpt-j-xl model but keep running into an out of memory error on a ml.p3.16xlarge Ec2 instance. I have tried other suggested instances (eg ml.g4dn.12xlarge) as well but get the same error. I've attached the latest error below. I've tried to set the train and val batch sizes to as low as 2 and still run into OOM issues. Any guidance would be appreciated.

![Screen Shot 2023-02-13 at 10 53 14 PM](https://user-images.githubusercontent.com/119977166/218658638-1fe17161-377c-47b8-b149-ea478dc3346f.png)

Contributor guide

Open the contributing guide

Research direction

Start by running 11_train_gptj_smp_tensor_parallel_notebook.ipynb with gpt-j-xl on the reported SageMaker instances and compare the displayed OOM with the train and validation batch-size settings. Done would require a confirmed notebook configuration or documented guidance that allows the example to run without running out of memory.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, jupyter-notebook, pytorch
Domain
cloud, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.