You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ColossalAI/examples/language/gpt/experiments/pipeline_parallel
Wenhao Chen 7b9b86441f
[chat]: update rm, add wandb and fix bugs (#4471)
1 year ago
..
README.md [doc] Fix typo under colossalai and doc(#3618) 2 years ago
model_zoo.py [misc] update pre-commit and run all files (#4752) 1 year ago
requirements.txt [example] fix requirements (#2488) 2 years ago
run.sh Move GPT PP Example 2 years ago
train_gpt_pp.py [chat]: update rm, add wandb and fix bugs (#4471) 1 year ago

README.md

Pipeline Parallelism Demo with GPT2

Requirements

Before you can launch training, you need to install the following requirements.

Install PyTorch

#conda
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.3 -c pytorch
#pip
pip install torch==1.12.0+cu113 torchvision==0.13.0+cu113 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu113

Install Colossal-AI v0.2.0 From Official Website

pip install colossalai==0.2.0+torch1.12cu11.3 -f https://release.colossalai.org

Install transformers

pip install transformers

Dataset

For simplicity, the input data is randomly generated here.

Training

#Run the Pipeline Parallel on GPT with default setting and a dummy dataset.
#You can change the GPU number or microbatch number in the run.sh .
bash run.sh