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

Fix hanging on prompt counts > max model context len #74

Merged
merged 3 commits into from
Nov 21, 2023

Conversation

masahi
Copy link
Member

@masahi masahi commented Nov 21, 2023

No description provided.

@@ -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)
Copy link
Member Author

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
Copy link
Member Author

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.

Copy link
Member

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.

@masahi masahi merged commit e06cb16 into octoml:batch-serving Nov 21, 2023
5 checks passed
masahi added a commit that referenced this pull request Nov 21, 2023
* fix cancelled request not awaited

* fix working

* compare against max_context_len

---------

Co-authored-by: Masahiro Masuda <[email protected]>
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