Skip to content

Commit

Permalink
updated docs and reorg dirs
Browse files Browse the repository at this point in the history
Signed-off-by: ftgreat <[email protected]>
  • Loading branch information
ftgreat committed Jun 8, 2023
1 parent a224efe commit f7256aa
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 17 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@
--------------------------------------------------------------------------------


FlagAI (Fast LArge-scale General AI models) is a fast, easy-to-use and extensible toolkit for large-scale model. Our goal is to support training, fine-tuning, and deployment of large-scale models on various downstream tasks with multi-modality.
FlagAI (Fast LArge-scale General AI models) is a fast, easy-to-use and extensible toolkit for large-scale model. Our goal is to support training, fine-tuning, and deployment of large-scale models on various downstream tasks with multi-modality.

<p align="center">
Platforms supported
</p>

****
Tianshu Nvidia
****

## Why should I use FlagAI?

Expand Down
6 changes: 6 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
**FlagAI飞智**是一个快速、易于使用和可扩展的大模型工具包。 我们的目标是支持在多模态的各种下游任务上训练、微调和部署大规模模型。
<br><br>

<p align="center">
已支持平台
</p>

****
天数智芯 Nvidia
****

## 为什么你需要 FlagAI?

Expand Down
12 changes: 9 additions & 3 deletions examples/aquila/aquila-code/README_AquilaCode-7B-nv.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ with torch.no_grad():
```

### 可监督微调/Supervised Fine-tuning(SFT)
#### Step 1: 配置模型
#### Step 1: 配置模型/ Setup Checkpoints
`./checkpoints_in`里新建`aquila-7b`目录。将微调后的checkpoint,以及原始`aquila-7b`模型里的其余文件,包括`config.json`, `mergex.txt`, `vocab.json`, `special_tokens_map.json`放进去

Create a new directory named `aquila-7b` inside `./checkpoints_in`. Place the fine-tuned checkpoint and all other files from the original `aquila-7b` model, including `config.json`, `mergex.txt`, `vocab.json`, and `special_tokens_map.json`, into this directory.

#### Step 2: 修改参数
#### Step 2: 修改参数/Modify Parameters
* `cd /examples/aquila`
* 配置`hostfile`文件, 参考[这里](../../../doc_zh/TUTORIAL_8_ENVIRONMENT_SETUP.md#a配置hostfilehostfile-中的v100-1-与sshconfig-对应) ; Configure the `hostfile` file, refer to [here](../../../docs/TUTORIAL_8_ENVIRONMENT_SETUP.md)
* 配置`bmtrain_mgpu.sh`文件, 将`SCRIPT_FILE`改成`aquila_sft_code.py`; configure the `bmtrain_mgpu.sh` file, change `SCRIPT_FILE` to `aquila_sft_code.py`
Expand All @@ -142,11 +142,17 @@ Create a new directory named `aquila-7b` inside `./checkpoints_in`. Place the fi
| enable_sft_dataset_dir | str | 可监督微调的数据集目录; Dataset directory of SFT dataset |
| enable_sft_dataset_file | str | 可监督微调的数据集文件名; Filename of SFT dataset | |

#### Step 3: 启动微调
#### Step 3: 启动可监督微调/Start SFT
```
bash dist_trigger_docker.sh hostfile aquila-sft.yaml aquila-7b [实验名]
```
接下来会输出下列信息,注意`NODES_NUM`应该与节点数相等,`LOGFILE`是模型运行的日志文件;The following information will be output. Note that `NODES_NUM` should be equal to the number of nodes, and `LOGFILE` is the log file for the model run.

![Screenshot](../img/info.jpg)

成功训练之前能看到如下信息(具体参数可能不同); Before successful training, you may see the following information with parameters that may differ:

![Screenshot](../img/info2.jpg)

## 证书/License

Expand Down
12 changes: 9 additions & 3 deletions examples/aquila/aquila-code/README_AquilaCode-7B-ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ with torch.no_grad():
```

### 可监督微调/Supervised Fine-tuning(SFT)
#### Step 1: 配置模型
#### Step 1: 配置模型/ Setup Checkpoints
`./checkpoints_in`里新建`aquila-7b`目录。将微调后的checkpoint,以及原始`aquila-7b`模型里的其余文件,包括`config.json`, `mergex.txt`, `vocab.json`, `special_tokens_map.json`放进去

Create a new directory named `aquila-7b` inside `./checkpoints_in`. Place the fine-tuned checkpoint and all other files from the original `aquila-7b` model, including `config.json`, `mergex.txt`, `vocab.json`, and `special_tokens_map.json`, into this directory.

#### Step 2: 修改参数
#### Step 2: 修改参数/Modify Parameters
* `cd /examples/aquila`
* 配置`hostfile`文件, 参考[这里](../../../doc_zh/TUTORIAL_8_ENVIRONMENT_SETUP.md#a配置hostfilehostfile-中的v100-1-与sshconfig-对应) ; Configure the `hostfile` file, refer to [here](../../../docs/TUTORIAL_8_ENVIRONMENT_SETUP.md)
* 配置`bmtrain_mgpu.sh`文件, 将`SCRIPT_FILE`改成`aquila_sft_code.py`; configure the `bmtrain_mgpu.sh` file, change `SCRIPT_FILE` to `aquila_sft_code.py`
Expand All @@ -117,11 +117,17 @@ Create a new directory named `aquila-7b` inside `./checkpoints_in`. Place the fi
| enable_sft_dataset_file | str | 可监督微调的数据集文件名; Filename of SFT dataset | |


#### Step 3: 启动微调
#### Step 3: 启动可监督微调/Start SFT
```
bash dist_trigger_docker.sh hostfile aquila-sft.yaml aquila-7b [实验名]
```
接下来会输出下列信息,注意`NODES_NUM`应该与节点数相等,`LOGFILE`是模型运行的日志文件;The following information will be output. Note that `NODES_NUM` should be equal to the number of nodes, and `LOGFILE` is the log file for the model run.

![Screenshot](../img/info.jpg)

成功训练之前能看到如下信息(具体参数可能不同); Before successful training, you may see the following information with parameters that may differ:

![Screenshot](../img/info2.jpg)

## 证书/License

Expand Down
14 changes: 12 additions & 2 deletions examples/aquila/aquila-pretrain/README_Aquila-33B.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,13 @@ We used a series of high-quality Chinese and English datasets to train and fine-
```
bash dist_trigger_docker.sh hostfile aquila-pretrain.yaml aquila-30b [实验名]
```

接下来会输出下列信息,注意`NODES_NUM`应该与节点数相等,`LOGFILE`是模型运行的日志文件;The following information will be output. Note that `NODES_NUM` should be equal to the number of nodes, and `LOGFILE` is the log file for the model run.

![Screenshot](../img/info.jpg)

成功训练之前能看到如下信息(具体参数可能不同); Before successful training, you may see the following information with parameters that may differ:

![Screenshot](../img/info2.jpg)

### 可监督微调/Supervised Fine-tuning(SFT)
#### Step 1: 修改参数
Expand All @@ -90,10 +96,14 @@ bash dist_trigger_docker.sh hostfile aquila-pretrain.yaml aquila-30b [实验名]

#### Step 2: 启动微调
```
bash dist_trigger_docker.sh hostfile aquila-sft.yaml aquila-30b [实验名]
bash dist_trigger_docker.sh hostfile aquila-sft.yaml aquila-7b [实验名]
```
接下来会输出下列信息,注意`NODES_NUM`应该与节点数相等,`LOGFILE`是模型运行的日志文件;The following information will be output. Note that `NODES_NUM` should be equal to the number of nodes, and `LOGFILE` is the log file for the model run.
![Screenshot](../img/info.jpg)

成功训练之前能看到如下信息(具体参数可能不同); Before successful training, you may see the following information with parameters that may differ:

![Screenshot](../img/info2.jpg)
### 推理/Inference

```python
Expand Down
21 changes: 16 additions & 5 deletions examples/aquila/aquila-pretrain/README_Aquila-7B.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,16 @@ The Aquila-7B model was pretrained on Pile,[RedPajama-Data-1T](https://hugging
```
bash dist_trigger_docker.sh hostfile aquila-pretrain.yaml aquila-7b [实验名]
```

接下来会输出下列信息,注意`NODES_NUM`应该与节点数相等,`LOGFILE`是模型运行的日志文件;The following information will be output. Note that `NODES_NUM` should be equal to the number of nodes, and `LOGFILE` is the log file for the model run.

![Screenshot](../img/info.jpg)

成功训练之前能看到如下信息(具体参数可能不同); Before successful training, you may see the following information with parameters that may differ:

![Screenshot](../img/info2.jpg)

### 可监督微调/Supervised Fine-tuning(SFT)
#### Step 1: 修改参数
#### Step 1: 修改参数/Modify Parameters
* `cd /examples/aquila`
* 配置`hostfile`文件, 参考[这里](../../../doc_zh/TUTORIAL_8_ENVIRONMENT_SETUP.md#a配置hostfilehostfile-中的v100-1-与sshconfig-对应) ; Configure the `hostfile` file, refer to [here](../../../docs/TUTORIAL_8_ENVIRONMENT_SETUP.md)
* 配置`bmtrain_mgpu.sh`文件, 将`SCRIPT_FILE`改成`aquila_pretrain.py`; configure the `bmtrain_mgpu.sh` file, change `SCRIPT_FILE` to `aquila_pretrain.py`
Expand All @@ -85,12 +91,17 @@ bash dist_trigger_docker.sh hostfile aquila-pretrain.yaml aquila-7b [实验名]
| warm_up | float | 初始学习率与原始学习率的比例; The ratio between the initial learning rate and the original learning rate
| save_interval | int | 模型保存的间隔,即每训练多少个iteration保存一次模型。当训练时间较长时,保存间隔可以避免因突然中断或出现错误导致训练成果全部丢失; The interval at which the model is saved, i.e., how often the model is saved per epoch during training. When training takes a long time, saving intervals can prevent all training achievements from being lost due to sudden interruptions or errors. |

#### Step 2: 启动微调
#### Step 2: 启动可监督微调/Start SFT
```
bash dist_trigger_docker.sh hostfile aquila-sft.yaml aquila-7b [实验名]
```
接下来会输出下列信息,注意NODES_NUM应该与节点数相等,LOGFILE是模型运行的日志文件
![Screenshot](img/info.jpg)
接下来会输出下列信息,注意`NODES_NUM`应该与节点数相等,`LOGFILE`是模型运行的日志文件;The following information will be output. Note that `NODES_NUM` should be equal to the number of nodes, and `LOGFILE` is the log file for the model run.

![Screenshot](../img/info.jpg)

成功训练之前能看到如下信息(具体参数可能不同); Before successful training, you may see the following information with parameters that may differ:

![Screenshot](../img/info2.jpg)

### 推理/Inference

Expand Down
12 changes: 9 additions & 3 deletions examples/aquila/aquila-sft/README_AquilaChat-7B.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ with torch.no_grad():
```

### 可监督微调/Supervised Fine-tuning(SFT)
#### Step 1: 配置模型
#### Step 1: 配置模型/ Setup Checkpoints
`./checkpoints_in`里新建`aquila-7b`目录。将微调后的checkpoint,以及原始`aquila-7b`模型里的其余文件,包括`config.json`, `mergex.txt`, `vocab.json`, `special_tokens_map.json`放进去

Create a new directory named `aquila-7b` inside `./checkpoints_in`. Place the fine-tuned checkpoint and all other files from the original `aquila-7b` model, including `config.json`, `mergex.txt`, `vocab.json`, and `special_tokens_map.json`, into this directory.

#### Step 2: 修改参数
#### Step 2: 修改参数/ Modify Parameters
* `cd /examples/aquila`
* 配置`hostfile`文件, 参考[这里](../../../doc_zh/TUTORIAL_8_ENVIRONMENT_SETUP.md#a配置hostfilehostfile-中的v100-1-与sshconfig-对应) ; Configure the `hostfile` file, refer to [here](../../../docs/TUTORIAL_8_ENVIRONMENT_SETUP.md)
* 配置`bmtrain_mgpu.sh`文件, 将`SCRIPT_FILE`改成`aquila_sft.py`; configure the `bmtrain_mgpu.sh` file, change `SCRIPT_FILE` to `aquila_sft.py`
Expand All @@ -197,11 +197,17 @@ Create a new directory named `aquila-7b` inside `./checkpoints_in`. Place the fi



#### Step 3: 启动微调
#### Step 3: 启动可监督微调/Start SFT
```
bash dist_trigger_docker.sh hostfile aquila-sft.yaml aquila-7b [实验名]
```
接下来会输出下列信息,注意`NODES_NUM`应该与节点数相等,`LOGFILE`是模型运行的日志文件;The following information will be output. Note that `NODES_NUM` should be equal to the number of nodes, and `LOGFILE` is the log file for the model run.

![Screenshot](../img/info.jpg)

成功训练之前能看到如下信息(具体参数可能不同); Before successful training, you may see the following information with parameters that may differ:

![Screenshot](../img/info2.jpg)


## 证书/License
Expand Down

0 comments on commit f7256aa

Please sign in to comment.