Add examples for frozenlake and emailsearch (#94)
This commit is contained in:
@@ -248,10 +248,10 @@ if __name__ == "__main__":
|
||||
Here, we use `DatasetConfig` to load the training dataset, `TunerModelConfig` to initialize the trainable model, and `AlgorithmConfig` to specify the RL algorithm and its hyperparameters.
|
||||
|
||||
> Note:
|
||||
> The `tune` function is based on [Trinity-RFT](https://github.com/modelscope/Trinity-RFT) and it converts the input parameters into a YAML configuration internally.
|
||||
> The `tune` function is based on [Trinity-RFT](https://github.com/agentscope-ai/Trinity-RFT) and it converts the input parameters into a YAML configuration internally.
|
||||
> Advanced users can ignore `model`, `train_dataset`, `algorithm` arguments and provide a configuration file path pointing to a YAML file using the `config_path` argument instead (see [config.yaml](./config.yaml) for an example).
|
||||
> We recommend using the configuration file approach for fine-grained control over the training process and leveraging advanced features provided by Trinity-RFT.
|
||||
> You can refer to the Trinity-RFT [Configuration Guide](https://modelscope.github.io/Trinity-RFT/en/main/tutorial/trinity_configs.html) for more details on configuration options.
|
||||
> You can refer to the Trinity-RFT [Configuration Guide](https://agentscope-ai.github.io/Trinity-RFT/en/main/tutorial/trinity_configs.html) for more details on configuration options.
|
||||
|
||||
The checkpoint and logs will automatically be saved to the `checkpoints/AgentScope` directory under the current working directory and each run will be saved in a sub-directory suffixed with the current timestamp.
|
||||
You can find the tensorboard logs inside `monitor/tensorboard` of the checkpoint directory.
|
||||
@@ -342,7 +342,7 @@ After implementing the workflow function, follow these steps to run the training
|
||||
|
||||
- At least 2 NVIDIA GPUs with CUDA 12.8 or newer.
|
||||
- Adjust the configuration file ([config.yaml](./config.yaml)) based on your hardware.
|
||||
- Follow the Trinity-RFT [installation guide](https://modelscope.github.io/Trinity-RFT/en/main/tutorial/trinity_installation.html) to install the latest version from source code.
|
||||
- Follow the Trinity-RFT [installation guide](https://agentscope-ai.github.io/Trinity-RFT/en/main/tutorial/trinity_installation.html) to install the latest version from source code.
|
||||
- Download the GSM8K dataset and Qwen/Qwen3-0.6B model checkpoints (example):
|
||||
|
||||
```bash
|
||||
|
||||
@@ -245,10 +245,10 @@ if __name__ == "__main__":
|
||||
这里用 `DatasetConfig` 加载训练数据集,`TunerModelConfig` 初始化可训练模型,`AlgorithmConfig` 指定 RL 算法及其超参数。
|
||||
|
||||
> 注意:
|
||||
> `tune` 函数基于 [Trinity-RFT](https://github.com/modelscope/Trinity-RFT) 实现,会将输入参数自动转为 YAML 配置。
|
||||
> `tune` 函数基于 [Trinity-RFT](https://github.com/agentscope-ai/Trinity-RFT) 实现,会将输入参数自动转为 YAML 配置。
|
||||
> 高级用户可忽略 `model`、`train_dataset`、`algorithm` 参数,直接用 `config_path` 指定 YAML 配置文件(见 [config.yaml](./config.yaml) 示例)。
|
||||
> 推荐用配置文件方式实现更细粒度的训练控制,充分利用 Trinity-RFT 的高级特性。
|
||||
> 详细配置说明见 Trinity-RFT [配置指南](https://modelscope.github.io/Trinity-RFT/zh/main/tutorial/trinity_configs.html)。
|
||||
> 详细配置说明见 Trinity-RFT [配置指南](https://agentscope-ai.github.io/Trinity-RFT/zh/main/tutorial/trinity_configs.html)。
|
||||
|
||||
训练产生的 checkpoint 和日志信息会自动保存在当前目录下的 `checkpoints/AgentScope` 中,每次运行会新建带时间戳的子目录。
|
||||
TensorBoard 日志在 checkpoint 目录下的 `monitor/tensorboard` 中。
|
||||
@@ -335,7 +335,7 @@ if __name__ == "__main__":
|
||||
|
||||
- 至少 2 块 NVIDIA GPU,CUDA 12.8 或更高。
|
||||
- 根据硬件调整配置文件([config.yaml](./config.yaml))。
|
||||
- 按 Trinity-RFT [安装指南](https://modelscope.github.io/Trinity-RFT/zh/main/tutorial/trinity_installation.html) 从源码安装最新版。
|
||||
- 按 Trinity-RFT [安装指南](https://agentscope-ai.github.io/Trinity-RFT/zh/main/tutorial/trinity_installation.html) 从源码安装最新版。
|
||||
- 下载 GSM8K 数据集和 Qwen/Qwen3-0.6B 模型权重(示例):
|
||||
|
||||
```bash
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Please refer to https://modelscope.github.io/Trinity-RFT/en/main/tutorial/trinity_configs.html for detailed explanation of each field.
|
||||
# Please refer to https://agentscope-ai.github.io/Trinity-RFT/en/main/tutorial/trinity_configs.html for detailed explanation of each field.
|
||||
project: AgentScope
|
||||
name: GSM8K-Qwen3-0.6B
|
||||
# directory to save checkpoints, default to ./checkpoints if TRINITY_CHECKPOINT_ROOT_DIR not set
|
||||
|
||||
Reference in New Issue
Block a user