[Feature] Self-Distillation Policy Optimization (SDPO) for Megatron GRPO
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- ai, backend, machine-learning
調査の方向性
Start by reading the existing Megatron GRPO rollout, reward, advantage, and loss paths, then compare the proposed behavior with the linked SDPO paper and reference implementation. The request spans a fused Triton loss, EMA teacher checkpointing, reward feedback and generation APIs, backend handling, docs, an example, and tests. Done means those pieces work together with the listed parallelism modes and unsupported cases fail clearly.
索引モデルが issue の本文から書いたものです。
説明
Checklist / 检查清单
- I have searched existing issues, and this is a new feature request. / 我已经搜索过现有的 issues,确认这是一个新的 Feature Request。
Feature Request Description / Feature Request 描述
SDPO (Hübotter et al., 2026, "Reinforcement Learning via Self-Distillation") is a GRPO variant for tasks where the environment returns rich textual feedback (runtime errors, judge comments, ...) besides a scalar reward. The same policy, reprompted with a successful sibling rollout and/or the feedback of its own attempt, acts as its own teacher: its next-token distributions are distilled into the policy on the policy's own sampled responses. No external teacher or reward model is needed, and the advantage term is replaced by a distillation loss (generalized JSD over the student's top-K tokens plus a tail bucket). The authors' reference implementation (https://github.com/lasgroup/SDPO) is verl-based research code; this would be an independent implementation on the Megatron backend.
I would like to add it to the Megatron GRPO backend, reusing the existing GRPO rollout/reward/advantage code:
--loss_type sdpoformegatron rlhf --rlhf_type grpo, with a fused Triton LM-head loss (no full logits materialised), supporting DP / TP (sequence parallel, padding-free) / PP / EP and full fine-tuning; an EMA teacher that reuses the reference-model slot (fp32 master in host RAM, saved with checkpoints).- Reward functions may return
{'rewards': [...], 'feedback': [...]}(plain lists keep working for every GRPO variant). --reward_rollout_generator: reward functions receive a handle to generate text with the policy's own vLLM (colocated or server), e.g. to write the feedback.--sdpo_grpo_weight: the SDPO + GRPO mix of the paper (Section 4.5).- English and Chinese docs (translated using Claude Sonnet 5.5), an example plugin and script, unit tests.
The HF/transformers backend would raise a clear NotImplementedError for now; context parallel, LoRA with the EMA teacher and the trust-region teacher of the paper are not part of the first version.
Pull Request / Pull Request 信息
I plan to submit one pull request with the above (I will link this issue). It is developed with AI assistance and I reviewed every changed line myself.
- 主要言語
- Python
- スター
- 16.2k
- フォーク
- 1.8k
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 68
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelscope/ms-swift のほかの issue
-
get_multimodal_target_regex(..., exclude_router=True) does not exclude shared_expert_gate対応中かも @KonnyakuMatcha が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelscope/ms-swift#10696 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] GRPO REAL loss crashes with beta>0 and kl_in_reward=True (NoneType * Tensor)対応中かも @newcloud123 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
modelscope/ms-swift#10690 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] GRPO REAL loss divides by all groups instead of valid groups, silently scaling gradients対応中かも @newcloud123 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelscope/ms-swift#10688 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 半日 初心者へのやさしさ 62/100
modelscope/ms-swift#10621 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] `get_seed` consumes a draw from the shared RandomState even when decision augmentation is disabled, changing the train/val split and dataset shuffle対応中かも @ryznren が 38 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
modelscope/ms-swift#10466 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
modelscope/ms-swift の issue をすべて見る
似ている issue
-
Test: to_hijri() accepts datetime.datetime and uses only the date part対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンgood first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
omarelshamy25x/shamy-hijri#63 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
polish
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scores対応中かも @AshutoshSingh840 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
UKGovernmentBEIS/control-arena#992 ·
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
mvalentsev/awesome-free-ai-coding#70 ·
メンテナーはふだん 1 日以内に返信