Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V1] Feedback Thread #12568

Open
simon-mo opened this issue Jan 30, 2025 · 85 comments
Open

[V1] Feedback Thread #12568

simon-mo opened this issue Jan 30, 2025 · 85 comments
Labels

Comments

@simon-mo
Copy link
Collaborator

simon-mo commented Jan 30, 2025

Please leave comments here about your usage of V1, does it work? does it not work? which feature do you need in order to adopt it? any bugs?

For bug report, please file it separately and link the issue here.

For in depth discussion, please feel free to join #sig-v1 in the vLLM Slack workspace.

@simon-mo simon-mo added the misc label Jan 30, 2025
@simon-mo simon-mo changed the title [V1] Feedback Threads [V1] Feedback Thread Jan 30, 2025
@simon-mo simon-mo removed the misc label Jan 30, 2025
@simon-mo simon-mo pinned this issue Jan 30, 2025
@wedobetter
Copy link

wedobetter commented Jan 30, 2025

👍 I have not done a proper benchmark but V1 feels superior, i.e. higher throughput + lower latency, TTFT.
The other thing that I have noticed is that logging has changed Running: 1 reqs, Waiting: 0 reqs, it used to print stats such token/s.

I have encountered a possible higher memory consumption issue, but am overall very pleased with the vllm community's hard work on V1.
#12529

@m-harmonic
Copy link

Does anyone know about this bug with n>1? Thanks
#12584

@robertgshaw2-redhat
Copy link
Collaborator

Does anyone know about this bug with n>1? Thanks #12584

Thanks, we are aware and have some ongoing PRs for it.

#10980

@robertgshaw2-redhat
Copy link
Collaborator

I have encountered a possible higher memory consumption issue, but am overall very pleased with the vllm community's hard work on V1.

Logging is in progress. Current main has a lot more and we will maintain compatibility with V0. Thanks!

@dchichkov
Copy link

Quick feedback [VLLM_USE_V1=1]:

  • n > 1 would be nice

  • guided_grammar (or anything guided really) would be nice

@robertgshaw2-redhat
Copy link
Collaborator

Quick feedback [VLLM_USE_V1=1]:

  • n > 1 would be nice
  • guided_grammar (or anything guided really) would be nice

Thanks, both are in progress

@hibukipanim
Copy link

are logprobs output (and specifically prompt logprobs with echo=True) expected to be working with current V1 (0.7.0)?
checking here before opening an issue to reproduce

@akshay-loci
Copy link

Maybe there is a better place to discuss this but the implementation for models that use more than one extra modality is quite non-intuitive. get_multimodal_embeddings() expects that we return a list or tensor of length equal to the number of multimodal items provided in the batch and we then have to make unintuitive assumptions on how the output passed into get_input_embeddings would look like because the batching being used while calling both functions is not the same. It would be much nicer if for example the input and output of get_multimodal_embeddings are dicts with the keys being the different modalities.

@robertgshaw2-redhat
Copy link
Collaborator

are logprobs output (and specifically prompt logprobs with echo=True) expected to be working with current V1 (0.7.0)? checking here before opening an issue to reproduce

Still in progress

@wedobetter
Copy link

👍 I have not done a proper benchmark but V1 feels superior, i.e. higher throughput + lower latency, TTFT. The other thing that I have noticed is that logging has changed Running: 1 reqs, Waiting: 0 reqs, it used to print stats such token/s.

I have encountered a possible higher memory consumption issue, but am overall very pleased with the vllm community's hard work on V1. #12529

Thanks for fixing metrics logs in 0.7.1!
Lack of pipeline parallelism in V1 is a show stopper for production deployments #11945

@Ouna-the-Dataweaver
Copy link

I'm either going insane, but with V1 qwen 8b instruct LLM just breaks in fp8 and around 25% of generations are just gibberish, with same running code and everything. Do I need to make a bug report, or it's an expected behaviour and I need some specific setup of sampling params for it to work in v1?

@FrederickVu
Copy link

The V1 engine doesn't seem to support logits processors or min-p filtering. Issue #12678

@gmonair
Copy link

gmonair commented Feb 3, 2025

Something is weird with memory calculation in V1 and tensor parallel. Here are 2 cases that I tested recently:

vllm 0.7.0 on 2x A6000:

Starting normally a 32b-awq model and using --max-model-len 32768 --gpu-memory-utilization 0.98 --tensor-parallel 2 --max-num-batched-tokens 32768 --max-seq-len-to-capture 32768

Everything works as previously, GPUs both get to ~44-46GB usage

Using VLLM_USE_V1=1 and the exact same parameters as above:

GPUs both load up to ~24-25GB and it slowly goes up as inference runs. I've seen it go up to 32GB on each GPU.

Updating to vllm 0.7.1 and running a 7b-awq model this time, I also noticed that running the above command "normally" the logs show Maximum concurrency at 44x

Using V1 I get:

INFO 02-02 23:26:19 kv_cache_utils.py:400] Maximum concurrency for 32768 tokens per request: **22.25x**

And finally, with vllm 0.7.0 and 4x L4 loading a 32b-awq model with tp 4 works in "normal mode", but OOMs with V1.

@Xarbirus
Copy link

Xarbirus commented Feb 3, 2025

I did a little experiment with DeepSeek-R1 on 8xH200 GPU.

vLLM 0.7.0 showed the following results with benchmark_serving.py --backend openai --base-url http://0.0.0.0:8000 --dataset-name=random --model deepseek-ai/DeepSeek-R1

  • with VLLM_USE_V1=1 (with --request-rate 4)
Traffic request rate: 4.0
Burstiness factor: 1.0 (Poisson process)
Maximum request concurrency: None
100%|█████████████████████████████████████████████████████████████| 1000/1000 [07:53<00:00,  2.11it/s]
============ Serving Benchmark Result ============
Successful requests:                     1000      
Benchmark duration (s):                  473.62    
Total input tokens:                      1024000   
Total generated tokens:                  119550    
Request throughput (req/s):              2.11      
Output token throughput (tok/s):         252.42    
Total Token throughput (tok/s):          2414.51   
---------------Time to First Token----------------
Mean TTFT (ms):                          100636.33 
Median TTFT (ms):                        103588.53 
P99 TTFT (ms):                           197277.97 
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          177.82    
Median TPOT (ms):                        172.14    
P99 TPOT (ms):                           363.05    
---------------Inter-token Latency----------------
Mean ITL (ms):                           173.08    
Median ITL (ms):                         136.46    
P99 ITL (ms):                            575.30    
==================================================
  • without VLLM_USE_V1 (with --request-rate 4)
Traffic request rate: 4.0
Burstiness factor: 1.0 (Poisson process)
Maximum request concurrency: None
100%|█████████████████████████████████████████████████████████████| 1000/1000 [05:24<00:00,  3.08it/s]
============ Serving Benchmark Result ============
Successful requests:                     1000      
Benchmark duration (s):                  324.29    
Total input tokens:                      1024000   
Total generated tokens:                  119163    
Request throughput (req/s):              3.08      
Output token throughput (tok/s):         367.46    
Total Token throughput (tok/s):          3525.12   
---------------Time to First Token----------------
Mean TTFT (ms):                          29022.37  
Median TTFT (ms):                        32492.50  
P99 TTFT (ms):                           54457.59  
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          125.16    
Median TPOT (ms):                        119.91    
P99 TPOT (ms):                           411.21    
---------------Inter-token Latency----------------
Mean ITL (ms):                           120.20    
Median ITL (ms):                         76.78     
P99 ITL (ms):                            656.11    
==================================================

In general, vLLM without VLLM_USE_V1 looked more productive. I also tried V0 with --request-rate 10 and got

Traffic request rate: 10.0
Burstiness factor: 1.0 (Poisson process)
Maximum request concurrency: None
100%|█████████████████████████████████████████████████████████████| 1000/1000 [05:16<00:00,  3.16it/s]
============ Serving Benchmark Result ============
Successful requests:                     1000      
Benchmark duration (s):                  316.20    
Total input tokens:                      1024000   
Total generated tokens:                  119448    
Request throughput (req/s):              3.16      
Output token throughput (tok/s):         377.76    
Total Token throughput (tok/s):          3616.21   
---------------Time to First Token----------------
Mean TTFT (ms):                          100122.09 
Median TTFT (ms):                        98699.05  
P99 TTFT (ms):                           201732.11 
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          139.61    
Median TPOT (ms):                        104.30    
P99 TPOT (ms):                           1276.91   
---------------Inter-token Latency----------------
Mean ITL (ms):                           105.90    
Median ITL (ms):                         76.35     
P99 ITL (ms):                            648.36    
==================================================

Throughput was still 2 times lower than SGLang in the same benchmark. Today I updated vLLM to the new version (0.7.1) and decided to repeat the experiment. And the results in version V0 have become much better!

  • without VLLM_USE_V1 (with --request-rate 4)
Traffic request rate: 4.0
Burstiness factor: 1.0 (Poisson process)
Maximum request concurrency: None
100%|█████████████████████████████████████████████████████████████| 1000/1000 [04:29<00:00,  3.71it/s]
============ Serving Benchmark Result ============
Successful requests:                     1000      
Benchmark duration (s):                  269.74    
Total input tokens:                      1024000   
Total generated tokens:                  119805    
Request throughput (req/s):              3.71      
Output token throughput (tok/s):         444.14    
Total Token throughput (tok/s):          4240.35   
---------------Time to First Token----------------
Mean TTFT (ms):                          368.78    
Median TTFT (ms):                        269.07    
P99 TTFT (ms):                           3826.70   
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          124.95    
Median TPOT (ms):                        122.03    
P99 TPOT (ms):                           214.93    
---------------Inter-token Latency----------------
Mean ITL (ms):                           123.32    
Median ITL (ms):                         75.30     
P99 ITL (ms):                            583.77    
==================================================
  • without VLLM_USE_V1 (with --request-rate 10)
Traffic request rate: 10.0
Burstiness factor: 1.0 (Poisson process)
Maximum request concurrency: None
100%|█████████████████████████████████████████████████████████████| 1000/1000 [02:26<00:00,  6.83it/s]
============ Serving Benchmark Result ============
Successful requests:                     1000      
Benchmark duration (s):                  146.43    
Total input tokens:                      1024000   
Total generated tokens:                  119701    
Request throughput (req/s):              6.83      
Output token throughput (tok/s):         817.48    
Total Token throughput (tok/s):          7810.75   
---------------Time to First Token----------------
Mean TTFT (ms):                          14575.11  
Median TTFT (ms):                        13606.50  
P99 TTFT (ms):                           29954.96  
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          297.01    
Median TPOT (ms):                        282.46    
P99 TPOT (ms):                           1393.69   
---------------Inter-token Latency----------------
Mean ITL (ms):                           262.67    
Median ITL (ms):                         132.89    
P99 ITL (ms):                            2840.40   
==================================================

But running vLLM with VLLM_USE_V1=1 I got en error TypeError: FlashAttentionImpl.__init__() got an unexpected keyword argument 'q_lora_rank' with previous warnings like

`torch.compile` is turned on, but the model deepseek-ai/DeepSeek-R1 does not support it. Please open an issue on GitHubif you want it to be supported.

@bao231
Copy link

bao231 commented Feb 4, 2025

v1 not support T4,are you support?

@bao231
Copy link

bao231 commented Feb 4, 2025

@simon-mo

@WoosukKwon
Copy link
Collaborator

Hi @bao231, V1 does not support T4 or older-generation GPUs since the kernel libraries used in V1 (e.g., flash-attn) do not support them.

@bao231
Copy link

bao231 commented Feb 4, 2025

V1 support other attention libs?has you plan? @WoosukKwon

@robertgshaw2-redhat
Copy link
Collaborator

I did a little experiment with DeepSeek-R1 on 8xH200 GPU.

vLLM 0.7.0 showed the following results with benchmark_serving.py --backend openai --base-url http://0.0.0.0:8000 --dataset-name=random --model deepseek-ai/DeepSeek-R1

  • with VLLM_USE_V1=1 (with --request-rate 4)
Traffic request rate: 4.0
Burstiness factor: 1.0 (Poisson process)
Maximum request concurrency: None
100%|█████████████████████████████████████████████████████████████| 1000/1000 [07:53<00:00,  2.11it/s]
============ Serving Benchmark Result ============
Successful requests:                     1000      
Benchmark duration (s):                  473.62    
Total input tokens:                      1024000   
Total generated tokens:                  119550    
Request throughput (req/s):              2.11      
Output token throughput (tok/s):         252.42    
Total Token throughput (tok/s):          2414.51   
---------------Time to First Token----------------
Mean TTFT (ms):                          100636.33 
Median TTFT (ms):                        103588.53 
P99 TTFT (ms):                           197277.97 
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          177.82    
Median TPOT (ms):                        172.14    
P99 TPOT (ms):                           363.05    
---------------Inter-token Latency----------------
Mean ITL (ms):                           173.08    
Median ITL (ms):                         136.46    
P99 ITL (ms):                            575.30    
==================================================
  • without VLLM_USE_V1 (with --request-rate 4)
Traffic request rate: 4.0
Burstiness factor: 1.0 (Poisson process)
Maximum request concurrency: None
100%|█████████████████████████████████████████████████████████████| 1000/1000 [05:24<00:00,  3.08it/s]
============ Serving Benchmark Result ============
Successful requests:                     1000      
Benchmark duration (s):                  324.29    
Total input tokens:                      1024000   
Total generated tokens:                  119163    
Request throughput (req/s):              3.08      
Output token throughput (tok/s):         367.46    
Total Token throughput (tok/s):          3525.12   
---------------Time to First Token----------------
Mean TTFT (ms):                          29022.37  
Median TTFT (ms):                        32492.50  
P99 TTFT (ms):                           54457.59  
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          125.16    
Median TPOT (ms):                        119.91    
P99 TPOT (ms):                           411.21    
---------------Inter-token Latency----------------
Mean ITL (ms):                           120.20    
Median ITL (ms):                         76.78     
P99 ITL (ms):                            656.11    
==================================================

In general, vLLM without VLLM_USE_V1 looked more productive. I also tried V0 with --request-rate 10 and got

Traffic request rate: 10.0
Burstiness factor: 1.0 (Poisson process)
Maximum request concurrency: None
100%|█████████████████████████████████████████████████████████████| 1000/1000 [05:16<00:00,  3.16it/s]
============ Serving Benchmark Result ============
Successful requests:                     1000      
Benchmark duration (s):                  316.20    
Total input tokens:                      1024000   
Total generated tokens:                  119448    
Request throughput (req/s):              3.16      
Output token throughput (tok/s):         377.76    
Total Token throughput (tok/s):          3616.21   
---------------Time to First Token----------------
Mean TTFT (ms):                          100122.09 
Median TTFT (ms):                        98699.05  
P99 TTFT (ms):                           201732.11 
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          139.61    
Median TPOT (ms):                        104.30    
P99 TPOT (ms):                           1276.91   
---------------Inter-token Latency----------------
Mean ITL (ms):                           105.90    
Median ITL (ms):                         76.35     
P99 ITL (ms):                            648.36    
==================================================

Throughput was still 2 times lower than SGLang in the same benchmark. Today I updated vLLM to the new version (0.7.1) and decided to repeat the experiment. And the results in version V0 have become much better!

  • without VLLM_USE_V1 (with --request-rate 4)
Traffic request rate: 4.0
Burstiness factor: 1.0 (Poisson process)
Maximum request concurrency: None
100%|█████████████████████████████████████████████████████████████| 1000/1000 [04:29<00:00,  3.71it/s]
============ Serving Benchmark Result ============
Successful requests:                     1000      
Benchmark duration (s):                  269.74    
Total input tokens:                      1024000   
Total generated tokens:                  119805    
Request throughput (req/s):              3.71      
Output token throughput (tok/s):         444.14    
Total Token throughput (tok/s):          4240.35   
---------------Time to First Token----------------
Mean TTFT (ms):                          368.78    
Median TTFT (ms):                        269.07    
P99 TTFT (ms):                           3826.70   
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          124.95    
Median TPOT (ms):                        122.03    
P99 TPOT (ms):                           214.93    
---------------Inter-token Latency----------------
Mean ITL (ms):                           123.32    
Median ITL (ms):                         75.30     
P99 ITL (ms):                            583.77    
==================================================
  • without VLLM_USE_V1 (with --request-rate 10)
Traffic request rate: 10.0
Burstiness factor: 1.0 (Poisson process)
Maximum request concurrency: None
100%|█████████████████████████████████████████████████████████████| 1000/1000 [02:26<00:00,  6.83it/s]
============ Serving Benchmark Result ============
Successful requests:                     1000      
Benchmark duration (s):                  146.43    
Total input tokens:                      1024000   
Total generated tokens:                  119701    
Request throughput (req/s):              6.83      
Output token throughput (tok/s):         817.48    
Total Token throughput (tok/s):          7810.75   
---------------Time to First Token----------------
Mean TTFT (ms):                          14575.11  
Median TTFT (ms):                        13606.50  
P99 TTFT (ms):                           29954.96  
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms):                          297.01    
Median TPOT (ms):                        282.46    
P99 TPOT (ms):                           1393.69   
---------------Inter-token Latency----------------
Mean ITL (ms):                           262.67    
Median ITL (ms):                         132.89    
P99 ITL (ms):                            2840.40   
==================================================

But running vLLM with VLLM_USE_V1=1 I got en error TypeError: FlashAttentionImpl.__init__() got an unexpected keyword argument 'q_lora_rank' with previous warnings like

`torch.compile` is turned on, but the model deepseek-ai/DeepSeek-R1 does not support it. Please open an issue on GitHubif you want it to be supported.

Thanks!

  • We are aware of the performance gap for DeepSeekV3 and are actively working on it. See [Perf] Mem align KV caches for CUDA devices (MLA perf improvement) #12676 which will resolve the gap. We will do a release hopefully today with this change
  • DeepSeekV3 is not yet supported on V1 since it requires chunked prefill. We are actively working on chunked prefill for MLA and hope to have it complete this week!

@robertgshaw2-redhat
Copy link
Collaborator

I'm either going insane, but with V1 qwen 8b instruct LLM just breaks in fp8 and around 25% of generations are just gibberish, with same running code and everything. Do I need to make a bug report, or it's an expected behaviour and I need some specific setup of sampling params for it to work in v1?

Can you provide a more detailed reproduction instruction?

cc @WoosukKwon

@robertgshaw2-redhat
Copy link
Collaborator

👍 I have not done a proper benchmark but V1 feels superior, i.e. higher throughput + lower latency, TTFT. The other thing that I have noticed is that logging has changed Running: 1 reqs, Waiting: 0 reqs, it used to print stats such token/s.
I have encountered a possible higher memory consumption issue, but am overall very pleased with the vllm community's hard work on V1. #12529

Thanks for fixing metrics logs in 0.7.1! Lack of pipeline parallelism in V1 is a show stopper for production deployments #11945

Thanks. We are actively working on PP

@robertgshaw2-redhat
Copy link
Collaborator

Maybe there is a better place to discuss this but the implementation for models that use more than one extra modality is quite non-intuitive. get_multimodal_embeddings() expects that we return a list or tensor of length equal to the number of multimodal items provided in the batch and we then have to make unintuitive assumptions on how the output passed into get_input_embeddings would look like because the batching being used while calling both functions is not the same. It would be much nicer if for example the input and output of get_multimodal_embeddings are dicts with the keys being the different modalities.

Check out #sig-multi-modality in our slack! This is the best place for a discussion like this

@robertgshaw2-redhat
Copy link
Collaborator

Something is weird with memory calculation in V1 and tensor parallel. Here are 2 cases that I tested recently:

vllm 0.7.0 on 2x A6000:

Starting normally a 32b-awq model and using --max-model-len 32768 --gpu-memory-utilization 0.98 --tensor-parallel 2 --max-num-batched-tokens 32768 --max-seq-len-to-capture 32768

Everything works as previously, GPUs both get to ~44-46GB usage

Using VLLM_USE_V1=1 and the exact same parameters as above:

GPUs both load up to ~24-25GB and it slowly goes up as inference runs. I've seen it go up to 32GB on each GPU.

Updating to vllm 0.7.1 and running a 7b-awq model this time, I also noticed that running the above command "normally" the logs show Maximum concurrency at 44x

Using V1 I get:

INFO 02-02 23:26:19 kv_cache_utils.py:400] Maximum concurrency for 32768 tokens per request: **22.25x**

And finally, with vllm 0.7.0 and 4x L4 loading a 32b-awq model with tp 4 works in "normal mode", but OOMs with V1.

Its pretty hard to follow what you are seeing. Please attach:

  • launch command
  • logs

Thanks!

@gmonair
Copy link

gmonair commented Feb 4, 2025

Its pretty hard to follow what you are seeing. Please attach:

* launch command

* logs

Hi, please see vllm_output(27)-OOM.log for OOM on 4x L4 and vllm_output(28)-WORKS.log to compare. The only difference between them is the V1 flag.

Launch command

my_env = os.environ.copy()
my_env["VLLM_USE_V1"] = "0"

# background task
command = [
    "python", 
    "-m", 
    "vllm.scripts", 
    "serve",
    "/kaggle/input/qwen25/transformers/r1-32b-awq/1",
    "--served-model-name", "model",
    "--tensor_parallel_size", "4",
    "--gpu_memory_utilization", "0.95",
    "--port", "9901",
    "--max-num-batched-tokens", "32768",
    "--max-seq-len-to-capture", "32768",
    "--max-model-len", "32768",
    "--enable_prefix_caching",
]

process = subprocess.Popen(command, stdout=log_file, stderr=log_file, env=my_env)

vllm_output(28)-WORKS.log
vllm_output(27)-OOM.log

@njhill njhill added the v1 label Feb 4, 2025
@DefinitlyEvil
Copy link

[ngram] Speculative decoding is easy to generate repeat texts for multilingual tasks.

Speculative decoding is using larger model as "error correction" for the tiny model, repetitive text might be caused by your larger model, speculative decoding should (in theory) only accelerate the generation instead of interfering with the generated text.

But the larger model works well. That's weird. And it often generates repetitive text when there are multiple requests at the same time.

Please also try same seed, or zero temperature, without speculative decoding to see if problem exists.

@JaheimLee
Copy link

[ngram] Speculative decoding is easy to generate repeat texts for multilingual tasks.

Speculative decoding is using larger model as "error correction" for the tiny model, repetitive text might be caused by your larger model, speculative decoding should (in theory) only accelerate the generation instead of interfering with the generated text.

But the larger model works well. That's weird. And it often generates repetitive text when there are multiple requests at the same time.

Please also try same seed, or zero temperature, without speculative decoding to see if problem exists.

It's related to this pr

@LiuXiaoxuanPKU
Copy link
Collaborator

[ngram] Speculative decoding is easy to generate repeat texts for multilingual tasks.

Speculative decoding is using larger model as "error correction" for the tiny model, repetitive text might be caused by your larger model, speculative decoding should (in theory) only accelerate the generation instead of interfering with the generated text.

But the larger model works well. That's weird. And it often generates repetitive text when there are multiple requests at the same time.

Please also try same seed, or zero temperature, without speculative decoding to see if problem exists.

It's related to this pr

Could you try main again and see if it is fixed? Thanks!

@s-banach

This comment has been minimized.

@K-e-t-i
Copy link

K-e-t-i commented Mar 14, 2025

Hi, are you already working on resolving the size mismatch issue when loading the MixtralForCausalLM GGUF model?
Details: #14423

@MichoChan
Copy link

#14915 hi, i meet this bug

@Happy2Git
Copy link

Happy2Git commented Mar 18, 2025

#15046 When trying one of the listed supported models with architecture StableLMForCausalLM, stabilityai/stablelm-base-alpha-7b-v2 , I got the error StableLMAlphaForCausalLM has no vLLM implementation.

@jifa513
Copy link

jifa513 commented Mar 19, 2025

Is it possible to close prefix-caching in V1 ?

@saattrupdan
Copy link

saattrupdan commented Mar 19, 2025

Hi. V1 only supports using the XGrammar backend for structured generation, but XGrammar does not support as many JSON schemas as Outlines. Specifically, I'm using conlist(str, max_length=5) in my Pydantic class, which doesn't work with XGrammar. Outlines can support this just fine, but that's not permitted in V1.

@robertgshaw2-redhat
Copy link
Collaborator

Is it possible to close prefix-caching in V1 ?

You can set --no-enable-prefix-caching. However, there is no overhead from prefix caching so we suggest enabling it

@robertgshaw2-redhat
Copy link
Collaborator

Hi. V1 only supports using the XGrammar backend for structured generation, but XGrammar does not support as many JSON schemas as Outlines. Specifically, I'm using conlist(str, max_length=5) in my Pydantic class, which doesn't work with XGrammar. Outlines can support this just fine, but that's not permitted in V1.

We are aware and are close to finishing other structured generation backends in V1. Ideally EOW

@robertgshaw2-redhat
Copy link
Collaborator

I rely on min_tokens for some benchmarks I want to run. Will V1 eventually support this?

I would suggest using --ignore-eos rather than min_tokens for benchmarking. This will allow you to control the exact length of the generations. However, Are you having an issue with min_tokens? This should be working

@sethkimmel3
Copy link
Contributor

Have to disable v1 engine due to this small restriction: #15252. Will x-post in the Slack for vis.

@DanlinJia
Copy link

I have documented the results of my experiments comparing the throughput of V0 and V1 in a newly created issue. The findings suggest that when GPU memory is fully utilized, preemption occurs, and V1 fails to demonstrate a significant throughput advantage over V0. Can anyone explain why this happens?

@oyerli
Copy link

oyerli commented Mar 21, 2025

We've encountered a critical memory leak when using the V1 engine for image inference — system RAM usage exceeds 200 GB over time. Full bug report with reproduction steps and details can be found here: #15294.

@vrdn-23
Copy link
Contributor

vrdn-23 commented Mar 23, 2025

Just wanted to leave a quick comment here that I think the default value of --max-num-seqs should be left at the same V0 default rather than being upped to 1024 (or maybe set to a much more milder jump) because it is inevitably causing a huge source of confusion for folks who had not set that value but are now running into OOM issues with the new default just by updating versions.

@robertgshaw2-redhat
Copy link
Collaborator

We've encountered a critical memory leak when using the V1 engine for image inference — system RAM usage exceeds 200 GB over time. Full bug report with reproduction steps and details can be found here: #15294.

Thanks. We have resolved this and will do a hotfix.

@robertgshaw2-redhat
Copy link
Collaborator

Have to disable v1 engine due to this small restriction: #15252. Will x-post in the Slack for vis.

Thanks!

@robertgshaw2-redhat
Copy link
Collaborator

Just wanted to leave a quick comment here that I think the default value of --max-num-seqs should be left at the same V0 default rather than being upped to 1024 (or maybe set to a much more milder jump) because it is inevitably causing a huge source of confusion for folks who had not set that value but are now running into OOM issues with the new default just by updating versions.

Can you share more about what is causing OOM? Is this during profiling? The value of --max-num-seqs should not cause OOM during runtime. It would be helpful if you can share more of your use case so we can check it out.

@vrdn-23
Copy link
Contributor

vrdn-23 commented Mar 24, 2025

@robertgshaw2-redhat I'm not sure whether this is during the profiling step but essentially our deployments started running into these errors during engine start-up for the meta-llama/Llama-Guard-3-8B model after upgrading to v0.8.1.

INFO 03-24 04:03:54 [loader.py:429] Loading weights took 28.34 seconds                                                                                                                                           │
│ INFO 03-24 04:03:55 [gpu_model_runner.py:1176] Model loading took 14.9888 GB and 28.719376 seconds                                                                                                               │
│ INFO 03-24 04:04:03 [backends.py:409] Using cache directory: /root/.cache/vllm/torch_compile_cache/855dafa5cf/rank_0_0 for vLLM's torch.compile                                                                  │
│ INFO 03-24 04:04:03 [backends.py:419] Dynamo bytecode transform time: 8.79 s                                                                                                                                     │
│ INFO 03-24 04:04:07 [backends.py:132] Cache the graph of shape None for later use                                                                                                                                │
│ INFO 03-24 04:04:37 [backends.py:144] Compiling a graph for general shape takes 33.10 s                                                                                                                          │
│ INFO 03-24 04:04:49 [monitor.py:33] torch.compile takes 41.89 s in total                                                                                                                                         │
│ ERROR 03-24 04:04:50 [core.py:340] EngineCore hit an exception: Traceback (most recent call last):                                                                                                               │
│ ERROR 03-24 04:04:50 [core.py:340]   File "/app/.venv/lib/python3.12/site-packages/vllm/v1/engine/core.py", line 332, in run_engine_core                                                                         │
│ ERROR 03-24 04:04:50 [core.py:340]     engine_core = EngineCoreProc(*args, **kwargs)                                                                                                                             │
│ ERROR 03-24 04:04:50 [core.py:340]                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                             │
│ ERROR 03-24 04:04:50 [core.py:340]   File "/app/.venv/lib/python3.12/site-packages/vllm/v1/engine/core.py", line 287, in __init__                                                                                │
│ ERROR 03-24 04:04:50 [core.py:340]     super().__init__(vllm_config, executor_class, log_stats)                                                                                                                  │
│ ERROR 03-24 04:04:50 [core.py:340]   File "/app/.venv/lib/python3.12/site-packages/vllm/v1/engine/core.py", line 62, in __init__                                                                                 │
│ ERROR 03-24 04:04:50 [core.py:340]     num_gpu_blocks, num_cpu_blocks = self._initialize_kv_caches(                                                                                                              │
│ ERROR 03-24 04:04:50 [core.py:340]                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                              │
│ ERROR 03-24 04:04:50 [core.py:340]   File "/app/.venv/lib/python3.12/site-packages/vllm/v1/engine/core.py", line 124, in _initialize_kv_caches                                                                   │
│ ERROR 03-24 04:04:50 [core.py:340]     kv_cache_configs = get_kv_cache_configs(vllm_config, kv_cache_specs,                                                                                                      │
│ ERROR 03-24 04:04:50 [core.py:340]                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                      │
│ ERROR 03-24 04:04:50 [core.py:340]   File "/app/.venv/lib/python3.12/site-packages/vllm/v1/core/kv_cache_utils.py", line 576, in get_kv_cache_configs                                                            │
│ ERROR 03-24 04:04:50 [core.py:340]     check_enough_kv_cache_memory(vllm_config, kv_cache_spec,                                                                                                                  │
│ ERROR 03-24 04:04:50 [core.py:340]   File "/app/.venv/lib/python3.12/site-packages/vllm/v1/core/kv_cache_utils.py", line 468, in check_enough_kv_cache_memory                                                    │
│ ERROR 03-24 04:04:50 [core.py:340]     raise ValueError("No available memory for the cache blocks. "                                                                                                             │
│ ERROR 03-24 04:04:50 [core.py:340] ValueError: No available memory for the cache blocks. Try increasing `gpu_memory_utilization` when initializing the engine.                                                   │
│ ERROR 03-24 04:04:50 [core.py:340]                                                                                                                                                                               │
│ CRITICAL 03-24 04:04:50 [core_client.py:269] Got fatal signal from worker processes, shutting down. See stack trace above for root cause issue. 

We do not see the error if we manually set the max_num_seqs value to 128 which is something I realized was the problem after looking at this issue (#14992 (comment)).
Let me know if you would like to provide any additional info

@rajveerb
Copy link
Contributor

Is there a temporary way to get around the max_num_seqs in v1?

I'm running into the same issue as (#14992) with v0.7.2.

@Ucag
Copy link

Ucag commented Mar 26, 2025

OOM issue after upgrade to v0.8. Same configuration should work on preceding vllm version. I'm deploying a 72b AWQ model on 8x4090, which works fine with 128k context length. Things go wrong after I upgrade to latest version (0.8.2), no matter what number of max_model_len or max_num_seqs, there is always OOM. I had to disable v1 feature by VLLM_USE_V1=0.

I event set max_num_seqs to 1 and max_model_len to 10240(10k), OOM still exits.

@win9killhuaxiong
Copy link

when l use 8*H20 * 2 to run DeepSeek-R1 with vllm0.8.2, l get a terrible error,please help kids

2025-03-28 07:55:36,878 INFO worker.py:1660 -- Connecting to existing Ray cluster at address: 7.216.55.218:6379...
2025-03-28 07:55:36,888 INFO worker.py:1843 -- Connected to Ray cluster. View the dashboard at 127.0.0.1:8265
ERROR 03-28 07:55:36 [core.py:343] EngineCore hit an exception: Traceback (most recent call last):
ERROR 03-28 07:55:36 [core.py:343] File "/usr/local/lib/python3.10/dist-packages/vllm/v1/engine/core.py", line 335, in run_engine_core
ERROR 03-28 07:55:36 [core.py:343] engine_core = EngineCoreProc(*args, **kwargs)
ERROR 03-28 07:55:36 [core.py:343] File "/usr/local/lib/python3.10/dist-packages/vllm/v1/engine/core.py", line 290, in init
ERROR 03-28 07:55:36 [core.py:343] super().init(vllm_config, executor_class, log_stats)
ERROR 03-28 07:55:36 [core.py:343] File "/usr/local/lib/python3.10/dist-packages/vllm/v1/engine/core.py", line 60, in init
ERROR 03-28 07:55:36 [core.py:343] self.model_executor = executor_class(vllm_config)
ERROR 03-28 07:55:36 [core.py:343] File "/usr/local/lib/python3.10/dist-packages/vllm/executor/executor_base.py", line 271, in init
ERROR 03-28 07:55:36 [core.py:343] super().init(*args, **kwargs)
ERROR 03-28 07:55:36 [core.py:343] File "/usr/local/lib/python3.10/dist-packages/vllm/executor/executor_base.py", line 52, in init
ERROR 03-28 07:55:36 [core.py:343] self._init_executor()
ERROR 03-28 07:55:36 [core.py:343] File "/usr/local/lib/python3.10/dist-packages/vllm/executor/ray_distributed_executor.py", line 105, in _init_executor
ERROR 03-28 07:55:36 [core.py:343] initialize_ray_cluster(self.parallel_config)
ERROR 03-28 07:55:36 [core.py:343] File "/usr/local/lib/python3.10/dist-packages/vllm/executor/ray_utils.py", line 299, in initialize_ray_cluster
ERROR 03-28 07:55:36 [core.py:343] ray.init(address=ray_address)
ERROR 03-28 07:55:36 [core.py:343] File "/usr/local/lib/python3.10/dist-packages/ray/_private/client_mode_hook.py", line 103, in wrapper
ERROR 03-28 07:55:36 [core.py:343] return func(*args, **kwargs)
ERROR 03-28 07:55:36 [core.py:343] File "/usr/local/lib/python3.10/dist-packages/ray/_private/worker.py", line 1854, in init
ERROR 03-28 07:55:36 [core.py:343] connect(
ERROR 03-28 07:55:36 [core.py:343] File "/usr/local/lib/python3.10/dist-packages/ray/_private/worker.py", line 2325, in connect
ERROR 03-28 07:55:36 [core.py:343] faulthandler.enable(all_threads=False)
ERROR 03-28 07:55:36 [core.py:343] OSError: [Errno 12] Cannot allocate memory
ERROR 03-28 07:55:36 [core.py:343]
INFO 03-28 07:55:36 [ray_distributed_executor.py:127] Shutting down Ray distributed executor. If you see error log from logging.cc regarding SIGTERM received, please ignore because this is the expected termination process in Ray.
CRITICAL 03-28 07:55:36 [core_client.py:269] Got fatal signal from worker processes, shutting down. See stack trace above for root cause issue.
Killed

@hmellor
Copy link
Member

hmellor commented Mar 28, 2025

@win9killhuaxiong could this be a host OOM? Can you monitor your host memory when this error is thrown?

@win9killhuaxiong
Copy link

@win9killhuaxiong could this be a host OOM? Can you monitor your host memory when this error is thrown?

not OOM,when l start service,the memory is not change, maybe is ray bug

@lbeisteiner
Copy link

Hi team! I've encountered another error when using ngram-speculative decoding on v1, see #16058. Thanks a lot for your help on my previous issue #13673!

@mkgs210
Copy link

mkgs210 commented Apr 4, 2025

Model: RefalMachine/RuadaptQwen2.5-1.5B-instruct
Vllm version: 0.8.2
command: VLLM_USE_V1=0 vllm serve RefalMachine/RuadaptQwen2.5-1.5B-instruct --device cuda --gpu-memory-utilization 0.98 --enforce-eager --quantization fp8 --port 8002 and also without eager, quantization and with V1
Testing was done on one message at a time

Image

I measured model Qwen2.5-1.5B-instruct. I was extremely surprised by the results. Now I see the point of using v1 only for structured output in full accuracy. In other cases, the results will be worse, or about the same.
I am also extremely disappointed with the speed of the model in fp8, which dropped 4-8 times in v1, and without eager the mod works even slower than with it.

@s-banach
Copy link

s-banach commented Apr 8, 2025

V1 seems consistently a lot slower with speculative decode compared to the old engine. Using Qwen 14B+1.5B.

@dtransposed
Copy link

dtransposed commented Apr 10, 2025

Hey team!

NotImplementedError: VLLM_USE_V1=1 is not supported with --task classify

Would this be something on the immediate roadmap?

Thanks for your hard work, V1, in general, looks so promising and more hackable than the slightly over-bloated V0!

Edit: I've just learned that the PR is already there: #16188

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests