Skip to content

[v5] 按剩余批次限制末尾 rollout 预取 - #396

Merged
tastelikefeet merged 1 commit into
dev-swift-v5from
fix/streaming-tail-prefetch
Nov 18, 2026
Merged

tastelikefeet merged 1 commit into
dev-swift-v5from
fix/streaming-tail-prefetch

Conversation

@qychen2001

Copy link
Copy Markdown
Collaborator

PR type

  • Bug Fix
  • New Feature
  • Document Updates
  • More Models or Datasets Support

PR information

现有版本窗口会在倒数第二步同步后继续放行新组,即使就绪组和在途组已经足够填满末批。Twinkle 现在用已有的 max_steps 限制新组准入。组内补采保留名额,整组丢弃后释放名额。

Experiment results

同一配置的 Swift 5 步对照,使用 8 张 PPU,两组均关闭 micro-batch 排序。实验版开启时使用与本 PR 相同的准入规则。

指标 原准入规则 加入剩余批次上限
准入轨迹 / 训练样本 384 / 320 320 / 320
实际生成 response tokens 1,116,902 952,382
第 5 步等批 110.70 s 115.17 s
第 5 步总耗时 130.08 s 137.22 s
5 步训练循环耗时 510.03 s 516.99 s
5 步训练样本吞吐 0.627 样本/s 0.619 样本/s
5 步训练 token 吞吐(含 prompt) 1,842 token/s 1,946 token/s

末批所选轨迹发生变化。加入上限后第 5 步训练的 response tokens 从 137,569 增至 194,154。

Co-authored-by: Codex <codex@openai.com>
@tastelikefeet
tastelikefeet merged commit 96fc65b into dev-swift-v5 Nov 18, 2026
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants