Skip to content

[trainer] feat: support BAGEL non-lora training with pickscore reward#218

Open
zhtmike wants to merge 5 commits into
verl-project:mainfrom
zhtmike:bagel_non_lora
Open

[trainer] feat: support BAGEL non-lora training with pickscore reward#218
zhtmike wants to merge 5 commits into
verl-project:mainfrom
zhtmike:bagel_non_lora

Conversation

@zhtmike

@zhtmike zhtmike commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Support bagel non-lora training.

  • Add run_bagel_pickscore.sh for BAGEL non-LoRA FlowGRPO training
  • Add DiffusionModelBase.configure_trainable_params hook for non-LoRA requires_grad control
  • Freeze understanding pathway, train moe_gen only, cast to fp32
  • Call configure_trainable_params in engine when lora_rank=0, before FSDP wrapping
  • Route actor-synced transformer.* weights through language_model.load_weights for qkv fusion
  • Fix RoPE cos/sin dtype mismatch
  • Fix NonDiffusersModelBase metaclass to explicit ABCMeta

Add concise overview of what this PR aims to achieve or accomplish. Reference related GitHub issues and PRs that help with the review.

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, vllm_omni, rollout, trainer, ci, training_utils, recipe, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data, cfg, reward, diffusion, omni, tests, docker
    • If this PR involves multiple modules, separate them with , like [diffusion, 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][diffusion, fsdp] feat: new rollout scheduler

Test

For changes that can not be tested by CI (e.g., algorithm implementation, new model support), validate by experiment(s) and show results like training curve plots, evaluation results, etc.

API and Usage Example

Demonstrate how the API changes if any, and provide usage example(s) if possible.

# Add code snippet or script demonstrating how to use this

Design & Code Changes

Demonstrate the high-level design if this PR is complex, and list the specific changes.

Checklist Before Submitting

Important

Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review.

  • Read the Contribute Guide.
  • Apply pre-commit checks: pre-commit install && pre-commit run --all-files --show-diff-on-failure --color=always
  • Add / Update the documentation.
  • Add unit or end-to-end test(s) to the CI workflow to cover all the code. If not feasible, explain why: ...

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for non-LoRA full-weight training for the BAGEL model, enabling selective parameter freezing via a new configure_trainable_params hook and integrating FSDP2 to handle mixed parameter training. It also adds a new run script, updates documentation, and refactors weight loading and rotary embedding casting. The review feedback highlights a potential runtime TypeError and generator exhaustion issue in the weight-loading adapter, a precision degradation concern in the rotary embedding computation, and a suggestion to make the model path in the run script configurable via environment variables.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread verl_omni/pipelines/bagel_flow_grpo/vllm_omni_rollout_adapter.py
Comment thread verl_omni/pipelines/bagel_flow_grpo/bagel_model.py Outdated
Comment thread examples/flowgrpo_trainer/run_bagel_pickscore.sh
@zhtmike zhtmike marked this pull request as ready for review June 30, 2026 09:08
@zhtmike zhtmike requested a review from SamitHuang as a code owner June 30, 2026 09:08
@zhtmike

zhtmike commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

code is ready to review; the wandb result is at https://wandb.ai/mikecheung/flow_grpo/runs/ybv9jf3y, I will update the PR's content once it nearly finish training

@zhtmike zhtmike added the ready-for-ci read for running CI label Jun 30, 2026
@github-actions github-actions Bot removed the ready-for-ci read for running CI label Jun 30, 2026
@SamitHuang SamitHuang added the ready-for-ci read for running CI label Jul 1, 2026

@SamitHuang SamitHuang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhtmike

zhtmike commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

there is a slightly model degration compared with lora, let me check first

@github-actions github-actions Bot removed the ready-for-ci read for running CI label Jul 3, 2026
@zhtmike zhtmike added the ready-for-ci read for running CI label Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-ci read for running CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants