Open
Description
[AMD][LoRA] AMD LoRA RL support tracker
Bugs hit while bringing LoRA RL up on AMD. Each PR is self-contained — reproduction against main and an explanation of the fix live in its own description.
The AMD enablement itself is already merged upstream: SGLang #34702 and #36379 make the MoE-LoRA align kernel JIT-compile under HIP, and Megatron-Bridge #28 supplies the ROCm Transformer Engine grouped-linear contract fields per-expert MoE LoRA needs.
Checkpoint and resume
- #2669 — every DP/CP replica writes its own adapter shard and the filename is keyed on the global rank, so resuming at a different world size silently leaves some ranks on a fresh adapter. Writes one shard per realized
(TP, PP, EP, ETP)coordinate instead. - #2516 — the distributed optimizer's fp32 masters and Adam moments are never checkpointed, so a resumed run either steps straight into NaN or has the restored adapter overwritten on its first step. Saves and restores the parameter state, and refreshes the masters on every path that writes adapter weights.
- #2733 — the native loader reports success for a shard that matches no parameter, is missing tensors, or holds NaN. Validates before the weight copy, and rejects virtual pipeline chunks, whose colliding parameter names the name-keyed shard format cannot represent.
- #2580 — the exported PEFT adapter carries none of the
base_model.model.prefixes PEFT matches on, so external loaders silently get an identity adapter. Delegates serialization to Megatron-Bridge and promotes the staged export weights-first. - #2661 — a run relaunched with
--lora-adapter-pathrestarts at rollout 0, re-steps the LR schedule and never finds the dataset cursor, because the LoRA save path writes nolatest_checkpointed_iteration.txtand the bridge branch repoints--load. Treats a standarditer_*/adapterpath as a resume; anything else stays an explicit warm start. - #3102 —
RolloutDataSource.save(rollout_id)writes the live cursor, which in async training already belongs to a later rollout, so resuming skips samples. Snapshots the cursor after each generate and saves the one matchingrollout_id.
Recipe
- #2784 — MI350X/MI355X Qwen3-30B-A3B MoE LoRA launcher, run at its defaults for 30 rollouts on both expert-adapter layouts.
Dependencies
- SGLang #36408 — stops rebuilding the MoE align JIT module on every miss. Needed by the shared-outer half of [AMD][LoRA] Add a Qwen3-30B-A3B MoE LoRA launcher #2784.
- Megatron-Bridge #33 — exports shared-outer MoE LoRA adapters as packed 3D tensors. Needed by the shared-outer half of [AMD][LoRA] Add a Qwen3-30B-A3B MoE LoRA launcher #2784.
Metadata
Metadata
Assignees
Labels
No labels
Activity