-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix hanging on prompt counts > max model context len #74
Conversation
@@ -85,7 +85,7 @@ async def generate(self, request: Request) -> AsyncIterator[RequestOutput]: | |||
if output.is_finished: | |||
return | |||
except asyncio.CancelledError: | |||
asyncio.to_thread(self.engine.cancel, request.request_id) | |||
await asyncio.to_thread(self.engine.cancel, request.request_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jroesch The bug fix is included here
@@ -58,7 +58,7 @@ def __init__( | |||
self.cache_manager = model_module.cache_manager | |||
self.tokenizer = model_module.tokenizer | |||
self.model_artifact_config = model_module.model_artifact_config | |||
|
|||
self.max_context_length = self.model_artifact_config.max_context_length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sunggg I'm assuming that max_context_length
is always available in the artifact. Let me know if it is not the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. It is safe to assume so at least for the models of our current interests.
* fix cancelled request not awaited * fix working * compare against max_context_len --------- Co-authored-by: Masahiro Masuda <[email protected]>
No description provided.