Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

GSPO sequence-parallel (SDP/SP) paths are untested (loss + metrics)

未关闭
#556 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
distributed-systems, python
领域
testing-qa

调研方向

Start in fast_llm/layers/language_model/loss/policy_gradient.py, where fused_gspo_loss_forward_backward and compute_gspo_metrics all-reduce over sdp_group and sp_group. Then read _run_lm_loss_distributed and _test_gspo_metrics in tests/layers/test_lm_losses.py, which only exercise the vocab-parallel group. Done means a sequence-split test path that checks the reduced segment aggregates against a single-rank reference, plus a gspo loss subtest.

由索引模型根据 Issue 内容生成。

描述

Claude Opus 4.8 note: surfaced during review of #555.

Both the GSPO loss kernel (fused_gspo_loss_forward_backward) and the GSPO diagnostic metrics (compute_gspo_metrics) in fast_llm/layers/language_model/loss/policy_gradient.py all-reduce their per-segment buffers over the sequence-data-parallel (sdp_group) and sequence-parallel (sp_group) groups, to reconstruct per-document/segment aggregates when the sequence is split across those ranks.

Gap: the distributed test harness (_run_lm_loss_distributed / _test_gspo_metrics in tests/layers/test_lm_losses.py) only ever drives the vocab-parallel group (it splits the vocab dimension). sdp_group/sp_group stay at their None defaults, so those all_reduce branches never execute under test. There is also no gspo loss subtest in _run_lm_loss_distributed at all — only grpo, grpo_metrics, and gspo_metrics.

Why it needs its own effort: exercising the SDP/SP reduction requires a sequence-split test path (partition tokens/documents across ranks along the sequence dimension, then verify the reduced segment aggregates match a single-rank reference), which is beyond the current 2-rank vocab-split harness.

Single-rank and vocab-parallel paths are tested and verified; this issue tracks the remaining SDP/SP coverage for both the GSPO loss and its metrics.

主要语言
Python
星标
337
派生
52
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ServiceNow/Fast-LLM 的其他 Issue

查看 ServiceNow/Fast-LLM 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。