-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
LLM: Partial Prefilling for Pipeline Parallel Serving #11457
LLM: Partial Prefilling for Pipeline Parallel Serving #11457
Conversation
def prepare_batch(self, cur_batch): | ||
if self.rank == 0: | ||
cur_input_start = cur_batch.prefilled_index | ||
if self.max_prefilled_seqs > 0: |
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.
Do we need to set cur_batch.partial_prefilling = 0, when max_prefilled_seqs==0.
@@ -146,6 +146,8 @@ def pipeline_parallel(model, pipeline_parallel_stages): | |||
model._modules['lm_head'] = DummyLayer() | |||
|
|||
model.pipeline_parallel_stages = pipeline_parallel_stages | |||
model.layer_start = layer_start |
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.
Can we replace gloabal layer_start and layer_end with model.layer-start etc
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.
LGTM
…s#11457) LLM: Partial Prefilling for Pipeline Parallel Serving
Description
Add continuous-batching-like partial prefilling to reduce the memory peak during prefilling.
Below is an example with a
batch_size=4, max_prefilled_seqs=2
BatchTask:4. How to test?
1234
). And paste your action link here once it has been successfully finished.https://github.com/intel-analytics/ipex-llm-workflow/actions/runs/9802540844