RL
RL copied to clipboard
test(xtoken): add nightly with heterogeneous TP/CP parallel plan for cross-tokenizer distillation
Summary
Deferred from PR #2508 (feat(xtoken): cross-tokenizer off-policy distillation). That PR only supports TP=1, CP=1, which is already covered by an existing functional test — so adding a nightly there would catch few accuracy regressions while making the nightly suite heavier. Per agreement in #2508 (https://github.com/NVIDIA-NeMo/RL/pull/2508#issuecomment-4619064049) (@yuki-97 / @RayenTian / @avenkateshha), the meaningful nightly — one exercising a heterogeneous teacher/student TP/CP parallel plan — is tracked here and will land in the TP/CP-support PR.
Background
- xtoken cross-tokenizer off-policy distillation is being added in #2508 (TP=1/CP=1 only).
- TP/CP-sharded logits + per-rank teacher IPC export are being added on branch ruit/xtoken-tp-cp-l1b (the follow-up). That path is where heterogeneous TP/CP (teacher TP/CP ≠ student TP/CP, possibly different DP degrees) becomes testable.
- A TP=1/CP=1 nightly cannot regress the sharding/reduction logic that the follow-up introduces; a heterogeneous-parallel nightly can.
Scope / Acceptance criteria
Add a nightly test following the conventions in .claude/skills/testing / skills:
- [ ] Recipe YAML under examples/configs/recipes/llm/ exercising a heterogeneous TP/CP plan (e.g. teacher TP2/CP1 → student TP1/CP1, or a TP×CP combo that triggers cross-tokenizer logit sharding + reduction).
- [ ] Driver script under tests/test_suites/llm/ with the matching base name + .sh, sourcing common.env and invoking the
xtoken distillation entrypoint via uv run ... --config
. - [ ] Register the driver path in tests/test_suites/nightly.txt, under the existing # Distillation section.
- [ ] Keep it lightweight (short run, in the spirit of the existing distillation-qwen3-32b-to-1.7b-base-1n8g-megatron-tp2pp2cp2-pack.sh), so as not to bloat the nightly.
References
- PR: #2508
- Deferral agreement: https://github.com/NVIDIA-NeMo/RL/pull/2508#issuecomment-4619064049
- Follow-up branch: ruit/xtoken-tp-cp-l1b
- Related known student-TP2 loss normalization finding (verify before relying on TP2 in the recipe)