| [misc] feat: uv support aarch64 (#7627) ### What does this PR do? UV support aarch64 with the same image: verlai/verl:uv.cu130.dev1 ### Checklist Before Starting - [ ] Search for similar PRs. Paste at least one query link here: ... - [ ] Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI) - {modules} include fsdp, megatron, veomni, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward, fully_async, one_step_off - If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc] - {type} is in feat, 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. python # 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. - [ ] Read the [Contribute Guide](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [ ] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [ ] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). - [ ] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [ ] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [ ] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main. | 2 months ago |
| [misc] fix: use directory-symlink layout for shared skills (#6391) ### What does this PR do? Convert the shared agent skills from file-symlinks to directory-symlinks so that supporting files (e.g. references, helper scripts) added next to a skill flow to every framework without per-file plumbing. - Move canonical content from .agent/skills/<name>.md to .agent/skills/<name>/SKILL.md (skill-package layout). - Replace .claude/skills/<name>.md and .codex/skills/<name>.md file-level symlinks with directory symlinks .claude/skills/<name> and .codex/skills/<name> pointing at the canonical .agent skill directory. - Document the convention in docs/contributing/editing-agent-instructions.md so future skills follow this layout from the start. This is the structure Codex documents for skill discovery (it accepts symlinked skill folders and can skip file-level SKILL.md symlinks), and Claude Code today discovers a directory-symlinked skill the same way it would a vendored directory. Follow-up to #5846 (the original .agent/skills introduction). ### Checklist Before Starting - [x] Searched for similar PRs: - is:pr .agent/skills → https://github.com/verl-project/verl/pulls?q=is%3Apr+.agent%2Fskills (only #5846 / #5843 / #5844 / #6301; none change the file-vs-directory layout) - is:pr skills SKILL.md → https://github.com/verl-project/verl/pulls?q=is%3Apr+skills+SKILL.md (no results) - [x] Title formatted as [{modules}] {type}: {description}. ### Test - pre-commit run --all-files --show-diff-on-failure --color=always (locally on the new branch); all hooks pass. - Verified resulting symlink topology: - .claude/skills/issue -> ../../.agent/skills/issue and .codex/skills/issue -> ../../.agent/skills/issue, both resolving to a directory containing SKILL.md. - Same for pr. - Spot-checked that the canonical SKILL.md contents are unchanged (the moves are 100% similarity renames). ### Design & Code Changes - .agent/skills/issue.md → .agent/skills/issue/SKILL.md - .agent/skills/pr.md → .agent/skills/pr/SKILL.md - .claude/skills/issue.md (file symlink) → .claude/skills/issue (directory symlink) - .claude/skills/pr.md (file symlink) → .claude/skills/pr (directory symlink) - .codex/skills/issue.md (file symlink) → .codex/skills/issue (directory symlink) - .codex/skills/pr.md (file symlink) → .codex/skills/pr (directory symlink) - docs/contributing/editing-agent-instructions.md: document the canonical skill directory + variant directory-symlink convention, and bump Last updated. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [x] Pre-commit checks pass locally. - [x] Documentation updated (docs/contributing/editing-agent-instructions.md). - [ ] No code paths changed, so no new unit / e2e tests are added. Justification: this PR only restructures already-shipped skill files and their symlinks; behavior of any consuming agent runtime is unchanged. - [x] AI assistance was used (Cursor / Claude). I have reviewed every line end-to-end and am defending this change personally. Signed-off-by: Shawn/Yuxuan Tong <tongyuxuan361@gmail.com> | 6 months ago |
| [misc] fix: use directory-symlink layout for shared skills (#6391) ### What does this PR do? Convert the shared agent skills from file-symlinks to directory-symlinks so that supporting files (e.g. references, helper scripts) added next to a skill flow to every framework without per-file plumbing. - Move canonical content from .agent/skills/<name>.md to .agent/skills/<name>/SKILL.md (skill-package layout). - Replace .claude/skills/<name>.md and .codex/skills/<name>.md file-level symlinks with directory symlinks .claude/skills/<name> and .codex/skills/<name> pointing at the canonical .agent skill directory. - Document the convention in docs/contributing/editing-agent-instructions.md so future skills follow this layout from the start. This is the structure Codex documents for skill discovery (it accepts symlinked skill folders and can skip file-level SKILL.md symlinks), and Claude Code today discovers a directory-symlinked skill the same way it would a vendored directory. Follow-up to #5846 (the original .agent/skills introduction). ### Checklist Before Starting - [x] Searched for similar PRs: - is:pr .agent/skills → https://github.com/verl-project/verl/pulls?q=is%3Apr+.agent%2Fskills (only #5846 / #5843 / #5844 / #6301; none change the file-vs-directory layout) - is:pr skills SKILL.md → https://github.com/verl-project/verl/pulls?q=is%3Apr+skills+SKILL.md (no results) - [x] Title formatted as [{modules}] {type}: {description}. ### Test - pre-commit run --all-files --show-diff-on-failure --color=always (locally on the new branch); all hooks pass. - Verified resulting symlink topology: - .claude/skills/issue -> ../../.agent/skills/issue and .codex/skills/issue -> ../../.agent/skills/issue, both resolving to a directory containing SKILL.md. - Same for pr. - Spot-checked that the canonical SKILL.md contents are unchanged (the moves are 100% similarity renames). ### Design & Code Changes - .agent/skills/issue.md → .agent/skills/issue/SKILL.md - .agent/skills/pr.md → .agent/skills/pr/SKILL.md - .claude/skills/issue.md (file symlink) → .claude/skills/issue (directory symlink) - .claude/skills/pr.md (file symlink) → .claude/skills/pr (directory symlink) - .codex/skills/issue.md (file symlink) → .codex/skills/issue (directory symlink) - .codex/skills/pr.md (file symlink) → .codex/skills/pr (directory symlink) - docs/contributing/editing-agent-instructions.md: document the canonical skill directory + variant directory-symlink convention, and bump Last updated. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [x] Pre-commit checks pass locally. - [x] Documentation updated (docs/contributing/editing-agent-instructions.md). - [ ] No code paths changed, so no new unit / e2e tests are added. Justification: this PR only restructures already-shipped skill files and their symlinks; behavior of any consuming agent runtime is unchanged. - [x] AI assistance was used (Cursor / Claude). I have reviewed every line end-to-end and am defending this change personally. Signed-off-by: Shawn/Yuxuan Tong <tongyuxuan361@gmail.com> | 6 months ago |
| [ci] refactor: simplify Ascend pytest invocations (#8723) ### What does this PR do? Remove the Ascend pytest argument-isolation workaround introduced in #8336 and used by the fused-forward workflow. All five affected steps now invoke pytest directly instead of wrapping pytest.main([...]) in python -c. MegatronAdaptor's current 26.2.0_core_r0.18.0 branch now skips short options and their values and validates long-option field names. This was checked in [args_utils.py at 011b80f9a14c935d7a6d85b710f8b577f4704608](https://gitcode.com/ascend/MegatronAdaptor/blob/011b80f9a14c935d7a6d85b710f8b577f4704608/megatron_adaptor/utils/args_utils.py), the branch used by the current vLLM A3 Dockerfile. The running CI image still needs integration verification. - Simplify all four launchers in npu_unit_tests.yml: the general suite, profiling, NPU checkpoint, and CPU checkpoint steps. Keep every current test path, ignore glob, -k expression, and test flag. - Simplify the fused-forward step in model_ascend.yml. Use pytest's native -p verl preloading so Ascend patches still initialize before test modules import Megatron. - Remove obsolete argument-parser workaround comments. Preserve ModelOpt/PEFT pins, profiler fixtures, test order, environments, runners, and containers. Repository-wide searches found these five workflow wrappers. Remaining pytest.main() calls are normal Python test entry points, not this CLI isolation workaround, and remain unchanged. This PR is independent of the HCCL diagnostic work. ### Duplicate check Searched [open PRs referencing #8336](https://github.com/verl-project/verl/pulls?q=is%3Apr+is%3Aopen+8336+in%3Abody), [pytest + MegatronAdaptor](https://github.com/verl-project/verl/pulls?q=is%3Apr+is%3Aopen+pytest+MegatronAdaptor), and [pytest + simplify](https://github.com/verl-project/verl/pulls?q=is%3Apr+is%3Aopen+pytest+simplify). No open PR found for removing these wrappers; #8336 is merged. ### Validation Passed locally with Python 3.12 and pytest 8.4.2: - Parsed workflow YAML and checked each replacement with bash -n. - Captured actual Bash argument vectors and compared them with the old pytest.main() argument lists: all five match, with only the intentional -p verl preload added to fused-forward. All other parsed workflow settings are unchanged. - Confirmed no pytest.main() launchers remain in .github/workflows. - Executed MegatronAdaptor's actual parser_unknown_args function from the source revision above against all five new argument lists; no invalid field names are produced and short-option values are discarded. - Real pytest console-entry-point smoke checks with a lightweight stub verl module made importable through the fixture's PYTHONPATH: preloading happens before test-module imports, -s retains console output, multiprocessing spawn succeeds, and a deliberately failing test exits with status 1 and -x prevents the next test from running. - git diff --check passed. Commands: python ../validate_pytest_cli.py (local validation harness outside the submitted diff), git diff --check. No NPU hardware is available locally; the real MegatronAdaptor import/patch stack, installed container revision, and full NPU suites require **NPU unit tests** and **model_ascend** CI. Full-repository pre-commit and hardware test passes are not claimed. AI assistance (OpenAI Codex) was used for implementation and validation. Human review remains pending. | 5 days ago |
| [Megatron][BREAKING] Allow override of transformer config to enable custom megatron features like variable PP layers distribution, with CI tests (#1555) ### Checklist Before Starting - [ ] Search for similar PR(s). ### What does this PR do? Allow to override of transformer config to enable custom megatron features like variable PP layers distribution, with CI tests, which is in need for larger moe models with 94 layers (Qwen3 moe) or 61 layers (DeepSeek V3) We will first fix e2e_prime CI by use fused kernels. **Notice that now the imbalance PP layers distribution only compatible with dist_ckpt load and save, not support huggingface direct load/save.** Also, other megatron arguments can be passed through scripts. ### High-Level Design > Demonstrate the high-level design if this PR is complex. ### Specific Changes > List the specific changes. ### API Breaking APIs: py class MegatronWorker(Worker): def _init_hf_config_and_tf_config(self, model_path, dtype, override_model_config, override_transformer_config): # and the models building yaml actor: megatron: override_transformer_config: {} # common transformer config for all models To avoid trouble of input same transformer config arguments, other models will reuse actor's config, so just need to input once. ### Usage Example bash run_ppo_trainer_megatron.sh \ +actor_rollout_ref.actor.megatron.override_transformer_config.num_layers_in_first_pipeline_stage=13 \ +actor_rollout_ref.actor.megatron.override_transformer_config.num_layers_in_last_pipeline_stage=11 ### 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, evaluatuion results, etc. ### Additional Info. - **Issue Number**: Fixes issue # or discussion # if any. - **Training**: Megatron - **Inference**: [Note which backend this PR will affect: vLLM, SGLang, both, or none] ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide). - [x] Apply [pre-commit checks](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting). - [x] Add [BREAKING] to the PR title if it breaks any API. - [x] Update the documentation about your changes in the [docs](https://github.com/volcengine/verl/tree/main/docs). - [x] Add CI test(s) if neccessary. | 1 year ago |
| [ci, hardware] fix: set KMP_INIT_AT_FORK=TRUE on ROCm to stop dataloader fork deadlock (#8713) ### What does this PR do? Sets KMP_INIT_AT_FORK=TRUE for the ROCm e2e workflow and in docker/rocm/Dockerfile.rocm, to stop PPO training steps from hanging forever when the dataloader workers start. Details and stacks are in #8712. Short version of the cause: scikit-learn and joblib (imported via transformers) run os.environ.setdefault("KMP_INIT_AT_FORK", "FALSE"). The ROCm torch build uses LLVM OpenMP, which with that value does not reset its state after fork. TaskRunnerV1 has a multi-thread OpenMP pool and fork-starts the StatefulDataLoader workers; a worker can inherit a locked OpenMP mutex and block in torch.set_num_threads(1). The trainer waits for the worker's startup acknowledgement with no timeout, so the step sits until the 60-minute job timeout. This PR only covers the ROCm CI and the ROCm image. It does not change verl's Python code, so users who launch training outside this image still need to export the variable themselves; a default inside verl is proposed in #8712 and left for a separate PR. Not a duplicate: no open PR or issue mentions KMP_INIT_AT_FORK apart from #8712, which this PR addresses for CI. AI assistance (Claude Code) was used for the investigation and for this change. ### Checklist Before Starting - [x] Search for similar PRs. Paste at least one query link here: https://github.com/verl-project/verl/pulls?q=is%3Apr+KMP_INIT_AT_FORK , https://github.com/verl-project/verl/issues?q=KMP_INIT_AT_FORK - [x] Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI) - {modules} include fsdp, megatron, veomni, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward, fully_async, one_step_off - If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc] - {type} is in feat, 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 Run on the ROCm CI host (8x MI300, image verlai/verl:rocm7.14_torch2.12_release_1112, container pinned to 32 cores like CI), looping one of the CI steps that hangs: bash VAL_BEFORE_TRAIN=True TEST_FREQ=1 SAVE_FREQ=1 SAVE_HF_MODEL=True STRATEGY=fsdp2 \ bash tests/special_e2e/ppo_trainer/run_function_reward.sh \ "+actor_rollout_ref.rollout.engine_kwargs.vllm.disable_custom_all_reduce=True" | Variant | Runs | Hangs | |---|---|---| | unmodified | 20 | 3 | | KMP_INIT_AT_FORK=TRUE exported before launch | 15 | 0 | In the second group /proc/<pid>/environ of the TaskRunnerV1 process showed KMP_INIT_AT_FORK=TRUE. All three hangs had the same stack: a dataloader worker in torch.set_num_threads(1) -> __kmp_lock_suspend_mx -> pthread_mutex_lock. Not tested: the workflow change has not yet run in GitHub Actions (the runs above exported the variable in a shell, which is what the workflow env entry does), and the image has not been rebuilt from the changed Dockerfile. 15 runs without a hang is not proof at a hang rate of about 15%; the chance of that happening by luck is roughly 9%. ### API and Usage Example No API change. For anyone hitting the hang outside this image: bash export KMP_INIT_AT_FORK=TRUE # before starting python ### Design & Code Changes - .github/workflows/e2e_ppo_trainer_megatron_vllm_rocm.yml: add KMP_INIT_AT_FORK: "TRUE" to the workflow-level env, so it applies now, with the current image. - docker/rocm/Dockerfile.rocm: add ENV KMP_INIT_AT_FORK=TRUE, so the next image build carries it for all users of the image. ### 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](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always (run with --files on the two changed files; all hooks passed) - [ ] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). Not done: no user-facing behaviour changes in verl itself. - [x] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: the change is to the ROCm e2e workflow itself, which exercises it. - [ ] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [ ] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Yuhan Yang <yuhanya@amd.com> Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com> | 6 days ago |
| [perf] feat: mstx profiler support schedule to actor update mini batch (#8687) ### What does this PR do? When Actor/Critic update has many mini-batches, full traces can be huge. This PR lets users configure schedule (skip_first / wait / warmup / active / repeat) under profiler.tool_config.npu, so only selected mini-batches are recorded. verl advances the schedule by calling profiler.step() once per mini-batch in TrainingWorker.train_mini_batch. - Without schedule && discrete=True (or active <= 0): continuous collection; profile_npu.step() is not driven by the mini-batch loop. - With schedule && discrete=True (active > 0): each mini-batch step() advances the backend schedule accordingly. - Docs updated for Ascend profiling (zh/en); config added for actor/critic (not ref). - Unit tests, and the generated trainer configs are updated accordingly. <img width="1950" height="890" alt="QQ20261114-145910" src="https://github.com/user-attachments/assets/a0f8c9bd-90c5-4ad6-8f64-345c0713be56" /> ### Checklist Before Starting - [x] Search for similar PRs. Paste at least one query link here: ...https://github.com/verl-project/verl/pull/7105 - [x] Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI) - {modules} include fsdp, megatron, veomni, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward, fully_async, one_step_off - If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc] - {type} is in feat, 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. #### E2E TEST collect full mode <img width="2568" height="1366" alt="image" src="https://github.com/user-attachments/assets/42f80d5c-1fb4-4735-9257-1dfcc8d1d12c" /> schedule to collect mini batch 1, 2 <img width="2572" height="1386" alt="image" src="https://github.com/user-attachments/assets/4826367b-6168-4976-b704-de2084b4aac6" /> ### API and Usage Example > Demonstrate how the API changes if any, and provide usage example(s) if possible. **API changes** python schedule: Optional[TorchProfilerScheduleConfig] = None # when set with active > 0, DistProfiler.step() drives the schedule per mini-batch Usage (YAML) python actor_rollout_ref: actor: profiler: enable: True tool_config: npu: discrete: True contents: [npu, cpu] # optional; omit to record every mini-batch schedule: skip_first: 0 wait: 0 warmup: 1 # warm up on the first mini-batch active: 1 # record the second mini-batch repeat: 1 # one cycle, then stop Usage (CLI) bash python3 -m verl.main\ global_profiler.tool=npu \ global_profiler.steps=[2] \ global_profiler.save_path=/tmp/profile \ actor_rollout_ref.actor.profiler.enable=True \ actor_rollout_ref.actor.profiler.tool_config.npu.discrete=True \ actor_rollout_ref.actor.profiler.tool_config.npu.contents=[npu,cpu] \ actor_rollout_ref.actor.profiler.tool_config.npu.schedule.warmup=1 \ actor_rollout_ref.actor.profiler.tool_config.npu.schedule.active=1 \ actor_rollout_ref.actor.profiler.tool_config.npu.schedule.repeat=1 \ ... `` ### Design & Code Changes > Demonstrate the high-level design if this PR is complex, and list the specific changes. Reuses the schedule mechanism the torch backend already has. TrainingWorker already calls DistProfiler.step() once per update mini-batch, so the training loop is untouched — the NPU backend just starts responding to that call. - NPUToolConfig gains schedule: Optional[TorchProfilerScheduleConfig]; resolved once in NPUProfiler.__init__ into _schedule_kwargs (None when active <= 0). - get_npu_profiler() takes schedule and only adds torch_npu.profiler.schedule(**kwargs) when present. - NPUProfiler._active_prof (class-level) publishes the running profiler, so the inner TrainingWorker can advance one started by the outer ActorRolloutRefWorker. - step() now advances _active_prof instead of returning immediately; stop() no longer emits a trailing step() and clears the handle. - annotate() forwards the schedule only for stages marked scheduled=True; log-prob and rollout keep full traces. - Config: actor.yaml, critic.yaml, profiler.yaml + the four generated trainer yamls. Docs and tests updated. Default active <= 0 = no schedule = behavior identical to before. No changes to the torch/nsys backends or the training loop. ### 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](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [x] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). - [x] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [x] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [x] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main`. | 6 days ago |
| [fsdp, perf] chore: deepseek v4 flash performance optimization solution for NPU (#8698) ### What does this PR do? > Add **concise** overview of what this PR aims to achieve or accomplish. Reference related GitHub issues and PRs that help with the review. - Adjust the DeepSeek V4 flash training policy to optimize its performance. - Redundant code is deleted. This function is controlled by use_no_sync_for_gradient_accumulation. ### 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} include fsdp, megatron, veomni, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward, fully_async, one_step_off - If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc] - {type} is in feat, 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. python # 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](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [ ] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [ ] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). - [ ] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [ ] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [ ] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main. | 6 days ago |
| [BREAKING][trainer, recipe, ci, doc] refactor: remove V0 trainer and migrate legacy async trainers to recipes (#8625) ### What does this PR do? Make V1 the only PPO trainer in verl by removing the V0 trainer and moving the legacy fully async and one-step-off implementations to verl-recipe. The migrated recipes pin verl v0.9.1 at 1876b06d0a3e4e71e06230be10af14492ca8a75b and continue using its V0 trainer. Shared code still used by mainline remains in verl. Related verl-recipe PR: https://github.com/verl-project/verl-recipe/pull/171 ### Test CPU regression tests: bash python -m pytest tests/trainer/ppo/test_score_centering_on_cpu.py tests/trainer/ppo/test_spec_decode_metrics_on_cpu.py tests/utils/test_utils_skip.py tests/workers/rollout/rollout_vllm/test_mtp_hybrid_sleep_acceptance_on_cpu.py -q -rs python -m pytest tests/trainer/ppo/v1 -q -rs python -m pytest tests/trainer/test_multi_trajectories_advantage_on_cpu.py -q -rs Results: **72 passed, 2 skipped**; **236 passed**; **2 passed**, respectively. The vLLM-dependent speculative-decoding/MTP tests were also run on the GPU server: **4 passed**. Nine mainline GPU smoke runs passed on a single 8 × Hopper 80GB node: - **sync**: PPO/GAE with reward KL, cache capture/replay, and cross-step repeat replay. - **colocate_async**: GRPO with a colocated reward model, cache capture/replay. - **separate_async**: training, cache capture/replay with parameter_sync_step=4, and checkpoint resume from step 2 to step 3. Fresh runs completed three training steps, validation, and checkpoint saving. Cache replay was verified through injection logs; sync and colocate cache hashes remained unchanged. Separate async saved four inner batches per cached step and replayed their combined trajectories. Nonzero gradients were verified in the PPO, reward-model, and response-length-reward cases. Environment: PyTorch 2.11.0+cu130, vLLM 0.24.0, Transformers 5.5.3, Ray 2.46.0.18, and TransferQueue 0.1.11. These are functional smoke tests using Qwen2.5-0.5B-Instruct and a small GSM8K subset, not convergence or performance comparisons. Other training and rollout backends were not exercised. ### API and Usage Example verl.trainer.main_ppo now always uses V1. Remove trainer.use_v1 overrides: bash python -m verl.trainer.main_ppo \ trainer.v1.trainer_mode=colocate_async \ [other overrides] The removed interfaces are: - verl.trainer.main_ppo_v0 - verl.trainer.ppo.ray_trainer - verl.experimental.fully_async_policy - verl.experimental.one_step_off_policy - skip.rollout and skip.async_rollout V1 retains skip.rollout_tq. Legacy async workflows use the migrated recipe entrypoints with their pinned verl dependency. ### Design & Code Changes - Extract shared PPO helpers into verl/trainer/ppo/trainer_utils.py and update their callers. - Remove V0 and legacy async trainer implementations while retaining shared engine workers used by V1. - Keep only the TransferQueue skip implementation and update its tests and documentation. - Remove obsolete launch options and update CI references, examples, and documentation. | 7 days ago |
| [perf] feat: mstx profiler support schedule to actor update mini batch (#8687) ### What does this PR do? When Actor/Critic update has many mini-batches, full traces can be huge. This PR lets users configure schedule (skip_first / wait / warmup / active / repeat) under profiler.tool_config.npu, so only selected mini-batches are recorded. verl advances the schedule by calling profiler.step() once per mini-batch in TrainingWorker.train_mini_batch. - Without schedule && discrete=True (or active <= 0): continuous collection; profile_npu.step() is not driven by the mini-batch loop. - With schedule && discrete=True (active > 0): each mini-batch step() advances the backend schedule accordingly. - Docs updated for Ascend profiling (zh/en); config added for actor/critic (not ref). - Unit tests, and the generated trainer configs are updated accordingly. <img width="1950" height="890" alt="QQ20261114-145910" src="https://github.com/user-attachments/assets/a0f8c9bd-90c5-4ad6-8f64-345c0713be56" /> ### Checklist Before Starting - [x] Search for similar PRs. Paste at least one query link here: ...https://github.com/verl-project/verl/pull/7105 - [x] Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI) - {modules} include fsdp, megatron, veomni, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward, fully_async, one_step_off - If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc] - {type} is in feat, 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. #### E2E TEST collect full mode <img width="2568" height="1366" alt="image" src="https://github.com/user-attachments/assets/42f80d5c-1fb4-4735-9257-1dfcc8d1d12c" /> schedule to collect mini batch 1, 2 <img width="2572" height="1386" alt="image" src="https://github.com/user-attachments/assets/4826367b-6168-4976-b704-de2084b4aac6" /> ### API and Usage Example > Demonstrate how the API changes if any, and provide usage example(s) if possible. **API changes** python schedule: Optional[TorchProfilerScheduleConfig] = None # when set with active > 0, DistProfiler.step() drives the schedule per mini-batch Usage (YAML) python actor_rollout_ref: actor: profiler: enable: True tool_config: npu: discrete: True contents: [npu, cpu] # optional; omit to record every mini-batch schedule: skip_first: 0 wait: 0 warmup: 1 # warm up on the first mini-batch active: 1 # record the second mini-batch repeat: 1 # one cycle, then stop Usage (CLI) bash python3 -m verl.main\ global_profiler.tool=npu \ global_profiler.steps=[2] \ global_profiler.save_path=/tmp/profile \ actor_rollout_ref.actor.profiler.enable=True \ actor_rollout_ref.actor.profiler.tool_config.npu.discrete=True \ actor_rollout_ref.actor.profiler.tool_config.npu.contents=[npu,cpu] \ actor_rollout_ref.actor.profiler.tool_config.npu.schedule.warmup=1 \ actor_rollout_ref.actor.profiler.tool_config.npu.schedule.active=1 \ actor_rollout_ref.actor.profiler.tool_config.npu.schedule.repeat=1 \ ... `` ### Design & Code Changes > Demonstrate the high-level design if this PR is complex, and list the specific changes. Reuses the schedule mechanism the torch backend already has. TrainingWorker already calls DistProfiler.step() once per update mini-batch, so the training loop is untouched — the NPU backend just starts responding to that call. - NPUToolConfig gains schedule: Optional[TorchProfilerScheduleConfig]; resolved once in NPUProfiler.__init__ into _schedule_kwargs (None when active <= 0). - get_npu_profiler() takes schedule and only adds torch_npu.profiler.schedule(**kwargs) when present. - NPUProfiler._active_prof (class-level) publishes the running profiler, so the inner TrainingWorker can advance one started by the outer ActorRolloutRefWorker. - step() now advances _active_prof instead of returning immediately; stop() no longer emits a trailing step() and clears the handle. - annotate() forwards the schedule only for stages marked scheduled=True; log-prob and rollout keep full traces. - Config: actor.yaml, critic.yaml, profiler.yaml + the four generated trainer yamls. Docs and tests updated. Default active <= 0 = no schedule = behavior identical to before. No changes to the torch/nsys backends or the training loop. ### 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](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [x] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). - [x] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [x] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [x] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main`. | 6 days ago |
| [perf] feat: mstx profiler support schedule to actor update mini batch (#8687) ### What does this PR do? When Actor/Critic update has many mini-batches, full traces can be huge. This PR lets users configure schedule (skip_first / wait / warmup / active / repeat) under profiler.tool_config.npu, so only selected mini-batches are recorded. verl advances the schedule by calling profiler.step() once per mini-batch in TrainingWorker.train_mini_batch. - Without schedule && discrete=True (or active <= 0): continuous collection; profile_npu.step() is not driven by the mini-batch loop. - With schedule && discrete=True (active > 0): each mini-batch step() advances the backend schedule accordingly. - Docs updated for Ascend profiling (zh/en); config added for actor/critic (not ref). - Unit tests, and the generated trainer configs are updated accordingly. <img width="1950" height="890" alt="QQ20261114-145910" src="https://github.com/user-attachments/assets/a0f8c9bd-90c5-4ad6-8f64-345c0713be56" /> ### Checklist Before Starting - [x] Search for similar PRs. Paste at least one query link here: ...https://github.com/verl-project/verl/pull/7105 - [x] Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI) - {modules} include fsdp, megatron, veomni, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward, fully_async, one_step_off - If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc] - {type} is in feat, 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. #### E2E TEST collect full mode <img width="2568" height="1366" alt="image" src="https://github.com/user-attachments/assets/42f80d5c-1fb4-4735-9257-1dfcc8d1d12c" /> schedule to collect mini batch 1, 2 <img width="2572" height="1386" alt="image" src="https://github.com/user-attachments/assets/4826367b-6168-4976-b704-de2084b4aac6" /> ### API and Usage Example > Demonstrate how the API changes if any, and provide usage example(s) if possible. **API changes** python schedule: Optional[TorchProfilerScheduleConfig] = None # when set with active > 0, DistProfiler.step() drives the schedule per mini-batch Usage (YAML) python actor_rollout_ref: actor: profiler: enable: True tool_config: npu: discrete: True contents: [npu, cpu] # optional; omit to record every mini-batch schedule: skip_first: 0 wait: 0 warmup: 1 # warm up on the first mini-batch active: 1 # record the second mini-batch repeat: 1 # one cycle, then stop Usage (CLI) bash python3 -m verl.main\ global_profiler.tool=npu \ global_profiler.steps=[2] \ global_profiler.save_path=/tmp/profile \ actor_rollout_ref.actor.profiler.enable=True \ actor_rollout_ref.actor.profiler.tool_config.npu.discrete=True \ actor_rollout_ref.actor.profiler.tool_config.npu.contents=[npu,cpu] \ actor_rollout_ref.actor.profiler.tool_config.npu.schedule.warmup=1 \ actor_rollout_ref.actor.profiler.tool_config.npu.schedule.active=1 \ actor_rollout_ref.actor.profiler.tool_config.npu.schedule.repeat=1 \ ... `` ### Design & Code Changes > Demonstrate the high-level design if this PR is complex, and list the specific changes. Reuses the schedule mechanism the torch backend already has. TrainingWorker already calls DistProfiler.step() once per update mini-batch, so the training loop is untouched — the NPU backend just starts responding to that call. - NPUToolConfig gains schedule: Optional[TorchProfilerScheduleConfig]; resolved once in NPUProfiler.__init__ into _schedule_kwargs (None when active <= 0). - get_npu_profiler() takes schedule and only adds torch_npu.profiler.schedule(**kwargs) when present. - NPUProfiler._active_prof (class-level) publishes the running profiler, so the inner TrainingWorker can advance one started by the outer ActorRolloutRefWorker. - step() now advances _active_prof instead of returning immediately; stop() no longer emits a trailing step() and clears the handle. - annotate() forwards the schedule only for stages marked scheduled=True; log-prob and rollout keep full traces. - Config: actor.yaml, critic.yaml, profiler.yaml + the four generated trainer yamls. Docs and tests updated. Default active <= 0 = no schedule = behavior identical to before. No changes to the torch/nsys backends or the training loop. ### 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](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [x] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). - [x] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [x] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [x] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main`. | 6 days ago |
| [BREAKING] [misc] refactor: deprecate workers, migrate to engines (#6067) ### What does this PR do? Now we will deprecate and delete all workers codes and branches to reduce burden of maintenance, and for boosting the usage of model engine abstraction and verl's RL library transformation. ### Checklist Before Starting - [ ] Search for similar PRs. Paste at least one query link here: ... - [ ] Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI) - {modules} include fsdp, megatron, veomni, sglang, vllm, vllm_omni, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward, fully_async, one_step_off - If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc] - {type} is in feat, 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. python # 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. - [ ] Read the [Contribute Guide](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [ ] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [ ] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). - [ ] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [ ] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [ ] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main. | 7 months ago |
| [BREAKING][misc] feat: uv integration (#7127) ### What does this PR do? Support uv with vllm, sglang x fsdp, megatron ### Checklist Before Starting - [ ] Search for similar PRs. Paste at least one query link here: ... - [ ] Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI) - {modules} include fsdp, megatron, veomni, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward, fully_async, one_step_off - If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc] - {type} is in feat, 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. python # 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. - [ ] Read the [Contribute Guide](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [ ] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [ ] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). - [ ] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [ ] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [ ] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main. --------- Co-authored-by: Cursor <cursoragent@cursor.com> | 3 months ago |
| [misc] fix: .git-blame-ignore-revs file is invalid (#4674) ### What does this PR do? Related to #4661 <img width="1000" height="342" alt="image" src="https://github.com/user-attachments/assets/51427771-c0a6-41d1-82ea-4dfc45e02e63" /> Updated .git-blame-ignore-revs to use full 40‑char commit SHAs so Git treats the file as a valid ignore list After the fix: <img width="873" height="504" alt="image" src="https://github.com/user-attachments/assets/b94300bf-b2fc-4b28-b3f0-b811da8ab0fa" /> ### 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} include fsdp, megatron, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward - If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc] - {type} is in feat, 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. python # 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](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md). - [X] Apply [pre-commit checks](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [X] Add / Update [the documentation](https://github.com/volcengine/verl/tree/main/docs). - [X] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/volcengine/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [X] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) Signed-off-by: Hollow Man <hollowman@opensuse.org> | 10 months ago |
| [BREAKING][misc] feat: uv integration (#7127) ### What does this PR do? Support uv with vllm, sglang x fsdp, megatron ### Checklist Before Starting - [ ] Search for similar PRs. Paste at least one query link here: ... - [ ] Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI) - {modules} include fsdp, megatron, veomni, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward, fully_async, one_step_off - If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc] - {type} is in feat, 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. python # 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. - [ ] Read the [Contribute Guide](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [ ] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [ ] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). - [ ] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [ ] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [ ] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main. --------- Co-authored-by: Cursor <cursoragent@cursor.com> | 3 months ago |
| [recipe] feat: migrate recipe to the dedicated repo verl-recipe as a submodule (#4795) ### What does this PR do? This PR 1. migrates most recipes from the recipe directory to the dedicated repo [verl-recipe](https://github.com/verl-project/verl-recipe), 2. adds verl-recipe as a submodule, 3. adds instruction to update the submodule reference in the PR template, 4. migrates [transfer_queue](verl/experimental/transfer_queue), [fully_async_policy](verl/experimental/fully_async_policy), [one_step_off_policy](verl/experimental/one_step_off_policy) and [vla](verl/experimental/vla) to [verl/experimental](verl/experimental) since they are planned to be merged into the main library, 5. updates related CI and paths accordingly, 6. updates the README news and awesome projects about this migration, 7. forces into a single commit and tries its best to recognize rename to keep the commit history trackable. See the "conjugate" PR at https://github.com/verl-project/verl-recipe/pull/7. ### Test See the CI. ### Todo - [ ] Ignore the final PR commit in git blame if it shows up too frequently. | 10 months ago |
| [BREAKING][megatron, vllm, sglang, rollout, doc] refactor: unify QAT and low-precision rollout (#8287) ### What does this PR do? This PR refactors Megatron QAT and low-precision rollout around a unified trainer-side weight quantization and rollout-side refit boundary. - Add compressed-tensors-compatible trainer-side exporters for FP8_BLOCK, MXFP8, MXFP4, and NVFP4. - Add ModelOpt-backed Megatron QAT modes: fp8, mxfp8, mxfp4, mxfp4_mxfp8, and nvfp4. - Replace the string rollout.quantization=fp8 API with structured rollout.quantization.linear, moe, ignore, and config_file settings. - Load and refit pre-quantized weights in vLLM and SGLang instead of quantizing BF16 weights inside rollout workers. - Add vLLM MXFP4/NVFP4 refit support, update FP8 refit handling, and update SGLang routing replay support. - Add a unified QAT guide, migration notes, examples, CPU tests, and a rollout log-prob comparison tool. - Remove the legacy verl.utils.modelopt implementation and TRT-LLM rollout quantization support. Related to #5972 and #4066. This PR has partial scope overlap with open low-precision work, but uses a materially different architecture: #7519 implements Transformer Engine shared-grid MXFP8 training and rollout, while this PR implements ModelOpt QAT plus a generalized trainer-side compressed-tensors export boundary for multiple formats; #7971 implements native Transformer Engine NVFP4 real quantization, while this PR implements NVFP4 fake-quant QAT and pre-quantized refit; #8205 fixes the legacy FSDP NVFP4 compressor API, while this PR refactors the Megatron and rollout path and does not add this feature to FSDP. AI assistance was used to review the branch, fix two review findings, add a regression test, and prepare this PR description. The human submitter reviewed the changes and is responsible for the contribution end to end. ### Checklist Before Starting - [x] Search for similar PRs: https://github.com/verl-project/verl/pulls?q=is%3Apr+is%3Aopen+QAT+compressed-tensors+rollout - [x] Format the PR title as [{modules}] {type}: {description}. ### Test Passed: bash git diff --check origin/main...wuxibin/qat python -m compileall -q verl/utils/qat verl/utils/vllm verl/workers/rollout/sglang_rollout verl/workers/rollout/trtllm_rollout PATH="$PWD/.venv/bin:$PATH" pre-commit run --all-files --show-diff-on-failure --color=always The full pre-commit suite passed, including Ruff, Ruff format, mypy, generated-config verification, repository sanity checks, and compileall. The targeted pytest suites and GPU end-to-end tests were not run in this local environment because PyTorch, ModelOpt, and compressed-tensors were unavailable. CI/GPU validation should cover Megatron with vLLM and SGLang using FP8_BLOCK, plus MXFP8/MXFP4/NVFP4 on supported Blackwell hardware. ### API and Usage Example The previous API: bash actor_rollout_ref.rollout.quantization=fp8 is replaced by: bash actor_rollout_ref.rollout.quantization.linear=FP8_BLOCK \ actor_rollout_ref.rollout.quantization.moe=FP8_BLOCK Enable matching Megatron QAT with: bash actor_rollout_ref.actor.megatron.qat.enable=true \ actor_rollout_ref.actor.megatron.qat.mode=fp8 Dense and routed-expert precision can be configured independently. For example, use BF16 dense layers and MXFP4 experts with: bash actor_rollout_ref.rollout.quantization.linear=null \ actor_rollout_ref.rollout.quantization.moe=MXFP4 \ actor_rollout_ref.actor.megatron.qat.enable=true \ actor_rollout_ref.actor.megatron.qat.mode=mxfp4 TRT-LLM no longer accepts rollout.quantization; use vLLM or SGLang for supported low-precision rollout configurations. ### Design & Code Changes - Introduce WeightQuantizer dispatch based on rollout overrides or the model's native Hugging Face quantization config. - Export canonical HF-named tensors from Megatron, quantize them on the trainer side, and transfer the final checkpoint layout through the checkpoint engine. - Build compressed-tensors configs from per-layer presets and enforce QAT/rollout precision compatibility at startup. - Add vLLM staging and post-load processing for FP8, MXFP8, MXFP4, and NVFP4 refits. - Pass compressed-tensors model overrides to SGLang for FP8_BLOCK rollout. - Keep default high-precision layers unquantized for both generated compressed-tensors configs and native FP8 configs. - Consolidate low-precision documentation and provide scripts/rollout_logprob_diff.py for numerical comparison. - Remove superseded ModelOpt/vLLM monkey-patch utilities and the TRT-LLM FP8 E2E job. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting). - [x] Add / update [the documentation](https://github.com/verl-project/verl/tree/main/docs). - [ ] Add unit or end-to-end tests to CI to cover all code. New CPU tests and updated FP8 E2E jobs are included, but ModelOpt/compressed-tensors test dependency coverage and MXFP4/NVFP4 E2E coverage still need confirmation. - [ ] Once this PR is ready for CI, send a message in the [ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1). - [x] Recipe submodule update is not applicable; this PR does not change the recipe submodule. --------- Co-authored-by: Cursor <cursoragent@cursor.com> | 1 month ago |
| docs: add hf ckpt to faq, and include verl apis in the website (#427) Now APIs can be displayed:  | 1 year ago |
| [misc] feat: add agent instructions, skills & improve CI for easier tests (#5846) ## What does this PR do? Add a framework-agnostic agent instruction system for AI coding agents (Claude Code, Codex, etc.), and consolidate sanity checks into pre-commit to form an initial closed loop for agent-assisted development: read instructions → make changes → validate locally → create/update PR. ## Follow-up Issues - #5852 - #5853 ## Test - pre-commit run --all-files — all 12 hooks pass locally - New hooks tested: check-docs-time-info, check-device-api-usage, check-dataproto-usage, validate-structure, check-naming-conventions - Verified check_license.py correctly uses git ls-files to conform to .gitignore. - Verified symlinks resolve correctly - This PR itself was created and updated using the /pr skill - Issues #5852 and #5853 were created using the /issue skill ## Design & Code Changes ### Agent Instructions - AGENTS.md — project-wide rules all agents must follow - .agent/skills/ — shared reusable skills (source of truth); .claude/ and .codex/ symlink here - CLAUDE.md — Claude Code entrypoint, refers to AGENTS.md - docs/contributing/editing-agent-instructions.md — meta-guide for maintaining agent instructions Design principles: - **Framework-agnostic by default**: .agent/ and AGENTS.md are the source of truth; framework variants symlink or refer to them. - **Single source of truth**: skills authored once in .agent/skills/, symlinked into each framework's directory. Instructions refer to existing files (PR template, CI scripts) rather than restating their content. ### Pre-commit / CI Consolidation Consolidating sanity checks into pre-commit closes the loop for agents — they can validate locally before pushing, rather than waiting for CI feedback. - .pre-commit-config.yaml — added sanity checks previously only in CI, merged into single repo: local block - .github/workflows/sanity.yml — removed steps now covered by pre-commit - tests/special_sanity/check_license.py — use git ls-files to respect .gitignore - cpu_unit_tests.yml, gpu_unit_tests.yml, npu_unit_tests.yml — exclude tests/special_sanity/** from path filters (sanity checks don't affect runtime, already covered by sanity.yml and pre-commit.yml) ### Full File List | File | Purpose | |------|---------| | AGENTS.md | Project-wide agent rules (contribution policy, env setup, commit conventions) | | CLAUDE.md | Claude Code entrypoint, refers to AGENTS.md | | .agent/skills/pr.md | Shared PR creation/update skill | | .agent/skills/issue.md | Shared issue creation/update skill | | .claude/skills/ | Symlinks → .agent/skills/ | | .codex/skills/ | Symlinks → .agent/skills/ | | docs/contributing/editing-agent-instructions.md | Meta-guide for maintaining agent instructions | | docs/index.rst | Added contributing doc to Sphinx toctree | | CONTRIBUTING.md | Added AI-Assisted Contributions section | | .pre-commit-config.yaml | Consolidated local hooks, added sanity checks from CI | | .github/workflows/sanity.yml | Removed steps now covered by pre-commit | | .github/workflows/cpu_unit_tests.yml | Exclude tests/special_sanity/** | | .github/workflows/gpu_unit_tests.yml | Exclude tests/special_sanity/** | | .github/workflows/npu_unit_tests.yml | Exclude tests/special_sanity/** | | tests/special_sanity/check_license.py | Use git ls-files to respect .gitignore | ## Checklist - [x] AI assistance was used (Claude Code) - [x] This does not duplicate an existing PR - [x] pre-commit checks pass (all 12 hooks) - [ ] Verified no breaking changes to existing workflows - [ ] Documentation reviewed by a human ## Acknowledgements The AGENTS.md and editing guidelines are adapted from the [vLLM project](https://github.com/vllm-project/vllm). --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> | 7 months ago |
| [misc] feat: add agent instructions, skills & improve CI for easier tests (#5846) ## What does this PR do? Add a framework-agnostic agent instruction system for AI coding agents (Claude Code, Codex, etc.), and consolidate sanity checks into pre-commit to form an initial closed loop for agent-assisted development: read instructions → make changes → validate locally → create/update PR. ## Follow-up Issues - #5852 - #5853 ## Test - pre-commit run --all-files — all 12 hooks pass locally - New hooks tested: check-docs-time-info, check-device-api-usage, check-dataproto-usage, validate-structure, check-naming-conventions - Verified check_license.py correctly uses git ls-files to conform to .gitignore. - Verified symlinks resolve correctly - This PR itself was created and updated using the /pr skill - Issues #5852 and #5853 were created using the /issue skill ## Design & Code Changes ### Agent Instructions - AGENTS.md — project-wide rules all agents must follow - .agent/skills/ — shared reusable skills (source of truth); .claude/ and .codex/ symlink here - CLAUDE.md — Claude Code entrypoint, refers to AGENTS.md - docs/contributing/editing-agent-instructions.md — meta-guide for maintaining agent instructions Design principles: - **Framework-agnostic by default**: .agent/ and AGENTS.md are the source of truth; framework variants symlink or refer to them. - **Single source of truth**: skills authored once in .agent/skills/, symlinked into each framework's directory. Instructions refer to existing files (PR template, CI scripts) rather than restating their content. ### Pre-commit / CI Consolidation Consolidating sanity checks into pre-commit closes the loop for agents — they can validate locally before pushing, rather than waiting for CI feedback. - .pre-commit-config.yaml — added sanity checks previously only in CI, merged into single repo: local block - .github/workflows/sanity.yml — removed steps now covered by pre-commit - tests/special_sanity/check_license.py — use git ls-files to respect .gitignore - cpu_unit_tests.yml, gpu_unit_tests.yml, npu_unit_tests.yml — exclude tests/special_sanity/** from path filters (sanity checks don't affect runtime, already covered by sanity.yml and pre-commit.yml) ### Full File List | File | Purpose | |------|---------| | AGENTS.md | Project-wide agent rules (contribution policy, env setup, commit conventions) | | CLAUDE.md | Claude Code entrypoint, refers to AGENTS.md | | .agent/skills/pr.md | Shared PR creation/update skill | | .agent/skills/issue.md | Shared issue creation/update skill | | .claude/skills/ | Symlinks → .agent/skills/ | | .codex/skills/ | Symlinks → .agent/skills/ | | docs/contributing/editing-agent-instructions.md | Meta-guide for maintaining agent instructions | | docs/index.rst | Added contributing doc to Sphinx toctree | | CONTRIBUTING.md | Added AI-Assisted Contributions section | | .pre-commit-config.yaml | Consolidated local hooks, added sanity checks from CI | | .github/workflows/sanity.yml | Removed steps now covered by pre-commit | | .github/workflows/cpu_unit_tests.yml | Exclude tests/special_sanity/** | | .github/workflows/gpu_unit_tests.yml | Exclude tests/special_sanity/** | | .github/workflows/npu_unit_tests.yml | Exclude tests/special_sanity/** | | tests/special_sanity/check_license.py | Use git ls-files to respect .gitignore | ## Checklist - [x] AI assistance was used (Claude Code) - [x] This does not duplicate an existing PR - [x] pre-commit checks pass (all 12 hooks) - [ ] Verified no breaking changes to existing workflows - [ ] Documentation reviewed by a human ## Acknowledgements The AGENTS.md and editing guidelines are adapted from the [vLLM project](https://github.com/vllm-project/vllm). --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> | 7 months ago |
| [misc] fix: project name refactor - volcengine -> verl (#6053) ### What does this PR do? fix: project name refactor - volcengine -> verl , from https://github.com/verl-project/verl/pull/6008 ### Checklist Before Starting - [ ] Search for similar PRs. Paste at least one query link here: ... - [ ] Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI) - {modules} include fsdp, megatron, veomni, sglang, vllm, vllm_omni, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward, fully_async, one_step_off - If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc] - {type} is in feat, 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. python # 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. - [ ] Read the [Contribute Guide](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md). - [ ] Apply [pre-commit checks](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [ ] Add / Update [the documentation](https://github.com/volcengine/verl/tree/main/docs). - [ ] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/volcengine/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [ ] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [ ] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main. --------- Co-authored-by: Shiven Siwach <sshiven942@gmail.com> | 7 months ago |
| [init] feat: upload first open source version of verl | 2 years ago |
| [init] feat: upload first open source version of verl | 2 years ago |
| [doc] feat: add intel as supported hardware in readme - Hardware Support (#8556) ## Description This PR updates the main README.md to explicitly list Intel (XPU) hardware support. While Intel support is currently provided via the verl-hardware-plugin extension, having it visible in the root README makes the project much more discoverable for first-time users or those specifically searching (Ctrl + F) for Intel/XPU compatibility. ## Changes - Added Intel (XPU) to the list of supported hardware/backends in README.md. - Added a brief note/link pointing users to the verl-hardware-plugin for setup instructions. ### Checklist Before Starting - [ ] Search for similar PRs. Paste at least one query link here: ... - [ ] Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI) - {modules} include fsdp, megatron, veomni, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward, fully_async, one_step_off - If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc] - {type} is in feat, 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. python # 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](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [ ] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). - [ ] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [ ] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [ ] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main. --------- Signed-off-by: kahlun <kah.lun.teoh@intel.com> | 7 days ago |
| [veomni,ci] feat: add uv-based veomni training backend and cover it in GPU CI (#8274) ## Summary Promotes **VeOmni to a first-class uv training backend** on the universal uv-managed CUDA 13 stack, fixes the open image build behind a filtering egress proxy, and adds CI coverage. ### Training backend - VeOmni installable as a standalone backend: uv run --frozen --all-packages --extra vllm --extra veomni ... (deps-free veomni package pinned in uv.lock; no fsdp / veomni-sft extras required). - Pinned revisions: VeOmni 10a26ac (0.1.12), Megatron-LM 4b4acac9 (core_v0.19.2). ### CI - New e2e_ppo_trainer_veomni_vllm workflow on **L20x8**: package-version check, GSM8K + GEO3K data prep, two PPO runs (FSDP_SIZE=4 SP_SIZE=2 and FSDP_SIZE=8 SP_SIZE=1) via tests/special_e2e/run_ppo_trainer_veomni.sh, plus the MoE export / unfused-experts test; dynamic vemlp runner with create/destroy. - Ascend variant e2e_ppo_trainer_veomni_vllm_ascend (aarch64, a3-800i NPU) with its own dedicated NPU image. - Bumped **all uv-based workflows** (cpu/gpu unit tests, vllm, sglang, reward models, sft, ppo/megatron, torchtitan, fully-async) and the workflows README example to the freshly published verl-ci-cn-beijing.cr.volces.com/verlai/verl:uv.cu130.dev4, which carries this backend. ROCm / TensorRT-LLM / Ascend jobs keep their dedicated images (comments only, untouched). ### Open image build (docker/Dockerfile.uv.cu130) - Pin system libnccl2 / libnccl-dev to 2.28.9-1+cuda13.0 (highest published +cuda13.0 flavour; pip nvidia-nccl-cu13==2.29.7 still supplies the runtime NCCL via the wheel RPATH). - Throwaway git shim used only during prefetch for the pinned VCS deps (VeOmni, Megatron). A full-history fetch is reset by middleboxes (curl 56 / early EOF), and protocol-v2 ref listing of Megatron's ~8.2k refs/pull/* gets truncated (expected flush after ref listing). The shim resolves the pinned commit via a narrow v2 ls-remote (refs/heads/* + refs/tags/*), shallow-fetches the advertised ref (or the SHA directly over v2), and writes both refs/commit/<sha> and a lightweight tag so the object survives uv's git clone --local <db> <checkout> + git reset --hard (Could not parse object otherwise). GIT_TERMINAL_PROMPT=0, HTTP/1.1, retries, never falls back to a full clone; removed before the final image stage. Verified end-to-end with real uv (UV_GIT_FETCH_WITH_CLI=true): VeOmni (~8 MB) and Megatron (~15 MB) shallow fetch, local clone, reset, build and install all succeed. ## Test plan - [x] python3 manage_envs.py prefetch cu130 dev -- --frozen builds the image that supports --extra vllm --extra veomni - [x] veomni PPO/GRPO smoke on H20x8 and A800x8 (loss/reward produced) - [ ] CI on this PR — L20x8 veomni e2e green --------- Co-authored-by: Trae AI <noreply@trae.ai> | 1 month ago |
| [perf, fsdp, megatron, veomni] feat: add TileLang fused linear cross entropy (#8654) ### What does this PR do? Adds a TileLang fused linear cross-entropy output head and integrates it with FSDP, Megatron, and VeOmni training. The TileLang path supports multi-label/top-k log probabilities, including repeated labels, so distillation and score-centering losses can consume precomputed student top-k log probabilities without materializing full logits. This also extends the SFT and separate-async OPD CI matrices to exercise TileLang under FSDP/SP and Megatron TP/SP/PP/CP configurations while retaining non-fused baselines. Duplicate-work search: [open PRs matching TileLang linear cross entropy](https://github.com/verl-project/verl/pulls?q=is%3Apr+is%3Aopen+tilelang+linear+cross+entropy). This is materially different from [#7809](https://github.com/verl-project/verl/pull/7809), which adds a Megatron-only Triton operator for teacher-selected top-k log probabilities. This PR adds a TileLang linear-cross-entropy backend that also computes regular label log probabilities and entropy, supports FSDP/VeOmni/Megatron, and serves both distillation and score centering through the shared output-head contract. It is also different from [#6737](https://github.com/verl-project/verl/pull/6737), which wires VeOmni's existing fused_linear_aux; this PR removes that engine-specific dependency and routes VeOmni through the same verl Triton/TileLang output-head implementation as the other engines. score centering vs no score centering <img width="380" height="300" alt="image" src="https://github.com/user-attachments/assets/85d3b50c-329d-4f62-a6a5-8bda508a49f9" /> <img width="2330" height="624" alt="image" src="https://github.com/user-attachments/assets/526318b1-8797-49b7-963f-6cfb5c0f673b" /> ### Checklist Before Starting - [x] Search for similar PRs. Query: https://github.com/verl-project/verl/pulls?q=is%3Apr+is%3Aopen+tilelang+linear+cross+entropy - [x] Format the PR title as [{modules}] {type}: {description} ### Test - uv run --with pre-commit --with hydra-core pre-commit run --all-files --show-diff-on-failure --color=always - Targeted CPU integration suite: 205 passed. - uv run pytest -q tests/utils/kernel/tilelang/test_linear_cross_entropy_on_gpu.py: 4 passed. - uv run torchrun --standalone --nproc-per-node=2 -m pytest -q tests/utils/kernel/tilelang/test_linear_cross_entropy_on_gpu.py -k tensor_parallel: 1 passed per rank. - Qwen3-0.6B SFT E2E: completed FSDP and VeOmni TileLang/non-fused cases matched the golden loss and gradient tolerances. - Qwen3-VL-2B-Instruct SFT E2E: completed FSDP and VeOmni TileLang/non-fused cases matched the golden tolerances. - Megatron TP2/PP2/CP1 TileLang reached the optimizer after successful forward/backward for both LLM and VLM. Full local completion is blocked by the installed TransformerEngine wheel lacking Blackwell kernels (multi_tensor_apply); CP2 is similarly blocked in TransformerEngine CP attention before the output head. ### API and Usage Example yaml model: use_fused_kernels: true fused_kernel_options: impl_backend: tilelang TileLang is required when auxiliary top-k labels are passed for distillation or score centering. Triton and Liger retain their existing single-label behavior and fail explicitly for unsupported multi-label input. ### Design & Code Changes - Implements TileLang forward and backward kernels for fused projection, selected log probabilities, and entropy, including tensor-parallel vocabulary reductions. - Preserves duplicate top-k labels and accumulates all corresponding backward contributions. - Routes shared fused-output-head calls through one linear_cross_entropy dispatcher. - Passes auxiliary labels through FSDP, Megatron, and VeOmni model paths and lets distillation/score-centering losses consume differentiable precomputed top-k log probabilities. - Adds unit, multi-GPU, SP/CP/TP, and E2E coverage and documents the TileLang backend option. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [x] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). - [x] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. - [ ] Once the PR is ready for CI, send a message in the ci-request channel. AI assistance was used for implementation, testing, and drafting this PR. The human submitter remains responsible for reviewing every changed line and defending the change end-to-end. --------- Co-authored-by: Cursor <cursoragent@cursor.com> | 10 days ago |
| [data] fix: Update TQ version and align config yaml (#8181) ### What does this PR do? - Update TQ version to v0.1.11 - Align TQ related config yaml ### Checklist Before Starting - [ ] Search for similar PRs. Paste at least one query link here: ... - [ ] Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI) - {modules} include fsdp, megatron, veomni, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward, fully_async, one_step_off - If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc] - {type} is in feat, 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. python # 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. - [ ] Read the [Contribute Guide](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [ ] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [ ] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). - [ ] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. If not feasible, explain why: ... - [ ] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [ ] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main. --------- Signed-off-by: 0oshowero0 <o0shower0o@outlook.com> Co-authored-by: Joel <wuxibin@bytedance.com> | 1 month ago |
| [docker] feat: update stable image to vllm==0.12.0, sglang==0.5.6 (#4653) ### What does this PR do? 1. Update dockerfiles of vllm/sglang stable images, vllm from v0.11.0 to v0.12.0 and sglang from v0.5.5 to v0.5.6. 2. Use nvidia/cuda:12.9.1-devel-ubuntu22.04 as base image for vllm. 3. Add hacking code for updating megatron from 0.14.0 to 0.15.0. --------- Co-authored-by: Begunner <went@bytedance.com> Co-authored-by: wuxibin <wuxibin@bytedance.com> | 10 months ago |
| [vllm, sglang, model] chore: upgrade vllm==0.32.0 and transformers==5.16.1 (#8390) ### What does this PR do? Upgrade the CUDA 13 dependency stack to vllm==0.32.0 and the project-wide transformers==5.16.1 pin, then regenerate uv.lock. vLLM 0.32.0 requires tokenizers>=0.23.2, while SGLang 0.5.20 still declares tokenizers==0.22.2. Add a project-wide tokenizers==0.23.2 override, following the existing Transformers override pattern, so every resolution fork remains consistent. Also widen the Transformers support window in setup.py and requirements.txt to <5.17 so package metadata accepts the pinned version. Adapt AsyncLLM.pause_generation() to the vLLM 0.32 API while retaining vLLM 0.29 compatibility: 0.32 and newer use mode="abort", while older versions keep wait_for_inflight_requests=False. Keep the score-centering top-k coverage test valid for both providers: vLLM 0.29 retains cutoff ties, while 0.32 keeps exactly top_k entries. Adapt the Qwen3.5 monkey patches to both Transformers 5.12 and 5.16. Transformers 5.16 renamed decoder layer_type to block_type and moved causal-convolution and gated-delta callables from instance attributes to module functions. This is not a duplicate of [#8072](https://github.com/verl-project/verl/pull/8072): that PR targets vLLM 0.30.0 only, whereas this PR targets 0.32.0 and includes the required Transformers 5.16.1, tokenizers 0.23.2, and compatibility changes. AI assistance was used to update dependency pins, regenerate the lockfile, diagnose CI, implement compatibility handling, run checks, and draft this PR. The submitter reviewed the changed files and confirmed the change. ### Checklist Before Starting - [x] Search for similar PRs. Query: https://github.com/verl-project/verl/pulls?q=is%3Apr+is%3Aopen+vllm+upgrade - [x] Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI) ### Test - uv lock — resolved 378 packages successfully. - uv lock --check — passed. - .venv-vllm/bin/python -m pytest tests/workers/rollout/rollout_vllm/test_submitter_gate_on_cpu.py -q — 18 passed. - .venv-vllm/bin/python -m pytest tests/workers/rollout/rollout_vllm/test_vllm_topk_support.py -q -k 'small_decode_batch_provider_support_coverage or pure_top_p_overflow' — 5 passed. - .venv-vllm/bin/torchrun --nproc_per_node=1 -m pytest tests/special_distributed/test_qwen35_linear_attention_ulysses_sp.py -q — 2 passed. - Transformers 5.12.1 compatibility probe — legacy Qwen3.5 decoder and gated-delta instance attributes are detected. - uvx --with hydra-core pre-commit run --all-files --show-diff-on-failure --color=always — all hooks passed. - uvx --with hydra-core pre-commit run --files verl/models/transformers/qwen3_5.py tests/workers/rollout/rollout_vllm/test_vllm_topk_support.py — all hooks passed after the CI fixes. - git diff --check — passed. ### API and Usage Example No user-facing API change. Sync the vLLM environment through the existing extra: uv sync --extra fsdp --extra vllm ### Design & Code Changes - Pin vLLM 0.32.0 and Transformers 5.16.1 across the uv backend extras. - Override tokenizers at 0.23.2 to satisfy vLLM 0.32.0 and Transformers 5.16.1 while retaining SGLang 0.5.20. - Expand the package and development Transformers support window from <5.13 to <5.17. - Select the legacy or current vLLM pause keyword according to _VLLM_VERSION, with regression coverage for 0.29.0 and 0.32.0. - Preserve conservative top-k support evidence across the different vLLM 0.29 and 0.32 cutoff-tie semantics. - Resolve Qwen3.5 decoder and kernel callables from their Transformers 5.12 instance attributes or Transformers 5.16 module-level replacements. - Regenerate the universal lockfile for all platform and backend resolution forks. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always. - [ ] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). Not needed: this changes dependency pins and internal compatibility handling without changing user-facing APIs. - [x] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. Added pause API regression coverage and updated existing vLLM top-k and Qwen3.5 integration coverage. - [ ] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [ ] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main. Not applicable. --------- Co-authored-by: Cursor <cursoragent@cursor.com> | 28 days ago |
| [vllm, sglang, model] chore: upgrade vllm==0.32.0 and transformers==5.16.1 (#8390) ### What does this PR do? Upgrade the CUDA 13 dependency stack to vllm==0.32.0 and the project-wide transformers==5.16.1 pin, then regenerate uv.lock. vLLM 0.32.0 requires tokenizers>=0.23.2, while SGLang 0.5.20 still declares tokenizers==0.22.2. Add a project-wide tokenizers==0.23.2 override, following the existing Transformers override pattern, so every resolution fork remains consistent. Also widen the Transformers support window in setup.py and requirements.txt to <5.17 so package metadata accepts the pinned version. Adapt AsyncLLM.pause_generation() to the vLLM 0.32 API while retaining vLLM 0.29 compatibility: 0.32 and newer use mode="abort", while older versions keep wait_for_inflight_requests=False. Keep the score-centering top-k coverage test valid for both providers: vLLM 0.29 retains cutoff ties, while 0.32 keeps exactly top_k entries. Adapt the Qwen3.5 monkey patches to both Transformers 5.12 and 5.16. Transformers 5.16 renamed decoder layer_type to block_type and moved causal-convolution and gated-delta callables from instance attributes to module functions. This is not a duplicate of [#8072](https://github.com/verl-project/verl/pull/8072): that PR targets vLLM 0.30.0 only, whereas this PR targets 0.32.0 and includes the required Transformers 5.16.1, tokenizers 0.23.2, and compatibility changes. AI assistance was used to update dependency pins, regenerate the lockfile, diagnose CI, implement compatibility handling, run checks, and draft this PR. The submitter reviewed the changed files and confirmed the change. ### Checklist Before Starting - [x] Search for similar PRs. Query: https://github.com/verl-project/verl/pulls?q=is%3Apr+is%3Aopen+vllm+upgrade - [x] Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI) ### Test - uv lock — resolved 378 packages successfully. - uv lock --check — passed. - .venv-vllm/bin/python -m pytest tests/workers/rollout/rollout_vllm/test_submitter_gate_on_cpu.py -q — 18 passed. - .venv-vllm/bin/python -m pytest tests/workers/rollout/rollout_vllm/test_vllm_topk_support.py -q -k 'small_decode_batch_provider_support_coverage or pure_top_p_overflow' — 5 passed. - .venv-vllm/bin/torchrun --nproc_per_node=1 -m pytest tests/special_distributed/test_qwen35_linear_attention_ulysses_sp.py -q — 2 passed. - Transformers 5.12.1 compatibility probe — legacy Qwen3.5 decoder and gated-delta instance attributes are detected. - uvx --with hydra-core pre-commit run --all-files --show-diff-on-failure --color=always — all hooks passed. - uvx --with hydra-core pre-commit run --files verl/models/transformers/qwen3_5.py tests/workers/rollout/rollout_vllm/test_vllm_topk_support.py — all hooks passed after the CI fixes. - git diff --check — passed. ### API and Usage Example No user-facing API change. Sync the vLLM environment through the existing extra: uv sync --extra fsdp --extra vllm ### Design & Code Changes - Pin vLLM 0.32.0 and Transformers 5.16.1 across the uv backend extras. - Override tokenizers at 0.23.2 to satisfy vLLM 0.32.0 and Transformers 5.16.1 while retaining SGLang 0.5.20. - Expand the package and development Transformers support window from <5.13 to <5.17. - Select the legacy or current vLLM pause keyword according to _VLLM_VERSION, with regression coverage for 0.29.0 and 0.32.0. - Preserve conservative top-k support evidence across the different vLLM 0.29 and 0.32 cutoff-tie semantics. - Resolve Qwen3.5 decoder and kernel callables from their Transformers 5.12 instance attributes or Transformers 5.16 module-level replacements. - Regenerate the universal lockfile for all platform and backend resolution forks. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always. - [ ] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). Not needed: this changes dependency pins and internal compatibility handling without changing user-facing APIs. - [x] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. Added pause API regression coverage and updated existing vLLM top-k and Qwen3.5 integration coverage. - [ ] Once your PR is ready for CI, send a message in [the ci-request channel](https://verl-project.slack.com/archives/C091TCESWB1) in [the verl Slack workspace](https://join.slack.com/t/verl-project/shared_invite/zt-3855yhg8g-CTkqXu~hKojPCmo7k_yXTQ). (If not accessible, please try [the Feishu group (飞书群)](https://applink.larkoffice.com/client/chat/chatter/add_by_link?link_token=772jd4f1-cd91-441e-a820-498c6614126a).) - [ ] If your PR is related to the recipe submodule, please also update the reference to the submodule commit via git submodule update --remote or cd recipe && git pull origin main. Not applicable. --------- Co-authored-by: Cursor <cursoragent@cursor.com> | 28 days ago |
| [perf, fsdp, megatron, veomni] feat: add TileLang fused linear cross entropy (#8654) ### What does this PR do? Adds a TileLang fused linear cross-entropy output head and integrates it with FSDP, Megatron, and VeOmni training. The TileLang path supports multi-label/top-k log probabilities, including repeated labels, so distillation and score-centering losses can consume precomputed student top-k log probabilities without materializing full logits. This also extends the SFT and separate-async OPD CI matrices to exercise TileLang under FSDP/SP and Megatron TP/SP/PP/CP configurations while retaining non-fused baselines. Duplicate-work search: [open PRs matching TileLang linear cross entropy](https://github.com/verl-project/verl/pulls?q=is%3Apr+is%3Aopen+tilelang+linear+cross+entropy). This is materially different from [#7809](https://github.com/verl-project/verl/pull/7809), which adds a Megatron-only Triton operator for teacher-selected top-k log probabilities. This PR adds a TileLang linear-cross-entropy backend that also computes regular label log probabilities and entropy, supports FSDP/VeOmni/Megatron, and serves both distillation and score centering through the shared output-head contract. It is also different from [#6737](https://github.com/verl-project/verl/pull/6737), which wires VeOmni's existing fused_linear_aux; this PR removes that engine-specific dependency and routes VeOmni through the same verl Triton/TileLang output-head implementation as the other engines. score centering vs no score centering <img width="380" height="300" alt="image" src="https://github.com/user-attachments/assets/85d3b50c-329d-4f62-a6a5-8bda508a49f9" /> <img width="2330" height="624" alt="image" src="https://github.com/user-attachments/assets/526318b1-8797-49b7-963f-6cfb5c0f673b" /> ### Checklist Before Starting - [x] Search for similar PRs. Query: https://github.com/verl-project/verl/pulls?q=is%3Apr+is%3Aopen+tilelang+linear+cross+entropy - [x] Format the PR title as [{modules}] {type}: {description} ### Test - uv run --with pre-commit --with hydra-core pre-commit run --all-files --show-diff-on-failure --color=always - Targeted CPU integration suite: 205 passed. - uv run pytest -q tests/utils/kernel/tilelang/test_linear_cross_entropy_on_gpu.py: 4 passed. - uv run torchrun --standalone --nproc-per-node=2 -m pytest -q tests/utils/kernel/tilelang/test_linear_cross_entropy_on_gpu.py -k tensor_parallel: 1 passed per rank. - Qwen3-0.6B SFT E2E: completed FSDP and VeOmni TileLang/non-fused cases matched the golden loss and gradient tolerances. - Qwen3-VL-2B-Instruct SFT E2E: completed FSDP and VeOmni TileLang/non-fused cases matched the golden tolerances. - Megatron TP2/PP2/CP1 TileLang reached the optimizer after successful forward/backward for both LLM and VLM. Full local completion is blocked by the installed TransformerEngine wheel lacking Blackwell kernels (multi_tensor_apply); CP2 is similarly blocked in TransformerEngine CP attention before the output head. ### API and Usage Example yaml model: use_fused_kernels: true fused_kernel_options: impl_backend: tilelang TileLang is required when auxiliary top-k labels are passed for distillation or score centering. Triton and Liger retain their existing single-label behavior and fail explicitly for unsupported multi-label input. ### Design & Code Changes - Implements TileLang forward and backward kernels for fused projection, selected log probabilities, and entropy, including tensor-parallel vocabulary reductions. - Preserves duplicate top-k labels and accumulates all corresponding backward contributions. - Routes shared fused-output-head calls through one linear_cross_entropy dispatcher. - Passes auxiliary labels through FSDP, Megatron, and VeOmni model paths and lets distillation/score-centering losses consume differentiable precomputed top-k log probabilities. - Adds unit, multi-GPU, SP/CP/TP, and E2E coverage and documents the TileLang backend option. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/verl-project/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always - [x] Add / Update [the documentation](https://github.com/verl-project/verl/tree/main/docs). - [x] Add unit or end-to-end test(s) to [the CI workflow](https://github.com/verl-project/verl/tree/main/.github/workflows) to cover all the code. - [ ] Once the PR is ready for CI, send a message in the ci-request channel. AI assistance was used for implementation, testing, and drafting this PR. The human submitter remains responsible for reviewing every changed line and defending the change end-to-end. --------- Co-authored-by: Cursor <cursoragent@cursor.com> | 10 days ago |