mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-10 13:30:19 +00:00
[example] upload auto parallel gpt2 demo (#2354)
This commit is contained in:
44
examples/language/gpt/experiments/auto_parallel/README.md
Normal file
44
examples/language/gpt/experiments/auto_parallel/README.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Auto-Parallelism with GPT2
|
||||
|
||||
## Requirements
|
||||
|
||||
Before you can launch training, you need to install the following requirements.
|
||||
|
||||
### Install PyTorch
|
||||
|
||||
```bash
|
||||
#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](https://colossalai.org/download/) From Official Website
|
||||
|
||||
```bash
|
||||
pip install colossalai==0.2.0+torch1.12cu11.3 -f https://release.colossalai.org
|
||||
```
|
||||
|
||||
### Install transformers
|
||||
|
||||
```bash
|
||||
pip install transformers
|
||||
```
|
||||
|
||||
### Install pulp and coin-or-cbc
|
||||
|
||||
```bash
|
||||
pip install pulp
|
||||
conda install -c conda-forge coin-or-cbc
|
||||
```
|
||||
|
||||
## Dataset
|
||||
|
||||
For simplicity, the input data is randonly generated here.
|
||||
|
||||
## Training
|
||||
|
||||
```bash
|
||||
#Run the auto parallel resnet example with 4 GPUs with a dummy dataset.
|
||||
colossalai run --nproc_per_node 4 auto_parallel_with_gpt.py
|
||||
```
|
Reference in New Issue
Block a user