-
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
Parallel sampling eviction #157
Parallel sampling eviction #157
Conversation
bc3dc83
to
9fb9261
Compare
* add discord link * empty line * fix
f"since it has generated more than {self.max_num_batched_tokens} tokens in total" | ||
"and currently we do not support preempting such request.", | ||
) | ||
continue |
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 @elvin-n Please be aware of this limitation. Due to this, there is still a case when a parallel-sampling request is cancelled rather than preempted.
In general, we don't have a good solution for preempting a request which has generated more than max_num_batched_tokens
tokens. See also #163. The easiest solution would be to stop generation at max_num_batched_tokens
, but then we cannot support "unlimited" generation.
The most interesting change is in
engine_common.py
where I use onePrefillRequest
andEvalMultiQueryRequest
for each sequence to restore cache entries for parallel-sampling requests.I couldn't find a good way to test this pragmatically. The way I tested it was to change the condition https://github.com/octoml/mlc-llm/blob/batch-serving/serve/mlc_serve/engine/engine_common.py#L327 depending on model / input to manually cause an eviction.
Ready for review @sunggg @elvin-n