Skip to content

[BugFix] Fix recovery logic for sequence group#2186

Merged
WoosukKwon merged 2 commits intomainfrom
fix-recovery
Dec 21, 2023
Merged

[BugFix] Fix recovery logic for sequence group#2186
WoosukKwon merged 2 commits intomainfrom
fix-recovery

Conversation

@WoosukKwon
Copy link
Copy Markdown
Collaborator

When a sequence group has N sequences, N - 1 of which are terminated, the remaining sequence can be recovered from preemption using the re-computation mechanism. However, currently the scheduler assumes that every sequence in a waiting sequence group is in the waiting state. This PR fixes this error.

An example test case:

from vllm import LLM, SamplingParams

# Configured for A100-80GB GPU.
llm = LLM("meta-llama/Llama-2-13b-hf", gpu_memory_utilization=0.5, swap_space=20)

num_prompts = 1000
prompt_len = 300
llm.generate(
    prompt_token_ids=[[0] * prompt_len for _ in range(num_prompts)],
    sampling_params=SamplingParams(max_tokens=100, n=2))

@WoosukKwon
Copy link
Copy Markdown
Collaborator Author

@zhuohan123 This PR is ready for review. Please take a look at it!

Copy link
Copy Markdown
Member

@zhuohan123 zhuohan123 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants