verl
verl copied to clipboard
[algo] feat: Add SVD-LoRA GRPO
What does this PR do?
This PR implements the experimental SVD-LoRA-GRPO method derived by paper ESSA: Evolutionary Strategies for Scalable Alignment
Checklist Before Starting
- [x] Search for similar PRs. Paste at least one query link here: ...
- [x] Format the PR title as
[{modules}] {type}: {description}(This will be checked by the CI){modules}includefsdp,megatron,sglang,vllm,rollout,trainer,ci,training_utils,recipe,hardware,deployment,ray,worker,single_controller,misc,perf,model,algo,env,tool,ckpt,doc,data- If this PR involves multiple modules, separate them with
,like[megatron, fsdp, doc] {type}is infeat,fix,refactor,chore,test- If this PR breaks any API (CLI arguments, config, function signature, etc.), add
[BREAKING]to the beginning of the title. - Example:
[BREAKING][fsdp, megatron] feat: dynamic batching
Test
For changes that can not be tested by CI (e.g., algorithm implementation, new model support), validate by experiment(s) and show results like training curve plots, evaluation results, etc.
API and Usage Example
Demonstrate how the API changes if any, and provide usage example(s) if possible.
# Add code snippet or script demonstrating how to use this
Design & Code Changes
Demonstrate the high-level design if this PR is complex, and list the specific changes.
Checklist Before Submitting
[!IMPORTANT] Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review.
- [x] Read the Contribute Guide.
- [x] Apply pre-commit checks:
pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [x] Add / Update the documentation.
- [x] Add unit or end-to-end test(s) to the CI workflow to cover all the code. If not feasible, explain why: ...
- [x] Once your PR is ready for CI, send a message in the
ci-requestchannel in theverlSlack workspace. (If not accessible, please try the Feishu group (飞书群).)
We’re implementing SVD-LoRA-GRPO on top of the existing SFT-LoRA adapter. Since #3523 is already in progress and touches the same components, we won’t push our implementation here to avoid conflicts. We’ll wait for #3523 to merge, then rebase and update this PR.
Example training run — Qwen2.5-7B on PRM800K with an SFT-LoRA adapter.
The SFT adapter was trained on a different (non-overlapping) PRM800K training subset.
Hyperparameters:
max_prompt_length = 512
max_response_length = 4096
train_batch_size = 512
lr = 0.01
n = 8
loss_agg_mode = "token-mean"
lora_rank = 16
lora_alpha = 32
target_modules = ["q_proj", "k_proj", "v_proj", "o_proj"]
ppo_mini_batch_size = 64
strategy = "fsdp2"
nnodes = 1
n_gpus_per_node = 8
Hi @eric-haibin-lin @zhaochenyang20 👋 Could you please take a look at my PR when you have a moment?
Hi @eric-haibin-lin @zhaochenyang20 👋
Just a heads-up that the remaining CI failure appears to be unrelated to this PR.
Thanks again for reviewing when you have a moment!
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
Малахов Алексей Павлович seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.