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

Add VLLM_SCHED_PREFILL_KVC_FREEPCT #89

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sanyalington
Copy link

Add VLLM_SCHED_PREFILL_KVC_FREEPCT feature to schedule prefill only when percentage of kv cache is free.
To enable this feature export VLLM_SCHED_PREFILL_KVC_FREEPCT= (float num>0.0).
This helps in large Batch Size offline inference scenarios where prefills can be batched and scheduled when a certain percentage of KV cache is free. If KV cache is below VLLM_SCHED_PREFILL_KVC_FREEPCT, no prefills will be scheduled and decode gets priority. As sequences finish decode, kv cache gets freed up.

@shajrawi shajrawi requested a review from gshtras July 18, 2024 15:16
@@ -24,6 +24,9 @@
ARTIFICIAL_PREEMPTION_MAX_CNT = 500


VLLM_SCHED_PREFILL_KVC_FREEPCT = float(
os.getenv("VLLM_SCHED_PREFILL_KVC_FREEPCT", 0.0)) # noqa
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please move to envs.py

Copy link

This pull request has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this pull request should remain open. Thank you!

@github-actions github-actions bot added the stale label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants