ColossalAI/examples/language/gpt/experiments/auto_offload
Hongxin Liu 079bf3cb26
[misc] update pre-commit and run all files (#4752)
* [misc] update pre-commit

* [misc] run pre-commit

* [misc] remove useless configuration files

* [misc] ignore cuda for clang-format
2023-09-19 14:20:26 +08:00
..
README.md [doc] Fix typo under colossalai and doc(#3618) 2023-04-26 11:38:43 +08:00
model_zoo.py [misc] update pre-commit and run all files (#4752) 2023-09-19 14:20:26 +08:00
requirements.txt [misc] update pre-commit and run all files (#4752) 2023-09-19 14:20:26 +08:00
run.sh [auto-parallel] add auto-offload feature (#3154) 2023-03-21 14:17:41 +08:00
train_gpt_offload.py [misc] update pre-commit and run all files (#4752) 2023-09-19 14:20:26 +08:00

README.md

Auto-Offload 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 auto offload on GPT with default setting and a dummy dataset.
bash run.sh