[example] add train resnet/vit with booster example (#3694)

* [example] add train vit with booster example

* [example] update readme

* [example] add train resnet with booster example

* [example] enable ci

* [example] enable ci

* [example] add requirements

* [hotfix] fix analyzer init

* [example] update requirements
This commit is contained in:
Hongxin Liu
2023-05-08 10:42:30 +08:00
committed by GitHub
parent 2629f9717d
commit f83ea813f5
17 changed files with 578 additions and 174 deletions

View File

@@ -10,6 +10,12 @@ This example provides a training script, which provides an example of finetuning
- `--target_f1`: Target f1 score. Raise exception if not reached. Defaults to `None`.
### Install requirements
```bash
pip install -r requirements.txt
```
### Train
```bash

View File

@@ -0,0 +1,7 @@
colossalai
datasets
torch
tqdm
transformers
scipy
scikit-learn

View File

@@ -1,6 +1,8 @@
#!/bin/bash
set -xe
pip install -r requirements.txt
for plugin in "torch_ddp" "torch_ddp_fp16" "gemini" "low_level_zero"; do
torchrun --standalone --nproc_per_node 4 finetune.py --target_f1 0.86 --plugin $plugin
done