README.md 829 Bytes
Newer Older
1
# Multi-dimensional Parallelism with Colossal-AI
2
3


4
## Install Titans Model Zoo
5
6

```bash
7
pip install titans
8
9
10
11
12
```


## Prepare Dataset

13
14
We use CIFAR10 dataset in this example. You should invoke the `donwload_cifar10.py` in the tutorial root directory or directly run the `auto_parallel_with_resnet.py`.
The dataset will be downloaded to `colossalai/examples/tutorials/data` by default.
15
16
17
18
19
20
21
22
23
24
25
26
If you wish to use customized directory for the dataset. You can set the environment variable `DATA` via the following command.

```bash
export DATA=/path/to/data
```


## Run on 2*2 device mesh

Current configuration setting on `config.py` is TP=2, PP=2.

```bash
27
# train with cifar10
28
colossalai run --nproc_per_node 4 train.py --config config.py
29
30

# train with synthetic data
31
colossalai run --nproc_per_node 4 train.py --config config.py -s
32
```