verl icon indicating copy to clipboard operation
verl copied to clipboard

Qwen 3 8B Runs takes about one hour per step

Open carrot0117 opened this issue 1 year ago • 31 comments

When I train using the GRPO algorithm, switching from Qwen 2.5 7B to Qwen 3 8B causes a huge slowdown in generation speed. With Qwen 2.5 7B each training step took only a few minutes, but with Qwen 3 8B it now takes about one hour per step under the same setup. Could you help me understand why Qwen 3 is so much slower and whether there are any recommended settings or fixes? Even with enable_thinking=true, the actual response lengths don’t seem long enough to explain such a huge slowdown. (I’ve already switched to the latest Docker image.) 用qwen3 8b进行GRPO训练的时候,为什么generate的速度会慢特别多,原来qwen2.5 7b大概几分钟一个step,换成qwen3一小时一个step。虽然说有enable_thinking=true,但看实际回答长度,会带来这么大差距吗(已经换了最新的镜像)。有人遇到类似的问题或者有什么建议吗,非常感谢!!!

Image

Image

carrot0117 avatar May 19 '25 09:05 carrot0117

What are the values for all timing_s/* ?

chenhaiq avatar May 19 '25 12:05 chenhaiq

What are the values for all timing_s/* ?

Thank you for your reply!~ here are the other curves: Image

Image

carrot0117 avatar May 19 '25 12:05 carrot0117

try upgrade vllm version? previous vllm may not support Qwen3

Saito-Karuha avatar May 19 '25 12:05 Saito-Karuha

一样的问题

zwhe99 avatar May 19 '25 19:05 zwhe99

it is slow in generate stage. Can you attach your console log?

chenhaiq avatar May 20 '25 01:05 chenhaiq

it is slow in generate stage. Can you attach your console log?

Sure! here’s my log file

qwen3output_.log

carrot0117 avatar May 20 '25 02:05 carrot0117

try upgrade vllm version? previous vllm may not support Qwen3

I’ve already updated to the vLLM 0.8.4 image and even tried 0.8.5, but the issue persists.

carrot0117 avatar May 20 '25 02:05 carrot0117

我也遇到相似的问题,在某一次rollout的时候会卡住很久不动,卡住的时候查看gpu_computation_utilization一直是100%,改了vllm的各种参数也没效果

tirant35 avatar May 20 '25 03:05 tirant35

it is slow in generate stage. Can you attach your console log?

Sure! here’s my log file

qwen3output_.log

what is your "perf/throughput" value for each step?

chenhaiq avatar May 20 '25 03:05 chenhaiq

it is slow in generate stage. Can you attach your console log?

Sure! here’s my log file qwen3output_.log

what is your "perf/throughput" value for each step?

Image

@chenhaiq here is mine

zwhe99 avatar May 20 '25 03:05 zwhe99

it is slow in generate stage. Can you attach your console log?

Sure! here’s my log file qwen3output_.log

what is your "perf/throughput" value for each step?

Image [@chenhaiq](https://github.com/chenhaiq) here is mine
  1. console log
  2. which version of vllm?
  3. when you pull verl source?

chenhaiq avatar May 20 '25 03:05 chenhaiq

it is slow in generate stage. Can you attach your console log?

Sure! here’s my log file qwen3output_.log

what is your "perf/throughput" value for each step? Sure—here are the perf/throughput curves. Image

carrot0117 avatar May 20 '25 03:05 carrot0117

try upgrade vllm version? previous vllm may not support Qwen3

I’ve already updated to the vLLM 0.8.4 image and even tried 0.8.5, but the issue persists.

I suggest you pull the lastst version of verl and try again. The perf/throughput for Qwen3 is 459.418 in our A800.

chenhaiq avatar May 20 '25 03:05 chenhaiq

@chenhaiq

  1. tmp.log

  2. vllm==0.8.5.post1

  3. commit 5b24e01d5693c022d8e3fa2360fca509d83bffc0 (origin/main, origin/HEAD, main) Author: Hongpeng Guo [email protected] Date: Sun May 18 22:08:32 2025 -0700

    [misc] use lazy import on megatron utils components (#1551)

zwhe99 avatar May 20 '25 03:05 zwhe99

@chenhaiq

  1. tmp.log
  2. vllm==0.8.5.post1
  3. commit 5b24e01 (origin/main, origin/HEAD, main) Author: Hongpeng Guo [email protected] Date: Sun May 18 22:08:32 2025 -0700 [misc] use lazy import on megatron utils components ([misc] use lazy import on megatron utils components #1551)

@zwhe99 Can you please test again with option: data.max_response_length=512? I guest it is because most gpus have to wait the slowest one with max prompt length.

chenhaiq avatar May 20 '25 07:05 chenhaiq

@chenhaiq I need to reproduce a long reasoning model. I think 512 it's not enough.

zwhe99 avatar May 20 '25 07:05 zwhe99

@chenhaiq I need to reproduce a long reasoning model. I think 512 it's not enough.

Yes, I know it. Just want to confirm where is the slowness coming from.

In your task, there are 96 gpus with very different response_length in each step, for example:

response_length/mean:947.701 response_length/max:10240.000 response_length/min:3.000

I guest it is because few GPUs hit problem with 10240 length while the rest of GPUs have response with very short length.

I am not sure where it is this case. If max_response_length 512 can have much better performance, it should be this case.

chenhaiq avatar May 20 '25 07:05 chenhaiq

ok, will give a try soon

zwhe99 avatar May 20 '25 07:05 zwhe99

If this is indeed the case, are there recommended solutions?

zwhe99 avatar May 20 '25 07:05 zwhe99

If this is indeed the case, are there recommended solutions?

The partial-rollout feature could resolve this, but it still under developping. cc @zyzshishui @zhaochenyang20

You can find info from: https://github.com/zhaochenyang20/Awesome-ML-SYS-Tutorial/blob/ef9bad32ba58aa873f51c9af4e7aa6c04e672afe/rlhf/partial-rollout/readme.md

chenhaiq avatar May 20 '25 08:05 chenhaiq