Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/en/get_started/experiment-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,11 @@ Add a held-out dataset before a long run. A synchronous example after downloadin
The fully async queue does not implement evaluation itself; schedule a separate supported evaluation path or job. See [evaluation configuration](usage.md) and the [fully async guide](../_examples_synced/fully_async/README.md).

If output is wrong, use [debug and replay](../developer_guide/debug.md). If an otherwise correct run is slow, use [trace](../developer_guide/trace.md), [profiling](../developer_guide/profiling.md), and [observability](../advanced/observability.md) to identify the next change. The homepage's expandable advanced sections follow the same diagnostic order.

### Reading a near-zero policy loss

`train/pg_loss` is the reduced policy-gradient objective. `train/loss` also includes the coefficient-weighted entropy bonus and, when enabled, the KL loss against the reference policy.

With the default PPO-style objective and no mismatch correction, consider two one-token responses with advantages `+0.5` and `-0.5`. If the new and old token probabilities match, the two loss contributions are `-0.5` and `+0.5`. Their mean is zero, while the gradients with respect to the two log probability ratios are `-0.25` and `+0.25`.

When the logged loss is near zero, check `train/grad_norm`, the spread of rewards across responses to the same prompt, and the held-out evaluation reward to assess whether the training run is learning.
8 changes: 8 additions & 0 deletions docs/zh/get_started/experiment-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,11 @@ bash experiment.sh train
Fully async 队列本身不实现 evaluation,应安排独立的受支持评估路径或任务。见[评估配置](usage.md)和 [fully async 指南](../_examples_synced/fully_async/README.md)。

输出异常时用 [Debug 与重放](../developer_guide/debug.md);结果正确但运行缓慢时,用 [Trace](../developer_guide/trace.md)、[Profiling](../developer_guide/profiling.md)和[观测指标](../advanced/observability.md)决定下一步。首页展开式 Advanced 区域遵循相同的排查顺序。

### 如何理解接近零的策略损失

`train/pg_loss` 是聚合后的策略梯度目标。`train/loss` 还包含按系数加权的熵奖励,以及启用时相对于参考策略的 KL 损失。

以默认的 PPO 风格目标为例,关闭训推差异校正后,假设两个单 token 回复的优势值分别是 `+0.5` 和 `-0.5`。当新旧策略给对应 token 的概率相等时,两项损失分别是 `-0.5` 和 `+0.5`。它们的均值为零,对各自对数概率比的梯度仍分别为 `-0.25` 和 `+0.25`。

日志中的损失接近零时,可以结合 `train/grad_norm`、同一 prompt 下不同回复的奖励差异,以及独立验证集的奖励来判断训练效果。
Loading