mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-06-20 12:43:55 +00:00
* Fixed several spelling errors under colossalai * Fix the spelling error in colossalai and docs directory * Cautious Changed the spelling error under the example folder * Update runtime_preparation_pass.py revert autograft to autograd * Update search_chunk.py utile to until * Update check_installation.py change misteach to mismatch in line 91 * Update 1D_tensor_parallel.md revert to perceptron * Update 2D_tensor_parallel.md revert to perceptron in line 73 * Update 2p5D_tensor_parallel.md revert to perceptron in line 71 * Update 3D_tensor_parallel.md revert to perceptron in line 80 * Update README.md revert to resnet in line 42 * Update reorder_graph.py revert to indice in line 7 * Update p2p.py revert to megatron in line 94 * Update initialize.py revert to torchrun in line 198 * Update routers.py change to detailed in line 63 * Update routers.py change to detailed in line 146 * Update README.md revert random number in line 402
39 lines
914 B
Markdown
39 lines
914 B
Markdown
# Pipeline Parallelism Demo 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
|
|
```
|
|
|
|
## Dataset
|
|
|
|
For simplicity, the input data is randomly generated here.
|
|
|
|
## Training
|
|
|
|
```bash
|
|
#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
|
|
```
|