mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-08 04:24:47 +00:00
[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:
@@ -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
|
||||
|
7
examples/tutorial/new_api/glue_bert/requirements.txt
Normal file
7
examples/tutorial/new_api/glue_bert/requirements.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
colossalai
|
||||
datasets
|
||||
torch
|
||||
tqdm
|
||||
transformers
|
||||
scipy
|
||||
scikit-learn
|
@@ -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
|
||||
|
Reference in New Issue
Block a user