docs: 修正文档错误并补充训练参数说明
- README: 补充训练参数速查表,完善训练命令示例 - design.md: 同步 inference 类图(SlotAllocator、GenerationParams、采样策略等 新增类),修正参数名和类型错误,统一泛型符号 - params.md: 修正默认值(batch_size=1、num_workers=4),移除不存在参数 (grpo_*、model_type、resume_dir),补充完整示例 - dataflow.md: _RadixNode 命名修正
This commit is contained in:
@@ -27,9 +27,6 @@
|
||||
|
||||
## 📖 Table of Contents
|
||||
|
||||
<details open>
|
||||
<summary><b>English</b></summary>
|
||||
|
||||
- [Features](#features)
|
||||
- [Quick Start](#quick-start)
|
||||
- [Documentation](#documentation)
|
||||
@@ -37,8 +34,6 @@
|
||||
- [Community](#community)
|
||||
- [License](#license)
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
<a id="english"></a>
|
||||
@@ -75,7 +70,14 @@ pip install -e ".[dev]"
|
||||
python scripts/tools/train.py \
|
||||
--train_type=seq \
|
||||
--data_root_path=/path/to/dataset \
|
||||
--param_path=/path/to/param_path
|
||||
--param_path=/path/to/model \
|
||||
--n_epoch=3 \
|
||||
--batch_size=4 \
|
||||
--accumulation_steps=8 \
|
||||
--max_lr=3e-4 \
|
||||
--warmup_steps=2000 \
|
||||
--ckpt_interval=5000 \
|
||||
--ckpt_dir=./checkpoints
|
||||
```
|
||||
|
||||
#### Generate Text
|
||||
@@ -84,6 +86,25 @@ python scripts/tools/train.py \
|
||||
python scripts/tools/generate.py --param_path=/path/to/param_path
|
||||
```
|
||||
|
||||
#### Training Parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|-----------|-------------|---------|
|
||||
| `--train_type` | Training type (`seq`, `sft`, `dpo`) | required |
|
||||
| `--data_root_path` | Dataset root directory | required |
|
||||
| `--param_path` | Model / checkpoint path | required |
|
||||
| `--n_epoch` | Training epochs | 1 |
|
||||
| `--batch_size` | Batch size | 1 |
|
||||
| `--accumulation_steps` | Gradient accumulation steps | 1 |
|
||||
| `--max_lr` | Peak learning rate (cosine decay) | 3e-4 |
|
||||
| `--warmup_steps` | LR warmup steps | 1000 |
|
||||
| `--ckpt_interval` | Checkpoint interval (iters) | 5000 |
|
||||
| `--ckpt_dir` | Checkpoint directory | checkpoint |
|
||||
| `--num_workers` | DataLoader workers | 4 |
|
||||
| `--nprocs` | Number of GPUs | 1 |
|
||||
|
||||
Full reference at [Parameter Guide](./assets/docs/params.md#training-parameters).
|
||||
|
||||
#### Docker
|
||||
|
||||
Build and run with Docker (recommended for GPU environments):
|
||||
|
||||
Reference in New Issue
Block a user