Skip to content

Comments

[FEAT] Add the support for more VLMs(Gemma3)#1613

Closed
Qsingle wants to merge 0 commit intoverl-project:mainfrom
Qsingle:main
Closed

[FEAT] Add the support for more VLMs(Gemma3)#1613
Qsingle wants to merge 0 commit intoverl-project:mainfrom
Qsingle:main

Conversation

@Qsingle
Copy link

@Qsingle Qsingle commented May 21, 2025

Checklist Before Starting

  • Search for similar PR(s).

What does this PR do?

Add initial support for Gemma3

High-Level Design

Abstract the preprocess procedure for LMMs, make it easy to add new Multi-Modal

Specific Changes

Add the preprocessor API in the verl.utils.dataset
Modify the verl.utils.dataset.rl_dataset to support the preprocessor API.

API

Add the preprocessor for the multi-modality model.

Usage Example

Provide usage example(s) for easier usage.

set -x
ENGINE=${1:-vllm}
export NCCL_DEBUG=WARN


python3 -m verl.trainer.main_ppo \
    algorithm.adv_estimator=grpo \
    data.train_files=prepared_data/colon_data/train.parquet \
    data.val_files=prepared_data/colon_data/train.parquet \
    data.train_batch_size=4 \
    data.max_prompt_length=4096 \
    data.max_response_length=2048 \
    data.filter_overlong_prompts=True \
    data.truncation='error' \
    data.image_key=images \
    actor_rollout_ref.model.path=Google/gemma-3-12b-it \
    actor_rollout_ref.model.trust_remote_code=True \
    actor_rollout_ref.actor.optim.lr=2e-6 \
    actor_rollout_ref.model.use_remove_padding=True \
    actor_rollout_ref.actor.ppo_mini_batch_size=2 \
    actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2 \
    actor_rollout_ref.actor.use_kl_loss=True \
    actor_rollout_ref.actor.kl_loss_coef=0.01 \
    actor_rollout_ref.actor.kl_loss_type=low_var_kl \
    actor_rollout_ref.actor.entropy_coeff=0 \
    actor_rollout_ref.model.enable_gradient_checkpointing=True \
    actor_rollout_ref.actor.fsdp_config.param_offload=False \
    actor_rollout_ref.actor.fsdp_config.optimizer_offload=False \
    actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=2 \
    actor_rollout_ref.rollout.tensor_model_parallel_size=1 \
    actor_rollout_ref.rollout.name=$ENGINE \
    actor_rollout_ref.rollout.gpu_memory_utilization=0.6 \
    actor_rollout_ref.rollout.enable_chunked_prefill=False \
    actor_rollout_ref.rollout.enforce_eager=False \
    actor_rollout_ref.rollout.free_cache_engine=False \
    actor_rollout_ref.rollout.n=4 \
    actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=2 \
    actor_rollout_ref.ref.fsdp_config.param_offload=True \
    algorithm.use_kl_in_reward=False \
    trainer.critic_warmup=0 \
    trainer.logger=['console','wandb'] \
    trainer.project_name='verl_grpo_colon' \
    trainer.experiment_name='gemma3_12b_it_colon' \
    trainer.n_gpus_per_node=1 \
    trainer.nnodes=1 \
    trainer.save_freq=3000 \
    trainer.val_before_train=False \
    custom_reward_function.path="rewards/colon.py" \
    custom_reward_function.name=compute_score \
    trainer.test_freq=-1 \
    trainer.total_epochs=15 $@

Test

  • To verify the model. Currently, my GPU does not support me in verifying the training of the model, like Gemma3 (Out of Memory on the GPU). But I have checked that the support for the Qwen2VL series is not broken by this PR.

The training curve for InternVl2.5-1B
image

The training curve for InternVL3-1B
image

Additional Info.

Checklist Before Submitting

  • Read the Contribute Guide.
  • Apply pre-commit checks.
  • Add [BREAKING] to the PR title if it breaks any API.
  • Update the documentation about your changes in the docs.
  • Add CI test(s) if necessary.

@Qsingle Qsingle force-pushed the main branch 2 times, most recently from 1e5b0b2 to 6d1195a Compare May 21, 2025 09:00
@ShareLer ShareLer mentioned this pull request May 22, 2025
6 tasks
@Qsingle Qsingle force-pushed the main branch 2 times, most recently from 07a24f3 to 9a3f0f1 Compare May 23, 2025 07:46
@eric-haibin-lin eric-haibin-lin requested a review from hiyouga May 27, 2025 20:39
hiyouga pushed a commit that referenced this pull request May 30, 2025
### Checklist Before Starting

- [x] Search for similar PR(s).
Some code will conflict with this PR #1613 

### What does this PR do?

Add initial support for Kimi_vl;
Add sp patch for kimi_vl.

### High-Level Design

> Demonstrate the high-level design if this PR is complex.

### Specific Changes

- Add some minor changes to be compatible with kimi_vl
- Add patch to support ulysses_sequence_parallel

### API

> Demonstrate how the API changes if any.

### Usage Example

```bash

python3 -m verl.trainer.main_ppo \
    algorithm.adv_estimator=grpo \
    data.train_files=$DATA_PATH/geo3k/test.parquet \
    data.val_files=$DATA_PATH/geo3k/test.parquet \
    data.train_batch_size=16 \
    data.max_prompt_length=2048 \
    data.max_response_length=4096 \
    data.filter_overlong_prompts=True \
    data.truncation='error' \
    data.image_key=images \
    data.shuffle=False \
    +data.trust_remote_code=True \
    actor_rollout_ref.model.path=moonshotai/Kimi-VL-A3B-Instruct \
    actor_rollout_ref.actor.optim.lr=1e-6 \
    actor_rollout_ref.model.use_remove_padding=True \
    actor_rollout_ref.actor.ulysses_sequence_parallel_size=2 \
    actor_rollout_ref.actor.ppo_mini_batch_size=8 \
    actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.actor.use_kl_loss=True \
    actor_rollout_ref.actor.kl_loss_coef=0.01 \
    actor_rollout_ref.actor.kl_loss_type=low_var_kl \
    actor_rollout_ref.actor.entropy_coeff=0 \
    actor_rollout_ref.model.enable_gradient_checkpointing=False \
    actor_rollout_ref.model.trust_remote_code=True \
    actor_rollout_ref.actor.fsdp_config.param_offload=True \
    actor_rollout_ref.actor.fsdp_config.optimizer_offload=True \
    actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.rollout.tensor_model_parallel_size=8\
    actor_rollout_ref.rollout.name=vllm \
    actor_rollout_ref.rollout.gpu_memory_utilization=0.6 \
    actor_rollout_ref.rollout.enable_chunked_prefill=False \
    actor_rollout_ref.rollout.enforce_eager=False \
    actor_rollout_ref.rollout.free_cache_engine=False \
    actor_rollout_ref.rollout.n=8 \
    actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.ref.fsdp_config.param_offload=True \
    algorithm.use_kl_in_reward=False \
    trainer.val_before_train=False \
    trainer.critic_warmup=0 \
    trainer.logger=['console','wandb'] \
    trainer.project_name='Kimi_VL_test' \
    trainer.experiment_name='kimi_vl_grpo_geo3k_cp2' \
    trainer.n_gpus_per_node=8\
    trainer.nnodes=1\
    trainer.save_freq=50 \
    trainer.test_freq=5 \
    trainer.total_epochs=15 $@

```


### Test & Problem
During the dev, I discovered some issues, but they did not affect the
code for this PR.
Existing problems:(with vllm==0.8.5.post1)
- Occasional errors of vllm
```python
  File "/home/sharele/anaconda3/lib/python3.11/site-packages/vllm/v1/attention/backends/mla/common.py", line 504, in build
    self.page_size)
    ^^^^^^^^^^^^^^
AttributeError: 'MLACommonMetadataBuilder' object has no attribute 'page_size'
```
releated: vllm-project/vllm#16908
Reference this method to avoid the problem temporarily:
vllm-project/vllm#16908 (comment)

- Garbled output from vllm under specific circumstances
During test, I found that when SamplingParams.n > 1,vllm's output is
some meaningless characters or keeps repeating. This will affect grpo.

releated: vllm-project/vllm#18378
Note: Using the Hopper architecture gpu can avoid this problem, but it
is not clear whether there are still potential issues.


Training curve:
The training curve will comming soon after I solve the second problem.


### Additional Info.

- **Issue Number**: #1428 
- **Training**: FSDP
- **Inference**: vLLM

### Checklist Before Submitting

- [ ] Read the [Contribute
Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide).
- [ ] Apply [pre-commit
checks](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting).
- [ ] Add `[BREAKING]` to the PR title if it breaks any API.
- [ ] Update the documentation about your changes in the
[docs](https://github.com/volcengine/verl/tree/main/docs).
- [ ] Add CI test(s) if necessary.

---------

Signed-off-by: ShareLer <ShareLe@163.com>
@eric-haibin-lin
Copy link
Collaborator

Thanks for the PR! We noticed that hf transformer is doing refactoring for the vlm model interface. We will temporarily pause merging effort to avoid too much adhoc model specific integration code brought by vlm

@Qsingle
Copy link
Author

Qsingle commented Jun 1, 2025

Thanks for the PR! We noticed that hf transformer is doing refactoring for the vlm model interface. We will temporarily pause merging effort to avoid too much adhoc model specific integration code brought by vlm

Yeah, I've also noticed that. The latest Transformers has some conflicts with the VLLM. I will try to add the code to resolve these conflicts and ensure version compatibility.

@heli-qi
Copy link

heli-qi commented Jun 5, 2025

Thank you for your brilliant work! I’m interested in using Gemma3 as the base to perform RL training and I have tested your PR committed codes on my own machine.
However, I have encountered a problem of Gibberish output of VLLM rollout model during training. Below is my training configuration and machine environment:
I would appreciate it if you could have a look at my logs and give your suggestions on how to solve the problem!

training configuration

algorithm:
  adv_estimator: grpo
  use_kl_in_reward: False

data:
  train_files: xxx/xxx.train.parquet
  val_files: xxx/xxx.test.parquet
  train_batch_size: 800
  max_prompt_length: 2048
  max_response_length: 4096
  filter_overlong_prompts: True
  truncation: 'error'

actor_rollout_ref:
  model:
    path: google/gemma-3-4b-it
    use_remove_padding: True
    enable_gradient_checkpointing: True
    trust_remote_code: True

  actor:
    optim:
      lr: 1e-6
    ppo_mini_batch_size: 256
    ppo_micro_batch_size_per_gpu: 32
    use_kl_loss: True
    kl_loss_coef: 0.001
    kl_loss_type: low_var_kl
    entropy_coeff: 0
    fsdp_config:
      param_offload: False
      optimizer_offload: False
      model_dtype: bfloat16

  rollout:
    name: vllm
    log_prob_micro_batch_size_per_gpu: 32
    tensor_model_parallel_size: 1
    limit_images: 1
    gpu_memory_utilization: 0.6
    n: 5
    # new
    enable_chunked_prefill: False
    enforce_eager: False
    free_cache_engine: False

  ref:
    log_prob_micro_batch_size_per_gpu: 32
    fsdp_config:
      param_offload: True
      model_dtype: bfloat16

trainer:
  critic_warmup: 0
  logger: ['console']
  n_gpus_per_node: 1
  nnodes: 2
  save_freq: 1 # should be larger than 0, -1 & 0 will disable checkpointing
  test_freq: 5
  total_epochs: 15

custom_reward_function:
  path: xxx/xxx.py
  name: compute_score

machine environment

vllm==0.8.6

vllm                                     0.8.6
sglang                                   0.4.6.post4
pyarrow                                  20.0.0
tensordict                               0.6.2+88c86f8
nvidia-cudnn-cu12                        9.8.0.87
ray                                      2.46.0
torch                                    2.7.0+cu128
torch_memory_saver                       0.0.6
torchao                                  0.11.0
torchaudio                               2.7.0
torchdata                                0.11.0
torchvision                              0.22.0
hf_transfer                              0.1.9
transformer_engine                       2.2.0+c55e425
transformers                             4.52.4
flash_attn                               2.7.4.post1
flashinfer-python                        0.2.3

I could execute the training job by this environment but I got the Gibberish output of my rollout model like:

[response] 俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 Saltar Saltar俥俥俥 Saltar Saltar俥俥俥俥 Saltar Saltar俥俥俥 Saltar Saltar俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 Saltar Latinoamérica俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 Saltar Saltar俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 Saltar Latinoamérica俥俥俥俥俥俥 Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica plur plur plur俥俥俥俥俥俥俥俥 plur俥俥俥 plur俥 plur俥 plur俥 plur俥 plur俥 plur俥 plur俥 plur俥 plur俥 plurรรรร plurรรรรรร俥 plurรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรร whorรร Saltarรร Saltarรร Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltarreported Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltarreported Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltarreported Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltarreported Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltarreported俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 congratulate congratulate俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 congratulate congratulate俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 congratulate congratulate俥俥俥俥俥俥俥俥俥俥 congratulate congratulate congratulate俥俥俥俥俥俥俥俥俥 congratulate congratulate俥俥俥俥俥 congratulate congratulate俥俥俥 congratulate congratulate俥俥俥俥俥 congratulate congratulate俥俥俥 congratulate congratulate俥俥俥 congratulate congratulate俥俥俥 congratulate congratulate俥俥俥 congratulate congratulate俥俥俥 congratulate congratulate congratulate俥俥 congratulate congratulate俥俥俥 congratulate congratulate congratulate congratulate俥俥俥 congratulate congratulate congratulate congratulate俥俥 congratulate congratulate俥俥俥 congratulate congratulate congratulate俥俥 congratulate congratulate congratulate俥俥 congratulate congratulate俥俥俥 congratulate congratulate congratulate congratulate俥俥 congratulate congratulate俥俥 congratulate congratulate congratulate俥俥 congratulate congratulate congratulate俥俥俥 congratulate congratulate俥俥 congratulate congratulate俥俥俥 congratulate congratulate congratulate俥俥俥 congratulate congratulate俥俥 congratulate congratulate congratulate俥俥 congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate congratulate俥俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate continú continú dedic congratulate俥俥 continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú bạch continú continú continú continú continú continú continú continú continú continú continú bạch continú continú continú continú continú continú continú continú continú continú continú bạch bạch continú continú continú continú continú continú continú continú continú continú continú continú continú continú bạch bạch continú continú continú continú continú continú continú continú continú continú continú continú continú bạch bạch bạch continú continú continú continú continú continú continú continú continú continú bạch bạch bạch continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú एमसी bạch एमसी continú एमसी bạch एमसी continú एमसी bạch congratulate continú continú continú bạch bạch bạch bạch bạch bạch bạch bạch bạch continú एमसी bạch एमसी bạch congratulate एमसी bạch congratulate एमसी bạch congratulate एमसी whor transc एमसी whor एमसी whor एमसी whor transc एमसी एमसी एमसी एमसी bạch congratulate एमसी whor एमसी whor एमसी whor एमसी एमसी एमसी एमसी एमसी एमसी एमसी bạch congratulate एमसी whor transc एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी bạch congratulate एमसी bạch congratulate एमसी whor transc एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी bạch congratulate एमसी bạch congratulate एमसी bạch congratulate एमसी bạch congratulate एमसी whorစီ एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी bạch एमसी congratulate एमसी bạch congratulate एमसी bạch congratulate एमसी bạch congratulate एमसी bạch congratulate एमसी bạch एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी एमसीᄎ एमसी एमसीᄎ एमसी congratulate एमसीᄎ एमसी एमसीᄎ एमसी congratulate एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसी congratulate एमसीᄎ एमसी एमसीᄎ एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी congratulate एमसीᄎ एमसीᄎ एमसी एमसीᄎ एमसी एमसीᄎ एमसीᄎ एमसीᄎ एमसीᄎ एमसी एमसीᄎ एमसीᄎ एमसीᄎ एमसीᄎᄎᄎ एमसीᄎ एमसी एमसीᄎᄎҒ congratulateᄎᄎᄎᄎᄎ एमसीᄎᄎᄎᄎᄎᄎᄎᄎҒ एमसी congratulateᄎᄎҒᄎ एमसीᄎᄎᄎᄎᄎᄎᄎҒ एमसी congratulateᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ एमसी congratulateᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ एमसीᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒҒᄎ congratulateᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒҒᄎ एमसीᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒᄎᄎᄎᄎᄎᄎҒᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ랙 congratulateᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ랙ҒᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ랙ҒᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ랙ҒҒᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ랙 congratulateᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎ랙랙랙ᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎ랙랙ᄎᄎᄎᄎᄎ랙랙랙ᄎᄎᄎᄎᄎ랙랙랙ᄎᄎᄎᄎ랙랙랙ᄎᄎᄎᄎ랙랙ᄎᄎᄎᄎ랙랙랙ᄎᄎᄎᄎ랙랙랙ᄎ zoomᄎ bạch cataracts cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch cataracts bạch bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom bạch bạch cataracts bạch zoom zoom bạch cataracts bạch zoom bạch cataracts bạch zoom zoom bạch bạch cataracts zoom bạch bạch cataracts zoom bạch zoom zoom bạch bạch cataracts zoom bạch bạch cataracts bạch zoom zoom bạch cataracts bạch zoom zoom bạch cataracts bạch zoom zoom bạch bạch cataracts zoom bạch zoom zoom bạch cataracts bạch zoom bạch cataracts bạch zoom zoom bạch cataracts bạch zoom zoom bạch cataracts bạch zoom zoom專 bạch whor cataracts bạch whor zoom專 cataracts whor bạch whor zoom專 cataracts whor專 cataracts專 cataracts whor whor whor專專 cataracts專 cataracts專 cataracts專 cataracts專專 cataracts專 cataracts專 cataracts專專 cataractsனுக்கு專 cataractsனுக்கு專 cataracts專 cataracts專專 cataractsனுக்கு專னுக்கு congratulateனுக்கு whorனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குதத బ బ బனுக்குனுக்குனுக்குனுக்கு బனுக்குனுக்கு బனுக்குனுக்கு బனுக்குனுக்குனுக்கு బனுக்குனுக்கு బனுக்குனுக்கு బனுக்குனுக்கு బனுக்கு特征னுக்கு బனுக்குனுக்கு బ బனுக்குதனுக்கு బ బ బத特征 బ బ特征特征特征特征特征 బ బ బதத బ బ బ特征特征特征特征特征特征特征 బ బ బ బ

vllm==0.8.5.post1

I have also tested the same configuration on the following environment:

vllm                                     0.8.5.post1
sglang                                   0.4.6.post4
pyarrow                                  20.0.0
tensordict                               0.6.2
nvidia-cudnn-cu12                        9.8.0.87
ray                                      2.46.0
flashinfer-python                        0.2.2.post1+cu124torch2.6
torch                                    2.6.0+cu124
torch_memory_saver                       0.0.6
torchao                                  0.9.0
torchaudio                               2.6.0
torchdata                                0.11.0
torchvision                              0.21.0
hf_transfer                              0.1.9
transformer_engine                       2.2.0+c55e425
transformers                             4.52.4
flash_attn                               2.7.4.post1
flashinfer-python                        0.2.2.post1+cu124torch2.6

But this time, I cannot execute the training job and got the following exception:

Traceback (most recent call last):
  File "/home/jovyan/workspace/verl/verl/trainer/main_ppo.py", line 64, in main
    run_ppo(config)
  File "/home/jovyan/workspace/verl/verl/trainer/main_ppo.py", line 76, in run_ppo
    ray.get(runner.run.remote(config))
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/ray/_private/auto_init_hook.py", line 21, in auto_init_wrapper
    return fn(*args, **kwargs)
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/ray/_private/client_mode_hook.py", line 103, in wrapper
    return func(*args, **kwargs)
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/ray/_private/worker.py", line 2822, in get
    values, debugger_breakpoint = worker.get_objects(object_refs, timeout=timeout)
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/ray/_private/worker.py", line 930, in get_objects
    raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(AssertionError): ray::TaskRunner.run() (pid=5313, ip=192.168.189.144, actor_id=8d5eef0858395d7c9f2aec8001000000, repr=<main_ppo.TaskRunner object at 0x7fb3f9aac130>)
  File "/home/jovyan/workspace/verl/verl/trainer/main_ppo.py", line 183, in run
    trainer.fit()
  File "/home/jovyan/workspace/verl/verl/trainer/ppo/ray_trainer.py", line 870, in fit
    val_metrics = self._validate()
  File "/home/jovyan/workspace/verl/verl/trainer/ppo/ray_trainer.py", line 606, in _validate
    test_output_gen_batch_padded = self.actor_rollout_wg.generate_sequences(test_gen_batch_padded)
  File "/home/jovyan/workspace/verl/verl/single_controller/ray/base.py", line 49, in func
    output = ray.get(output)
ray.exceptions.RayTaskError(AssertionError): ray::WorkerDict.actor_rollout_generate_sequences() (pid=6742, ip=192.168.189.144, actor_id=3973d61696f5e8257f7cf27801000000, repr=<verl.single_controller.ray.base.WorkerDict object at 0x7faad0dbddb0>)
  File "/home/jovyan/workspace/verl/verl/single_controller/ray/base.py", line 625, in func
    return getattr(self.worker_dict[key], name)(*args, **kwargs)
  File "/home/jovyan/workspace/verl/verl/single_controller/base/decorator.py", line 534, in inner
    return func(*args, **kwargs)
  File "/home/jovyan/workspace/verl/verl/workers/fsdp_workers.py", line 645, in generate_sequences
    output = self.rollout.generate_sequences(prompts=prompts)
  File "/home/jovyan/workspace/verl/verl/utils/debug/performance.py", line 78, in f
    return self.log(decorated_function, *args, **kwargs)
  File "/home/jovyan/workspace/verl/verl/utils/debug/performance.py", line 88, in log
    output = func(*args, **kwargs)
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/home/jovyan/workspace/verl/verl/workers/rollout/vllm_rollout/vllm_rollout_spmd.py", line 277, in generate_sequences
    outputs = self.inference_engine.generate(
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/utils.py", line 1196, in inner
    return fn(*args, **kwargs)
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/entrypoints/llm.py", line 465, in generate
    self._validate_and_add_requests(
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/entrypoints/llm.py", line 1354, in _validate_and_add_requests
    self._add_request(
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/entrypoints/llm.py", line 1372, in _add_request
    self.llm_engine.add_request(
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/v1/engine/llm_engine.py", line 183, in add_request
    prompt_str, request = self.processor.process_inputs(
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/v1/engine/processor.py", line 275, in process_inputs
    ) = merge_and_sort_multimodal_metadata(
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/multimodal/utils.py", line 318, in merge_and_sort_multimodal_metadata
    assert len(modalities) > 0, "No modalities found in the mm_positions."
AssertionError: No modalities found in the mm_positions.

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

params key mismatch of Gemma3 between transformers and vllm

I have noticed a mismatch between the params key of state_dict of HF Gemma3 model and VLLM Gemma3 model and add the following codes to
verl.verl.workers.sharding_manager.fsdp_vllm.py:

def update_params(self, updated_params):
    model = self.model_runner.model
    patch_vllm_moe_model_weight_loader(model)
    device = torch.cuda.current_device()  # used when fsdp2 set cpu_offload_policy

    # ++ start ++
    from vllm.model_executor.models.gemma3_mm import Gemma3ForConditionalGeneration
    from transformers import Gemma3ForConditionalGeneration as Gemma3ForConditionalGenerationHF

    if (isinstance(model, Gemma3ForConditionalGeneration) and
            hasattr(Gemma3ForConditionalGenerationHF, "_checkpoint_conversion_mapping")):
        params_map = Gemma3ForConditionalGenerationHF._checkpoint_conversion_mapping
        params_map = {v: k.strip("^") for k, v in params_map.items()}
        logger.info(f"Remapping the params keys of actor module to vllm rollout model by {params_map}")

        _updated_params = {}
        for name, param in updated_params.items():
            new_name = None
            for k, v in params_map.items():
                if k in name:
                    new_name = name.replace(k, v, 1)
                    break
            if new_name is None:
                new_name = name
            _updated_params[new_name] = param
        updated_params = _updated_params
        del _updated_params
    # ++ end ++

    loaded_params = model.load_weights(((name, param.to(device, non_blocking=True).full_tensor() if isinstance(param, DTensor) else param) for name, param in updated_params.items()))
    logger.info("vLLM load weights, loaded_params: %d", len(loaded_params))

More info

I could successfully launch the Gemma3 model by either transformers or vllm alone in my environment and get reasonable output.
Also, when I change the actor_rollout_ref.rollout.name=hf, the rollout model can give reasonable output during training.
Therefore, I'm wondering whether I have not fully covered all the aspects to deal with this key mismatch.
Or, could you let me know are there any points that I have overseen in your implementations?

@Qsingle
Copy link
Author

Qsingle commented Jun 6, 2025

Thank you for your brilliant work! I’m interested in using Gemma3 as the base to perform RL training and I have tested your PR committed codes on my own machine. However, I have encountered a problem of Gibberish output of VLLM rollout model during training. Below is my training configuration and machine environment: I would appreciate it if you could have a look at my logs and give your suggestions on how to solve the problem!

training configuration

algorithm:
  adv_estimator: grpo
  use_kl_in_reward: False

data:
  train_files: xxx/xxx.train.parquet
  val_files: xxx/xxx.test.parquet
  train_batch_size: 800
  max_prompt_length: 2048
  max_response_length: 4096
  filter_overlong_prompts: True
  truncation: 'error'

actor_rollout_ref:
  model:
    path: google/gemma-3-4b-it
    use_remove_padding: True
    enable_gradient_checkpointing: True
    trust_remote_code: True

  actor:
    optim:
      lr: 1e-6
    ppo_mini_batch_size: 256
    ppo_micro_batch_size_per_gpu: 32
    use_kl_loss: True
    kl_loss_coef: 0.001
    kl_loss_type: low_var_kl
    entropy_coeff: 0
    fsdp_config:
      param_offload: False
      optimizer_offload: False
      model_dtype: bfloat16

  rollout:
    name: vllm
    log_prob_micro_batch_size_per_gpu: 32
    tensor_model_parallel_size: 1
    limit_images: 1
    gpu_memory_utilization: 0.6
    n: 5
    # new
    enable_chunked_prefill: False
    enforce_eager: False
    free_cache_engine: False

  ref:
    log_prob_micro_batch_size_per_gpu: 32
    fsdp_config:
      param_offload: True
      model_dtype: bfloat16

trainer:
  critic_warmup: 0
  logger: ['console']
  n_gpus_per_node: 1
  nnodes: 2
  save_freq: 1 # should be larger than 0, -1 & 0 will disable checkpointing
  test_freq: 5
  total_epochs: 15

custom_reward_function:
  path: xxx/xxx.py
  name: compute_score

machine environment

vllm==0.8.6

vllm                                     0.8.6
sglang                                   0.4.6.post4
pyarrow                                  20.0.0
tensordict                               0.6.2+88c86f8
nvidia-cudnn-cu12                        9.8.0.87
ray                                      2.46.0
torch                                    2.7.0+cu128
torch_memory_saver                       0.0.6
torchao                                  0.11.0
torchaudio                               2.7.0
torchdata                                0.11.0
torchvision                              0.22.0
hf_transfer                              0.1.9
transformer_engine                       2.2.0+c55e425
transformers                             4.52.4
flash_attn                               2.7.4.post1
flashinfer-python                        0.2.3

I could execute the training job by this environment but I got the Gibberish output of my rollout model like:

[response] 俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 Saltar Saltar俥俥俥 Saltar Saltar俥俥俥俥 Saltar Saltar俥俥俥 Saltar Saltar俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 Saltar Latinoamérica俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 Saltar Saltar俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 Saltar Latinoamérica俥俥俥俥俥俥 Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica Latinoamérica plur plur plur俥俥俥俥俥俥俥俥 plur俥俥俥 plur俥 plur俥 plur俥 plur俥 plur俥 plur俥 plur俥 plur俥 plur俥 plurรรรร plurรรรรรร俥 plurรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรร whorรร Saltarรร Saltarรร Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltarreported Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltarreported Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltarreported Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltarreported Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltar Saltarreported俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 congratulate congratulate俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 congratulate congratulate俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥俥 congratulate congratulate俥俥俥俥俥俥俥俥俥俥 congratulate congratulate congratulate俥俥俥俥俥俥俥俥俥 congratulate congratulate俥俥俥俥俥 congratulate congratulate俥俥俥 congratulate congratulate俥俥俥俥俥 congratulate congratulate俥俥俥 congratulate congratulate俥俥俥 congratulate congratulate俥俥俥 congratulate congratulate俥俥俥 congratulate congratulate俥俥俥 congratulate congratulate congratulate俥俥 congratulate congratulate俥俥俥 congratulate congratulate congratulate congratulate俥俥俥 congratulate congratulate congratulate congratulate俥俥 congratulate congratulate俥俥俥 congratulate congratulate congratulate俥俥 congratulate congratulate congratulate俥俥 congratulate congratulate俥俥俥 congratulate congratulate congratulate congratulate俥俥 congratulate congratulate俥俥 congratulate congratulate congratulate俥俥 congratulate congratulate congratulate俥俥俥 congratulate congratulate俥俥 congratulate congratulate俥俥俥 congratulate congratulate congratulate俥俥俥 congratulate congratulate俥俥 congratulate congratulate congratulate俥俥 congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate congratulate俥俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate congratulate俥俥 continú congratulate continú continú dedic congratulate俥俥 continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú bạch continú continú continú continú continú continú continú continú continú continú continú bạch continú continú continú continú continú continú continú continú continú continú continú bạch bạch continú continú continú continú continú continú continú continú continú continú continú continú continú continú bạch bạch continú continú continú continú continú continú continú continú continú continú continú continú continú bạch bạch bạch continú continú continú continú continú continú continú continú continú continú bạch bạch bạch continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú continú एमसी bạch एमसी continú एमसी bạch एमसी continú एमसी bạch congratulate continú continú continú bạch bạch bạch bạch bạch bạch bạch bạch bạch continú एमसी bạch एमसी bạch congratulate एमसी bạch congratulate एमसी bạch congratulate एमसी whor transc एमसी whor एमसी whor एमसी whor transc एमसी एमसी एमसी एमसी bạch congratulate एमसी whor एमसी whor एमसी whor एमसी एमसी एमसी एमसी एमसी एमसी एमसी bạch congratulate एमसी whor transc एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी bạch congratulate एमसी bạch congratulate एमसी whor transc एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी bạch congratulate एमसी bạch congratulate एमसी bạch congratulate एमसी bạch congratulate एमसी whorစီ एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी bạch एमसी congratulate एमसी bạch congratulate एमसी bạch congratulate एमसी bạch congratulate एमसी bạch congratulate एमसी bạch एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसी एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी congratulate एमसीᄎ एमसी एमसीᄎ एमसी एमसीᄎ एमसी congratulate एमसीᄎ एमसी एमसीᄎ एमसी congratulate एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसी congratulate एमसीᄎ एमसी एमसीᄎ एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी एमसी एमसीᄎ एमसी congratulate एमसीᄎ एमसीᄎ एमसी एमसीᄎ एमसी एमसीᄎ एमसीᄎ एमसीᄎ एमसीᄎ एमसी एमसीᄎ एमसीᄎ एमसीᄎ एमसीᄎᄎᄎ एमसीᄎ एमसी एमसीᄎᄎҒ congratulateᄎᄎᄎᄎᄎ एमसीᄎᄎᄎᄎᄎᄎᄎᄎҒ एमसी congratulateᄎᄎҒᄎ एमसीᄎᄎᄎᄎᄎᄎᄎҒ एमसी congratulateᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ एमसी congratulateᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ एमसीᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒҒᄎ congratulateᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒҒᄎ एमसीᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒᄎᄎᄎᄎᄎᄎҒᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ랙 congratulateᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ랙ҒᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ랙ҒᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ랙ҒҒᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎҒ랙 congratulateᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎ랙랙랙ᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎᄎ랙랙ᄎᄎᄎᄎᄎ랙랙랙ᄎᄎᄎᄎᄎ랙랙랙ᄎᄎᄎᄎ랙랙랙ᄎᄎᄎᄎ랙랙ᄎᄎᄎᄎ랙랙랙ᄎᄎᄎᄎ랙랙랙ᄎ zoomᄎ bạch cataracts cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch cataracts bạch bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom zoom bạch bạch cataracts bạch zoom bạch bạch cataracts bạch zoom zoom bạch cataracts bạch zoom bạch cataracts bạch zoom zoom bạch bạch cataracts zoom bạch bạch cataracts zoom bạch zoom zoom bạch bạch cataracts zoom bạch bạch cataracts bạch zoom zoom bạch cataracts bạch zoom zoom bạch cataracts bạch zoom zoom bạch bạch cataracts zoom bạch zoom zoom bạch cataracts bạch zoom bạch cataracts bạch zoom zoom bạch cataracts bạch zoom zoom bạch cataracts bạch zoom zoom專 bạch whor cataracts bạch whor zoom專 cataracts whor bạch whor zoom專 cataracts whor專 cataracts專 cataracts whor whor whor專專 cataracts專 cataracts專 cataracts專 cataracts專專 cataracts專 cataracts專 cataracts專專 cataractsனுக்கு專 cataractsனுக்கு專 cataracts專 cataracts專專 cataractsனுக்கு專னுக்கு congratulateனுக்கு whorனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குனுக்குதத బ బ బனுக்குனுக்குனுக்குனுக்கு బனுக்குனுக்கு బனுக்குனுக்கு బனுக்குனுக்குனுக்கு బனுக்குனுக்கு బனுக்குனுக்கு బனுக்குனுக்கு బனுக்கு特征னுக்கு బனுக்குனுக்கு బ బனுக்குதனுக்கு బ బ బத特征 బ బ特征特征特征特征特征 బ బ బதத బ బ బ特征特征特征特征特征特征特征 బ బ బ బ

vllm==0.8.5.post1

I have also tested the same configuration on the following environment:

vllm                                     0.8.5.post1
sglang                                   0.4.6.post4
pyarrow                                  20.0.0
tensordict                               0.6.2
nvidia-cudnn-cu12                        9.8.0.87
ray                                      2.46.0
flashinfer-python                        0.2.2.post1+cu124torch2.6
torch                                    2.6.0+cu124
torch_memory_saver                       0.0.6
torchao                                  0.9.0
torchaudio                               2.6.0
torchdata                                0.11.0
torchvision                              0.21.0
hf_transfer                              0.1.9
transformer_engine                       2.2.0+c55e425
transformers                             4.52.4
flash_attn                               2.7.4.post1
flashinfer-python                        0.2.2.post1+cu124torch2.6

But this time, I cannot execute the training job and got the following exception:

Traceback (most recent call last):
  File "/home/jovyan/workspace/verl/verl/trainer/main_ppo.py", line 64, in main
    run_ppo(config)
  File "/home/jovyan/workspace/verl/verl/trainer/main_ppo.py", line 76, in run_ppo
    ray.get(runner.run.remote(config))
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/ray/_private/auto_init_hook.py", line 21, in auto_init_wrapper
    return fn(*args, **kwargs)
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/ray/_private/client_mode_hook.py", line 103, in wrapper
    return func(*args, **kwargs)
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/ray/_private/worker.py", line 2822, in get
    values, debugger_breakpoint = worker.get_objects(object_refs, timeout=timeout)
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/ray/_private/worker.py", line 930, in get_objects
    raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(AssertionError): ray::TaskRunner.run() (pid=5313, ip=192.168.189.144, actor_id=8d5eef0858395d7c9f2aec8001000000, repr=<main_ppo.TaskRunner object at 0x7fb3f9aac130>)
  File "/home/jovyan/workspace/verl/verl/trainer/main_ppo.py", line 183, in run
    trainer.fit()
  File "/home/jovyan/workspace/verl/verl/trainer/ppo/ray_trainer.py", line 870, in fit
    val_metrics = self._validate()
  File "/home/jovyan/workspace/verl/verl/trainer/ppo/ray_trainer.py", line 606, in _validate
    test_output_gen_batch_padded = self.actor_rollout_wg.generate_sequences(test_gen_batch_padded)
  File "/home/jovyan/workspace/verl/verl/single_controller/ray/base.py", line 49, in func
    output = ray.get(output)
ray.exceptions.RayTaskError(AssertionError): ray::WorkerDict.actor_rollout_generate_sequences() (pid=6742, ip=192.168.189.144, actor_id=3973d61696f5e8257f7cf27801000000, repr=<verl.single_controller.ray.base.WorkerDict object at 0x7faad0dbddb0>)
  File "/home/jovyan/workspace/verl/verl/single_controller/ray/base.py", line 625, in func
    return getattr(self.worker_dict[key], name)(*args, **kwargs)
  File "/home/jovyan/workspace/verl/verl/single_controller/base/decorator.py", line 534, in inner
    return func(*args, **kwargs)
  File "/home/jovyan/workspace/verl/verl/workers/fsdp_workers.py", line 645, in generate_sequences
    output = self.rollout.generate_sequences(prompts=prompts)
  File "/home/jovyan/workspace/verl/verl/utils/debug/performance.py", line 78, in f
    return self.log(decorated_function, *args, **kwargs)
  File "/home/jovyan/workspace/verl/verl/utils/debug/performance.py", line 88, in log
    output = func(*args, **kwargs)
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/home/jovyan/workspace/verl/verl/workers/rollout/vllm_rollout/vllm_rollout_spmd.py", line 277, in generate_sequences
    outputs = self.inference_engine.generate(
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/utils.py", line 1196, in inner
    return fn(*args, **kwargs)
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/entrypoints/llm.py", line 465, in generate
    self._validate_and_add_requests(
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/entrypoints/llm.py", line 1354, in _validate_and_add_requests
    self._add_request(
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/entrypoints/llm.py", line 1372, in _add_request
    self.llm_engine.add_request(
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/v1/engine/llm_engine.py", line 183, in add_request
    prompt_str, request = self.processor.process_inputs(
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/v1/engine/processor.py", line 275, in process_inputs
    ) = merge_and_sort_multimodal_metadata(
  File "/home/jovyan/workspace/miniconda3/envs/verl/lib/python3.10/site-packages/vllm/multimodal/utils.py", line 318, in merge_and_sort_multimodal_metadata
    assert len(modalities) > 0, "No modalities found in the mm_positions."
AssertionError: No modalities found in the mm_positions.

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

params key mismatch of Gemma3 between transformers and vllm

I have noticed a mismatch between the params key of state_dict of HF Gemma3 model and VLLM Gemma3 model and add the following codes to verl.verl.workers.sharding_manager.fsdp_vllm.py:

def update_params(self, updated_params):
    model = self.model_runner.model
    patch_vllm_moe_model_weight_loader(model)
    device = torch.cuda.current_device()  # used when fsdp2 set cpu_offload_policy

    # ++ start ++
    from vllm.model_executor.models.gemma3_mm import Gemma3ForConditionalGeneration
    from transformers import Gemma3ForConditionalGeneration as Gemma3ForConditionalGenerationHF

    if (isinstance(model, Gemma3ForConditionalGeneration) and
            hasattr(Gemma3ForConditionalGenerationHF, "_checkpoint_conversion_mapping")):
        params_map = Gemma3ForConditionalGenerationHF._checkpoint_conversion_mapping
        params_map = {v: k.strip("^") for k, v in params_map.items()}
        logger.info(f"Remapping the params keys of actor module to vllm rollout model by {params_map}")

        _updated_params = {}
        for name, param in updated_params.items():
            new_name = None
            for k, v in params_map.items():
                if k in name:
                    new_name = name.replace(k, v, 1)
                    break
            if new_name is None:
                new_name = name
            _updated_params[new_name] = param
        updated_params = _updated_params
        del _updated_params
    # ++ end ++

    loaded_params = model.load_weights(((name, param.to(device, non_blocking=True).full_tensor() if isinstance(param, DTensor) else param) for name, param in updated_params.items()))
    logger.info("vLLM load weights, loaded_params: %d", len(loaded_params))

More info

I could successfully launch the Gemma3 model by either transformers or vllm alone in my environment and get reasonable output. Also, when I change the actor_rollout_ref.rollout.name=hf, the rollout model can give reasonable output during training. Therefore, I'm wondering whether I have not fully covered all the aspects to deal with this key mismatch. Or, could you let me know are there any points that I have overseen in your implementations?

You need to add a configure actor_rollout_ref.rollout.load_format=auto, then the gibberish output problem is solved. This is mentioned at issue. If you use transformers 4.52.4, you can follow PR to add the weights mapper.

@heli-qi
Copy link

heli-qi commented Jun 6, 2025

Thank you for your suggestion! I have lowered down my transformers to 4.51.3 and observed reasonable rollout output by setting actor_rollout_ref.rollout.load_format=auto.

Also, I noticed your latest commit and I have rebased onto it to test my experiments. It's awesome! I found the codes in verl/verl/utils/vllm_utils.py have a conflict of member variables with Gemma3:

def patch_vllm_moe_model_weight_loader(model):
    # ...
    model = getattr(model, "model", None) or getattr(model, "language_model", None)
    if model is None:
        raise ValueError("The provided model does not have a valid 'model' or 'language_model' attribute.")

    for layer in model.layers:
        # ...

I have confirmed in my vllm==0.8.6 and nightly vllm that Gemma3ForConditionalGeneration class holds a model in Gemma3ForCausalLM which doesn't have .layers but .model.layers. I have made a quick and simple fix in my codes as below. I'm wondering whether there could be an universal fix in the backend to automatically solve the variable mismatch like this?

model = getattr(model, "model", None) or getattr(model, "language_model", None)
+ if not hasattr(model, "layers"):
+       model = getattr(model, "model", None) or getattr(model, "language_model", None)

Moreover, I observed a warning during training about the attention implementation of Gemma3:

It is strongly recommended to train Gemma3 models with the `eager` attention implementation instead of `flash_attention_2`. Use `eager` with `AutoModelForCausalLM.from_pretrained('<path-to-checkpoint>', attn_implementation='eager')`.

I tried to add a if-statement in verl/verl/workers/fsdp_workers.py as below, but it will make my training job fail to set up and receive a ray timeout error:

+ if re.match("gemma3", actor_model_config.model_type, re.IGNORECASE):
+     if "flash_attention_2" in model_init_kwargs.get("attn_implementation"):
+         model_init_kwargs["attn_implementation"] = "eager"

actor_module = actor_module_class.from_pretrained(
    pretrained_model_name_or_path=local_path,
    torch_dtype=torch_dtype,
    config=actor_model_config,
    trust_remote_code=trust_remote_code,
    **model_init_kwargs
)

Seems flash_attention_2 may be an issue of Gemma3 training?

@Qsingle
Copy link
Author

Qsingle commented Jun 8, 2025

Thank you for your suggestion! I have lowered down my transformers to 4.51.3 and observed reasonable rollout output by setting actor_rollout_ref.rollout.load_format=auto.

Also, I noticed your latest commit and I have rebased onto it to test my experiments. It's awesome! I found the codes in verl/verl/utils/vllm_utils.py have a conflict of member variables with Gemma3:

def patch_vllm_moe_model_weight_loader(model):
    # ...
    model = getattr(model, "model", None) or getattr(model, "language_model", None)
    if model is None:
        raise ValueError("The provided model does not have a valid 'model' or 'language_model' attribute.")

    for layer in model.layers:
        # ...

I have confirmed in my vllm==0.8.6 and nightly vllm that Gemma3ForConditionalGeneration class holds a model in Gemma3ForCausalLM which doesn't have .layers but .model.layers. I have made a quick and simple fix in my codes as below. I'm wondering whether there could be an universal fix in the backend to automatically solve the variable mismatch like this?

model = getattr(model, "model", None) or getattr(model, "language_model", None)
+ if not hasattr(model, "layers"):
+       model = getattr(model, "model", None) or getattr(model, "language_model", None)

Moreover, I observed a warning during training about the attention implementation of Gemma3:

It is strongly recommended to train Gemma3 models with the `eager` attention implementation instead of `flash_attention_2`. Use `eager` with `AutoModelForCausalLM.from_pretrained('<path-to-checkpoint>', attn_implementation='eager')`.

I tried to add a if-statement in verl/verl/workers/fsdp_workers.py as below, but it will make my training job fail to set up and receive a ray timeout error:

+ if re.match("gemma3", actor_model_config.model_type, re.IGNORECASE):
+     if "flash_attention_2" in model_init_kwargs.get("attn_implementation"):
+         model_init_kwargs["attn_implementation"] = "eager"

actor_module = actor_module_class.from_pretrained(
    pretrained_model_name_or_path=local_path,
    torch_dtype=torch_dtype,
    config=actor_model_config,
    trust_remote_code=trust_remote_code,
    **model_init_kwargs
)

Seems flash_attention_2 may be an issue of Gemma3 training?

I think using the flash_attention_2 is not a problem, and the patch_vllm_moe_model_weight_loader should add a flag to do this process. The Gemma3 series does not patch this. It is better to use the HF as the rollout method for Gemma3. Thus, you can change it to use eager as the attention method.

wwwjn pushed a commit to wwwjn/verl that referenced this pull request Jun 10, 2025
### Checklist Before Starting

- [x] Search for similar PR(s).
Some code will conflict with this PR verl-project#1613 

### What does this PR do?

Add initial support for Kimi_vl;
Add sp patch for kimi_vl.

### High-Level Design

> Demonstrate the high-level design if this PR is complex.

### Specific Changes

- Add some minor changes to be compatible with kimi_vl
- Add patch to support ulysses_sequence_parallel

### API

> Demonstrate how the API changes if any.

### Usage Example

```bash

python3 -m verl.trainer.main_ppo \
    algorithm.adv_estimator=grpo \
    data.train_files=$DATA_PATH/geo3k/test.parquet \
    data.val_files=$DATA_PATH/geo3k/test.parquet \
    data.train_batch_size=16 \
    data.max_prompt_length=2048 \
    data.max_response_length=4096 \
    data.filter_overlong_prompts=True \
    data.truncation='error' \
    data.image_key=images \
    data.shuffle=False \
    +data.trust_remote_code=True \
    actor_rollout_ref.model.path=moonshotai/Kimi-VL-A3B-Instruct \
    actor_rollout_ref.actor.optim.lr=1e-6 \
    actor_rollout_ref.model.use_remove_padding=True \
    actor_rollout_ref.actor.ulysses_sequence_parallel_size=2 \
    actor_rollout_ref.actor.ppo_mini_batch_size=8 \
    actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.actor.use_kl_loss=True \
    actor_rollout_ref.actor.kl_loss_coef=0.01 \
    actor_rollout_ref.actor.kl_loss_type=low_var_kl \
    actor_rollout_ref.actor.entropy_coeff=0 \
    actor_rollout_ref.model.enable_gradient_checkpointing=False \
    actor_rollout_ref.model.trust_remote_code=True \
    actor_rollout_ref.actor.fsdp_config.param_offload=True \
    actor_rollout_ref.actor.fsdp_config.optimizer_offload=True \
    actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.rollout.tensor_model_parallel_size=8\
    actor_rollout_ref.rollout.name=vllm \
    actor_rollout_ref.rollout.gpu_memory_utilization=0.6 \
    actor_rollout_ref.rollout.enable_chunked_prefill=False \
    actor_rollout_ref.rollout.enforce_eager=False \
    actor_rollout_ref.rollout.free_cache_engine=False \
    actor_rollout_ref.rollout.n=8 \
    actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.ref.fsdp_config.param_offload=True \
    algorithm.use_kl_in_reward=False \
    trainer.val_before_train=False \
    trainer.critic_warmup=0 \
    trainer.logger=['console','wandb'] \
    trainer.project_name='Kimi_VL_test' \
    trainer.experiment_name='kimi_vl_grpo_geo3k_cp2' \
    trainer.n_gpus_per_node=8\
    trainer.nnodes=1\
    trainer.save_freq=50 \
    trainer.test_freq=5 \
    trainer.total_epochs=15 $@

```


### Test & Problem
During the dev, I discovered some issues, but they did not affect the
code for this PR.
Existing problems:(with vllm==0.8.5.post1)
- Occasional errors of vllm
```python
  File "/home/sharele/anaconda3/lib/python3.11/site-packages/vllm/v1/attention/backends/mla/common.py", line 504, in build
    self.page_size)
    ^^^^^^^^^^^^^^
AttributeError: 'MLACommonMetadataBuilder' object has no attribute 'page_size'
```
releated: vllm-project/vllm#16908
Reference this method to avoid the problem temporarily:
vllm-project/vllm#16908 (comment)

- Garbled output from vllm under specific circumstances
During test, I found that when SamplingParams.n > 1,vllm's output is
some meaningless characters or keeps repeating. This will affect grpo.

releated: vllm-project/vllm#18378
Note: Using the Hopper architecture gpu can avoid this problem, but it
is not clear whether there are still potential issues.


Training curve:
The training curve will comming soon after I solve the second problem.


### Additional Info.

- **Issue Number**: verl-project#1428 
- **Training**: FSDP
- **Inference**: vLLM

### Checklist Before Submitting

- [ ] Read the [Contribute
Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide).
- [ ] Apply [pre-commit
checks](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting).
- [ ] Add `[BREAKING]` to the PR title if it breaks any API.
- [ ] Update the documentation about your changes in the
[docs](https://github.com/volcengine/verl/tree/main/docs).
- [ ] Add CI test(s) if necessary.

---------

Signed-off-by: ShareLer <ShareLe@163.com>
@dle666
Copy link

dle666 commented Aug 1, 2025

Please advise, how should I merge the trained Gemma3 weights? I currently encounter an error:

ValueError: Unrecognized configuration class <class 'transformers.models.gemma3.configuration_gemma3.Gemma3Config'> for this kind of AutoModel: AutoModelForVision2Seq.

I don't know how to solve it, could you give me some guidance?

@SStoica12
Copy link

@Qsingle

Thank you again for the repo. I am wondering if I could have some advice.
I tried to apply your changes to the EasyR1 (https://github.com/hiyouga/EasyR1/tree/main/verl) and for the processor using one I made from scratch that was based on the Qwen2VLProcessor (https://github.com/huggingface/transformers/blob/d42e96a2a731c4a772e396baa0d915524c873ff0/src/transformers/models/qwen2_vl/processing_qwen2_vl.py#L47), with the image processor to be a custom processor class that implemented the dynamic patching from InternVL documentation (https://huggingface.co/OpenGVLab/InternVL3-2B) and the tokenizer to be the one from autotokenizer. I am, however, getting the issue:

 File "/shared/nas/data/m1/sstoica2/conda/envs/tr_papo_ex/lib/python3.10/site-packages/torch/utils/checkpoint.py", line 304, in backward
    outputs = ctx.run_function(*detached_inputs)
  File "/shared/nas/data/m1/sstoica2/conda/envs/tr_papo_ex/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/shared/nas/data/m1/sstoica2/conda/envs/tr_papo_ex/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1750, in _call_impl
    return forward_call(*args, **kwargs)
  File "/shared/nas/data/m1/sstoica2/.cache/huggingface/modules/transformers_modules/b48cc1d23a4e8a570bd19e777d9e08cc5eb8ff28/modeling_intern_vit.py", line 291, in forward
    hidden_states = hidden_states + self.drop_path1(self.attn(self.norm1(hidden_states).to(hidden_states.dtype)) * self.ls1)
  File "/shared/nas/data/m1/sstoica2/conda/envs/tr_papo_ex/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/shared/nas/data/m1/sstoica2/conda/envs/tr_papo_ex/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1750, in _call_impl
    return forward_call(*args, **kwargs)
  File "/shared/nas/data/m1/sstoica2/conda/envs/tr_papo_ex/lib/python3.10/site-packages/torch/nn/modules/normalization.py", line 217, in forward
    return F.layer_norm(
  File "/shared/nas/data/m1/sstoica2/conda/envs/tr_papo_ex/lib/python3.10/site-packages/torch/nn/functional.py", line 2911, in layer_norm
    return torch.layer_norm(
RuntimeError: The tensor has a non-zero number of elements, but its data is not allocated yet.
If you're using torch.compile/export/fx, it is likely that we are erroneously tracing into a custom kernel. To fix this, please wrap the custom kernel into an opaque custom op. Please see the following for details: https://pytorch.org/tutorials/advanced/custom_ops_landing_page.html
If you're using Caffe2, Caffe2 uses a lazy allocation, so you will need to call mutable_data() or raw_mutable_data() to actually allocate memory.

I have tried the solution you proposed of freezing the image tower, but the issue persists. I have tried other processors like InternVLProcessor from transformers and the InternVLProcessor from vllm, but that does not fix the issue.

Do you have any suggestions? Note: the verl version you are using is more than three months newer.

My environment is:
absl-py 2.3.1
accelerate 1.9.0
addict 2.4.0
aiofiles 23.2.1
aiohappyeyeballs 2.6.1
aiohttp 3.12.14
aiosignal 1.4.0
airportsdata 20250706
annotated-types 0.7.0
antlr4-python3-runtime 4.9.3
anyio 4.9.0
appdirs 1.4.4
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
astor 0.8.1
asttokens 3.0.0
astunparse 1.6.3
async-timeout 5.0.1
attrs 25.3.0
audioread 3.0.1
av 14.4.0
beautifulsoup4 4.13.3
blake3 1.0.5
boltons 25.0.0
cachetools 6.1.0
certifi 2025.7.14
cffi 1.17.1
charset-normalizer 3.4.2
click 8.2.1
cloudpickle 3.1.1
codetiming 1.4.0
comm 0.2.2
compressed-tensors 0.9.3
cupy-cuda12x 13.5.1
cycler 0.12.1
datasets 4.0.0
dds-cloudapi-sdk 0.3.3
debugpy 1.8.13
decorator 5.2.1
defusedxml 0.7.1
Deprecated 1.2.18
depyf 0.18.0
detectron2 0.6
dill 0.3.8
diskcache 5.6.3
distro 1.9.0
dnspython 2.7.0
docker 7.1.0
docstring_parser 0.16
einops 0.8.1
email_validator 2.2.0
exceptiongroup 1.3.0
executing 2.2.0
fastapi 0.116.1
fastapi-cli 0.0.8
fastapi-cloud-cli 0.1.4
fastjsonschema 2.21.1
fastrlock 0.8.3
filelock 3.18.0
fire 0.7.0
FLAML 2.3.4
flash-attn 2.7.4.post1
flashinfer-python 0.2.5+cu124torch2.6
flatbuffers 25.2.10
fqdn 1.5.1
frozenlist 1.7.0
fsspec 2024.6.1
ftfy 6.3.1
future 1.0.0
fvcore 0.1.5.post20221221
gast 0.6.0
gguf 0.17.1
gitdb 4.0.12
GitPython 3.1.44
google-pasta 0.2.0
googleapis-common-protos 1.70.0
groovy 0.1.2
grpcio 1.73.1
h11 0.16.0
h5py 3.14.0
hf-xet 1.1.5
httpcore 1.0.9
httptools 0.6.4
httpx 0.28.1
huggingface-hub 0.34.3
hydra-core 1.3.2
idna 3.10
importlib_metadata 8.0.0
interegular 0.3.3
iopath 0.1.9
ipykernel 6.29.5
ipython 8.33.0
isoduration 20.11.0
jedi 0.19.2
jieba 0.42.1
Jinja2 3.1.6
jiter 0.8.2
jsonschema 4.25.0
jsonschema-specifications 2025.4.1
jupyter_client 8.6.3
jupyter_core 5.7.2
jupyter-events 0.12.0
jupyter-kernel-gateway 3.0.1
jupyter_server 2.15.0
jupyter_server_terminals 0.5.3
jupyterlab_pygments 0.3.0
keras 3.10.0
lark 1.2.2
lazy_loader 0.4
libclang 18.1.1
librosa 0.11.0
liger_kernel 0.6.0
llguidance 0.7.30
llvmlite 0.44.0
lm-format-enforcer 0.10.11
Markdown 3.8.2
markdown-it-py 3.0.0
MarkupSafe 2.1.5
mathruler 0.1.0
matplotlib-inline 0.1.7
mdurl 0.1.2
mistral_common 1.8.1
mistune 3.1.2
ml_dtypes 0.5.1
mpmath 1.3.0
msgpack 1.1.1
msgspec 0.19.0
multidict 6.6.3
multiprocess 0.70.16
mypy-extensions 1.0.0
namex 0.1.0
nbclient 0.10.2
nbconvert 7.16.6
nbformat 5.10.4
nest-asyncio 1.6.0
networkx 3.3
ninja 1.13.0
numba 0.61.2
numpy 2.1.2
nvidia-cublas-cu12 12.4.5.8
nvidia-cuda-cupti-cu12 12.4.127
nvidia-cuda-nvrtc-cu12 12.4.127
nvidia-cuda-runtime-cu12 12.4.127
nvidia-cudnn-cu12 9.1.0.70
nvidia-cufft-cu12 11.2.1.3
nvidia-cufile-cu12 1.11.1.6
nvidia-curand-cu12 10.3.5.147
nvidia-cusolver-cu12 11.6.1.9
nvidia-cusparse-cu12 12.3.1.170
nvidia-cusparselt-cu12 0.6.2
nvidia-nccl-cu12 2.21.5
nvidia-nvjitlink-cu12 12.4.127
nvidia-nvtx-cu12 12.4.127
omegaconf 2.3.0
open_clip_torch 2.30.0
openai 1.97.0
opencv-python-headless 4.12.0.88
opentelemetry-api 1.26.0
opentelemetry-exporter-otlp 1.26.0
opentelemetry-exporter-otlp-proto-common 1.26.0
opentelemetry-exporter-otlp-proto-grpc 1.26.0
opentelemetry-exporter-otlp-proto-http 1.26.0
opentelemetry-proto 1.26.0
opentelemetry-sdk 1.26.0
opentelemetry-semantic-conventions 0.47b0
opentelemetry-semantic-conventions-ai 0.4.11
opt_einsum 3.4.0
optree 0.17.0
orjson 3.11.0
outlines 0.1.11
outlines_core 0.1.26
overrides 7.7.0
packaging 25.0
pandas 2.3.1
pandocfilters 1.5.1
PAPO 0.1.0 /shared/nas/data/m1/sstoica2/PAPO_integrated
parso 0.8.4
partial-json-parser 0.2.1.1.post6
pathspec 0.12.1
peft 0.16.0
pillow 11.0.0
pip 25.2
platformdirs 4.3.8
pooch 1.8.2
portalocker 3.1.1
prometheus_client 0.21.1
prometheus-fastapi-instrumentator 7.1.0
prompt_toolkit 3.0.50
propcache 0.3.0
protobuf 4.25.8
psutil 7.0.0
pure_eval 0.2.3
py-cpuinfo 9.0.0
pyarrow 21.0.0
pyautogen 0.2.26
pycountry 24.6.1
pycparser 2.22
pydantic 2.11.7
pydantic_core 2.33.2
pydantic-extra-types 2.10.5
pydot 3.0.4
pydub 0.25.1
Pygments 2.19.1
pylatexenc 2.10
python-dateutil 2.9.0.post0
python-dotenv 1.0.1
python-json-logger 3.2.1
python-multipart 0.0.20
pytz 2025.2
pyvers 0.1.0
PyYAML 6.0.2
pyzmq 26.2.1
qwen-vl-utils 0.0.11
ray 2.48.0
referencing 0.36.2
regex 2024.11.6
requests 2.32.4
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rich 13.9.4
rich-toolkit 0.14.8
rignore 0.6.4
rouge-chinese 1.0.3
rpds-py 0.26.0
ruff 0.9.9
safehttpx 0.1.6
safetensors 0.5.3
scipy 1.15.3
semantic-version 2.10.0
Send2Trash 1.8.3
sentencepiece 0.2.0
sentry-sdk 2.33.0
setuptools 80.9.0
shellingham 1.5.4
shtab 1.7.2
six 1.17.0
smmap 5.0.2
sniffio 1.3.1
soundfile 0.13.1
soupsieve 2.6
soxr 0.5.0.post1
sse-starlette 2.3.6
stack-data 0.6.3
starlette 0.47.1
supervision 0.25.1
sympy 1.13.1
tabulate 0.9.0
tensorboard 2.19.0
tensorboard-data-server 0.7.2
tensordict 0.9.1
tensorflow 2.19.0
tensorflow-io-gcs-filesystem 0.37.1
termcolor 2.5.0
terminado 0.18.1
tiktoken 0.9.0
timm 1.0.19
tinycss2 1.4.0
tokenizers 0.21.2
toml 0.10.2
tomlkit 0.13.2
torch 2.6.0+cu124
torchao 0.12.0
torchaudio 2.6.0+cu124
torchdata 0.11.0
torchvision 0.21.0+cu124
tornado 6.4.2
tqdm 4.67.1
traitlets 5.14.3
transformers 4.52.2
triton 3.2.0
trl 0.9.6
typer 0.15.2
types-python-dateutil 2.9.0.20241206
typing_extensions 4.12.2
typing-inspection 0.4.1
tyro 0.8.14
tzdata 2025.2
UNKNOWN 0.0.0
uri-template 1.3.0
urllib3 2.5.0
uvicorn 0.35.0
uvloop 0.21.0
vllm 0.8.4
wandb 0.21.0
watchfiles 1.1.0
wcwidth 0.2.13
webcolors 24.11.1
webencodings 0.5.1
websocket-client 1.8.0
websockets 15.0.1
Werkzeug 3.1.3
wheel 0.45.1
wrapt 1.17.2
xformers 0.0.29.post2
xgrammar 0.1.18
xxhash 3.5.0
yacs 0.1.8
yarl 1.20.1
zipp 3.23.0

@BeastyZ
Copy link

BeastyZ commented Oct 11, 2025

Please advise, how should I merge the trained Gemma3 weights? I currently encounter an error:
ValueError: Unrecognized configuration class <class 'transformers.models.gemma3.configuration_gemma3.Gemma3Config'> for this kind of AutoModel: AutoModelForVision2Seq.
I don't know how to solve it, could you give me some guidance?

have you solved this problem? @dle666

chenjiaoAngel added a commit to chenjiaoAngel/verl that referenced this pull request Nov 14, 2025
### Checklist Before Starting

- [x] Search for similar PR(s).
Some code will conflict with this PR verl-project#1613 

### What does this PR do?

Add initial support for Kimi_vl;
Add sp patch for kimi_vl.

### High-Level Design

> Demonstrate the high-level design if this PR is complex.

### Specific Changes

- Add some minor changes to be compatible with kimi_vl
- Add patch to support ulysses_sequence_parallel

### API

> Demonstrate how the API changes if any.

### Usage Example

```bash

python3 -m verl.trainer.main_ppo \
    algorithm.adv_estimator=grpo \
    data.train_files=$DATA_PATH/geo3k/test.parquet \
    data.val_files=$DATA_PATH/geo3k/test.parquet \
    data.train_batch_size=16 \
    data.max_prompt_length=2048 \
    data.max_response_length=4096 \
    data.filter_overlong_prompts=True \
    data.truncation='error' \
    data.image_key=images \
    data.shuffle=False \
    +data.trust_remote_code=True \
    actor_rollout_ref.model.path=moonshotai/Kimi-VL-A3B-Instruct \
    actor_rollout_ref.actor.optim.lr=1e-6 \
    actor_rollout_ref.model.use_remove_padding=True \
    actor_rollout_ref.actor.ulysses_sequence_parallel_size=2 \
    actor_rollout_ref.actor.ppo_mini_batch_size=8 \
    actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.actor.use_kl_loss=True \
    actor_rollout_ref.actor.kl_loss_coef=0.01 \
    actor_rollout_ref.actor.kl_loss_type=low_var_kl \
    actor_rollout_ref.actor.entropy_coeff=0 \
    actor_rollout_ref.model.enable_gradient_checkpointing=False \
    actor_rollout_ref.model.trust_remote_code=True \
    actor_rollout_ref.actor.fsdp_config.param_offload=True \
    actor_rollout_ref.actor.fsdp_config.optimizer_offload=True \
    actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.rollout.tensor_model_parallel_size=8\
    actor_rollout_ref.rollout.name=vllm \
    actor_rollout_ref.rollout.gpu_memory_utilization=0.6 \
    actor_rollout_ref.rollout.enable_chunked_prefill=False \
    actor_rollout_ref.rollout.enforce_eager=False \
    actor_rollout_ref.rollout.free_cache_engine=False \
    actor_rollout_ref.rollout.n=8 \
    actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.ref.fsdp_config.param_offload=True \
    algorithm.use_kl_in_reward=False \
    trainer.val_before_train=False \
    trainer.critic_warmup=0 \
    trainer.logger=['console','wandb'] \
    trainer.project_name='Kimi_VL_test' \
    trainer.experiment_name='kimi_vl_grpo_geo3k_cp2' \
    trainer.n_gpus_per_node=8\
    trainer.nnodes=1\
    trainer.save_freq=50 \
    trainer.test_freq=5 \
    trainer.total_epochs=15 $@

```


### Test & Problem
During the dev, I discovered some issues, but they did not affect the
code for this PR.
Existing problems:(with vllm==0.8.5.post1)
- Occasional errors of vllm
```python
  File "/home/sharele/anaconda3/lib/python3.11/site-packages/vllm/v1/attention/backends/mla/common.py", line 504, in build
    self.page_size)
    ^^^^^^^^^^^^^^
AttributeError: 'MLACommonMetadataBuilder' object has no attribute 'page_size'
```
releated: vllm-project/vllm#16908
Reference this method to avoid the problem temporarily:
vllm-project/vllm#16908 (comment)

- Garbled output from vllm under specific circumstances
During test, I found that when SamplingParams.n > 1,vllm's output is
some meaningless characters or keeps repeating. This will affect grpo.

releated: vllm-project/vllm#18378
Note: Using the Hopper architecture gpu can avoid this problem, but it
is not clear whether there are still potential issues.


Training curve:
The training curve will comming soon after I solve the second problem.


### Additional Info.

- **Issue Number**: verl-project#1428 
- **Training**: FSDP
- **Inference**: vLLM

### Checklist Before Submitting

- [ ] Read the [Contribute
Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide).
- [ ] Apply [pre-commit
checks](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting).
- [ ] Add `[BREAKING]` to the PR title if it breaks any API.
- [ ] Update the documentation about your changes in the
[docs](https://github.com/volcengine/verl/tree/main/docs).
- [ ] Add CI test(s) if necessary.

---------

Signed-off-by: ShareLer <ShareLe@163.com>
TimurTaepov pushed a commit to giorgossideris/verl that referenced this pull request Dec 20, 2025
### Checklist Before Starting

- [x] Search for similar PR(s).
Some code will conflict with this PR verl-project#1613 

### What does this PR do?

Add initial support for Kimi_vl;
Add sp patch for kimi_vl.

### High-Level Design

> Demonstrate the high-level design if this PR is complex.

### Specific Changes

- Add some minor changes to be compatible with kimi_vl
- Add patch to support ulysses_sequence_parallel

### API

> Demonstrate how the API changes if any.

### Usage Example

```bash

python3 -m verl.trainer.main_ppo \
    algorithm.adv_estimator=grpo \
    data.train_files=$DATA_PATH/geo3k/test.parquet \
    data.val_files=$DATA_PATH/geo3k/test.parquet \
    data.train_batch_size=16 \
    data.max_prompt_length=2048 \
    data.max_response_length=4096 \
    data.filter_overlong_prompts=True \
    data.truncation='error' \
    data.image_key=images \
    data.shuffle=False \
    +data.trust_remote_code=True \
    actor_rollout_ref.model.path=moonshotai/Kimi-VL-A3B-Instruct \
    actor_rollout_ref.actor.optim.lr=1e-6 \
    actor_rollout_ref.model.use_remove_padding=True \
    actor_rollout_ref.actor.ulysses_sequence_parallel_size=2 \
    actor_rollout_ref.actor.ppo_mini_batch_size=8 \
    actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.actor.use_kl_loss=True \
    actor_rollout_ref.actor.kl_loss_coef=0.01 \
    actor_rollout_ref.actor.kl_loss_type=low_var_kl \
    actor_rollout_ref.actor.entropy_coeff=0 \
    actor_rollout_ref.model.enable_gradient_checkpointing=False \
    actor_rollout_ref.model.trust_remote_code=True \
    actor_rollout_ref.actor.fsdp_config.param_offload=True \
    actor_rollout_ref.actor.fsdp_config.optimizer_offload=True \
    actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.rollout.tensor_model_parallel_size=8\
    actor_rollout_ref.rollout.name=vllm \
    actor_rollout_ref.rollout.gpu_memory_utilization=0.6 \
    actor_rollout_ref.rollout.enable_chunked_prefill=False \
    actor_rollout_ref.rollout.enforce_eager=False \
    actor_rollout_ref.rollout.free_cache_engine=False \
    actor_rollout_ref.rollout.n=8 \
    actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.ref.fsdp_config.param_offload=True \
    algorithm.use_kl_in_reward=False \
    trainer.val_before_train=False \
    trainer.critic_warmup=0 \
    trainer.logger=['console','wandb'] \
    trainer.project_name='Kimi_VL_test' \
    trainer.experiment_name='kimi_vl_grpo_geo3k_cp2' \
    trainer.n_gpus_per_node=8\
    trainer.nnodes=1\
    trainer.save_freq=50 \
    trainer.test_freq=5 \
    trainer.total_epochs=15 $@

```


### Test & Problem
During the dev, I discovered some issues, but they did not affect the
code for this PR.
Existing problems:(with vllm==0.8.5.post1)
- Occasional errors of vllm
```python
  File "/home/sharele/anaconda3/lib/python3.11/site-packages/vllm/v1/attention/backends/mla/common.py", line 504, in build
    self.page_size)
    ^^^^^^^^^^^^^^
AttributeError: 'MLACommonMetadataBuilder' object has no attribute 'page_size'
```
releated: vllm-project/vllm#16908
Reference this method to avoid the problem temporarily:
vllm-project/vllm#16908 (comment)

- Garbled output from vllm under specific circumstances
During test, I found that when SamplingParams.n > 1,vllm's output is
some meaningless characters or keeps repeating. This will affect grpo.

releated: vllm-project/vllm#18378
Note: Using the Hopper architecture gpu can avoid this problem, but it
is not clear whether there are still potential issues.


Training curve:
The training curve will comming soon after I solve the second problem.


### Additional Info.

- **Issue Number**: verl-project#1428 
- **Training**: FSDP
- **Inference**: vLLM

### Checklist Before Submitting

- [ ] Read the [Contribute
Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide).
- [ ] Apply [pre-commit
checks](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting).
- [ ] Add `[BREAKING]` to the PR title if it breaks any API.
- [ ] Update the documentation about your changes in the
[docs](https://github.com/volcengine/verl/tree/main/docs).
- [ ] Add CI test(s) if necessary.

---------

Signed-off-by: ShareLer <ShareLe@163.com>
vyomakesh0728 added a commit to vyomakesh0728/verl that referenced this pull request Jan 22, 2026
### Checklist Before Starting

- [x] Search for similar PR(s).
Some code will conflict with this PR verl-project#1613 

### What does this PR do?

Add initial support for Kimi_vl;
Add sp patch for kimi_vl.

### High-Level Design

> Demonstrate the high-level design if this PR is complex.

### Specific Changes

- Add some minor changes to be compatible with kimi_vl
- Add patch to support ulysses_sequence_parallel

### API

> Demonstrate how the API changes if any.

### Usage Example

```bash

python3 -m verl.trainer.main_ppo \
    algorithm.adv_estimator=grpo \
    data.train_files=$DATA_PATH/geo3k/test.parquet \
    data.val_files=$DATA_PATH/geo3k/test.parquet \
    data.train_batch_size=16 \
    data.max_prompt_length=2048 \
    data.max_response_length=4096 \
    data.filter_overlong_prompts=True \
    data.truncation='error' \
    data.image_key=images \
    data.shuffle=False \
    +data.trust_remote_code=True \
    actor_rollout_ref.model.path=moonshotai/Kimi-VL-A3B-Instruct \
    actor_rollout_ref.actor.optim.lr=1e-6 \
    actor_rollout_ref.model.use_remove_padding=True \
    actor_rollout_ref.actor.ulysses_sequence_parallel_size=2 \
    actor_rollout_ref.actor.ppo_mini_batch_size=8 \
    actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.actor.use_kl_loss=True \
    actor_rollout_ref.actor.kl_loss_coef=0.01 \
    actor_rollout_ref.actor.kl_loss_type=low_var_kl \
    actor_rollout_ref.actor.entropy_coeff=0 \
    actor_rollout_ref.model.enable_gradient_checkpointing=False \
    actor_rollout_ref.model.trust_remote_code=True \
    actor_rollout_ref.actor.fsdp_config.param_offload=True \
    actor_rollout_ref.actor.fsdp_config.optimizer_offload=True \
    actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.rollout.tensor_model_parallel_size=8\
    actor_rollout_ref.rollout.name=vllm \
    actor_rollout_ref.rollout.gpu_memory_utilization=0.6 \
    actor_rollout_ref.rollout.enable_chunked_prefill=False \
    actor_rollout_ref.rollout.enforce_eager=False \
    actor_rollout_ref.rollout.free_cache_engine=False \
    actor_rollout_ref.rollout.n=8 \
    actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=1 \
    actor_rollout_ref.ref.fsdp_config.param_offload=True \
    algorithm.use_kl_in_reward=False \
    trainer.val_before_train=False \
    trainer.critic_warmup=0 \
    trainer.logger=['console','wandb'] \
    trainer.project_name='Kimi_VL_test' \
    trainer.experiment_name='kimi_vl_grpo_geo3k_cp2' \
    trainer.n_gpus_per_node=8\
    trainer.nnodes=1\
    trainer.save_freq=50 \
    trainer.test_freq=5 \
    trainer.total_epochs=15 $@

```


### Test & Problem
During the dev, I discovered some issues, but they did not affect the
code for this PR.
Existing problems:(with vllm==0.8.5.post1)
- Occasional errors of vllm
```python
  File "/home/sharele/anaconda3/lib/python3.11/site-packages/vllm/v1/attention/backends/mla/common.py", line 504, in build
    self.page_size)
    ^^^^^^^^^^^^^^
AttributeError: 'MLACommonMetadataBuilder' object has no attribute 'page_size'
```
releated: vllm-project/vllm#16908
Reference this method to avoid the problem temporarily:
vllm-project/vllm#16908 (comment)

- Garbled output from vllm under specific circumstances
During test, I found that when SamplingParams.n > 1,vllm's output is
some meaningless characters or keeps repeating. This will affect grpo.

releated: vllm-project/vllm#18378
Note: Using the Hopper architecture gpu can avoid this problem, but it
is not clear whether there are still potential issues.


Training curve:
The training curve will comming soon after I solve the second problem.


### Additional Info.

- **Issue Number**: verl-project#1428 
- **Training**: FSDP
- **Inference**: vLLM

### Checklist Before Submitting

- [ ] Read the [Contribute
Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide).
- [ ] Apply [pre-commit
checks](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting).
- [ ] Add `[BREAKING]` to the PR title if it breaks any API.
- [ ] Update the documentation about your changes in the
[docs](https://github.com/volcengine/verl/tree/main/docs).
- [ ] Add CI test(s) if necessary.

---------

Signed-off-by: ShareLer <ShareLe@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants