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

Recompute when the deadlock is detected #278

Merged
merged 6 commits into from
Nov 10, 2023

Conversation

tohtana
Copy link
Contributor

@tohtana tohtana commented Nov 9, 2023

Wit this PR, the scheduler clears the KV cache and recomputes it when the deadlock is detected.

@@ -147,6 +147,10 @@ class RaggedRequest:
_generated_tokens: List[torch.Tensor] = field(default_factory=list)
_finish_reason: GenerationFinishReason = GenerationFinishReason.NONE

@property
def prompt_length(self) -> int:
Copy link
Contributor

Choose a reason for hiding this comment

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

In the case we have deadlock, the prompt_length will be incorrect on the output. Perhaps we need to store original_prompt_length or something like that. Don't worry about this for now. I have plans to expand the output details and can handle this in a future PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, you are right. I would appreciate it if you could fix it on your PR

@mrwyattii mrwyattii merged commit fe14d75 into main Nov 10, 2023
@mrwyattii mrwyattii deleted the tohtana/recompute-after-deadlock branch November 10, 2023 00:59
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