verl icon indicating copy to clipboard operation
verl copied to clipboard

Qwen3 Support

Open ruoyuxie opened this issue 1 year ago • 10 comments

It seems like Qwen3 is not currently supported. Any workarounds?

ray::WorkerDict.ref_init_model() (pid=1921598, ip=10.236.184.4, actor_id=82774886c9fd55b4b512841001000000, repr=<verl.single_controller.ray.base.WorkerDict object at 0x7fb39be15000>)
  File "verl/single_controller/ray/base.py", line 399, in func
    return getattr(self.worker_dict[key], name)(*args, **kwargs)
...
ValueError: Model architecture qwen3 is not supported for now. RMPad supported architectures: dict_keys(['llama', 'mistral', 'gemma', 'qwen2']).Please set `use_remove_padding=False` in the model config.

ruoyuxie avatar Apr 28 '25 23:04 ruoyuxie

It seems like Qwen3 is not currently supported. Any workarounds?

�[36mray::WorkerDict.ref_init_model()�[39m (pid=1921598, ip=10.236.184.4, actor_id=82774886c9fd55b4b512841001000000, repr=<verl.single_controller.ray.base.WorkerDict object at 0x7fb39be15000>)
  File "verl/single_controller/ray/base.py", line 399, in func
    return getattr(self.worker_dict[key], name)(*args, **kwargs)
...
ValueError: Model architecture qwen3 is not supported for now. RMPad supported architectures: dict_keys(['llama', 'mistral', 'gemma', 'qwen2']).Please set `use_remove_padding=False` in the model config.

Have you ever tried to set use_remove_padding=False in the model config?

jacklanda avatar Apr 29 '25 01:04 jacklanda

@ruoyuxie Do you use the newest verl version? RMPad is automatically supported if the model support flash_attn. #735

wuxibin89 avatar Apr 29 '25 01:04 wuxibin89

We checked Qwen3 can automatically work on verl. I think you can update verl's code first.

BearBiscuit05 avatar Apr 29 '25 02:04 BearBiscuit05

Is Qwen3 moe also supported?

drxmy avatar Apr 29 '25 02:04 drxmy

update the newest verl works. Thanks all!

ruoyuxie avatar Apr 29 '25 07:04 ruoyuxie

Dose anyone try SFT full train in Qwen3? I see lots of RL demo in doc, but SFT full train demo is really slow, I am confused if it's correct. If anyone knows why, plz give some helps. Thanks!

FlyCarrot avatar Apr 30 '25 06:04 FlyCarrot

when I try to train qwen3-1.7B with verl, I found the model's responese is too long so that it's response will be truncation by 'data.max_response_length' param. How can I close the model's think part in verl?

Allen-Jon avatar Jul 04 '25 06:07 Allen-Jon

when I try to train qwen3-1.7B with verl, I found the model's responese is too long so that it's response will be truncation by 'data.max_response_length' param. How can I close the model's think part in verl?

Please consider adding a new argument enable_thinking with assigning False when processing your prompts.

text = tokenizer.apply_chat_template(
        messages,
        tokenize=False,
        add_generation_prompt=True,
        enable_thinking=False,  # Setting enable_thinking=False disables thinking mode
)

jacklanda avatar Jul 04 '25 07:07 jacklanda

when I try to train qwen3-1.7B with verl, I found the model's responese is too long so that it's response will be truncation by 'data.max_response_length' param. How can I close the model's think part in verl?

Please consider adding a new argument enable_thinking with assigning False when processing your prompts.

text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True, enable_thinking=False, # Setting enable_thinking=False disables thinking mode )

请问,我要将这段代码加到哪里?

jackwwy avatar Jul 15 '25 08:07 jackwwy

when I try to train qwen3-1.7B with verl, I found the model's responese is too long so that it's response will be truncation by 'data.max_response_length' param. How can I close the model's think part in verl?

Please consider adding a new argument enable_thinking with assigning False when processing your prompts. text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True, enable_thinking=False, # Setting enable_thinking=False disables thinking mode )

请问,我要将这段代码加到哪里?

我尝试了在调用模型处加enable_thinking=False,但是没有生效。不过我发现了其他解决这个问题的方法: 在你的prompt中加入'/no_think'来控制模型不输出思考过程。这也是qwen3官方提供的方式。

Allen-Jon avatar Jul 15 '25 09:07 Allen-Jon