Skip to content

Commit 295d6b8

Browse files
committed
docs: explain optimizer backend controls
1 parent c949a1b commit 295d6b8

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎docs/sphinx_doc/source/tutorial/trinity_configs.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ algorithm:
102102
optimizer:
103103
lr: 1e-6
104104
lr_scheduler_type: "constant"
105+
fused: true
106+
foreach: false
105107
# The following parameters are optional
106108
# If not specified, they will automatically be set based on the `algorithm_type`
107109
sample_strategy: "default"
@@ -117,6 +119,8 @@ algorithm:
117119
- `lr`: Learning rate for actor.
118120
- `warmup_style`: Deprecated, use `lr_scheduler_type` instead. We will remove this field in future versions.
119121
- `lr_scheduler_type`: Learning rate scheduler type for actor model. Default is `constant`. Supported types: `constant`, `cosine`.
122+
- `fused`: Optional PyTorch optimizer setting for FSDP/FSDP2 trainers. When unset, the backend default is used. This setting is ignored by Megatron trainers.
123+
- `foreach`: Optional PyTorch optimizer setting for FSDP/FSDP2 trainers. When unset, the backend default is used. This setting is ignored by Megatron trainers.
120124
- `sample_strategy`: The sampling strategy used for loading experiences from experience buffer. Supported types: `default`, `staleness_control`, `mix`.
121125
- `advantage_fn`: The advantage function used for computing advantages.
122126
- `kl_penalty_fn`: The KL penalty function used for computing KL penalty applied in reward.

‎docs/sphinx_doc/source_zh/tutorial/trinity_configs.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ algorithm:
102102
optimizer:
103103
lr: 1e-6
104104
lr_scheduler_type: constant
105+
fused: true
106+
foreach: false
105107
# 以下参数为可选
106108
# 若未指定,将根据 `algorithm_type` 自动设置
107109
sample_strategy: "default"
@@ -117,6 +119,8 @@ algorithm:
117119
- `lr`: 优化器的学习率。
118120
- `warmup_style`:已弃用,请改用 `lr_scheduler_type`。该域将会在未来版本中移除。
119121
- `lr_scheduler_type`:Actor 模型的学习率调度器类型。默认值为 `constant`。支持类型:`constant`、`cosine`。
122+
- `fused`:FSDP/FSDP2 trainer 的可选 PyTorch 优化器设置。未设置时使用后端默认值;Megatron trainer 会忽略该设置。
123+
- `foreach`:FSDP/FSDP2 trainer 的可选 PyTorch 优化器设置。未设置时使用后端默认值;Megatron trainer 会忽略该设置。
120124
- `sample_strategy`: 从 experience buffer 加载 experience 时使用的采样策略。支持类型:`default`、`staleness_control`、`mix`。
121125
- `advantage_fn`: 用于计算优势值的函数。
122126
- `kl_penalty_fn`: 用于在奖励中计算 KL 惩罚的函数。

0 commit comments

Comments
 (0)