[BugFix] support real batch_size - #3109
Merged
Merged
Conversation
…tar_model_runner.py
|
Thanks for your contribution! |
Collaborator
|
LGTM |
hong19860320
reviewed
Aug 5, 2025
| ) -> Optional[ModelRunnerOutput]: | ||
| """ """ | ||
| output = self.model_runner.execute_model(model_forward_batch) | ||
| if not is_dummy_run: |
Collaborator
There was a problem hiding this comment.
为什么需要区分是否 is_dummy_run ?
Collaborator
Author
There was a problem hiding this comment.
这里写反了,已修改,因为xpu里面dummy_run用的execute_model,而num_running_requests不可能为空,而dummy_run这个传不进去,所以在这里做了判断,dummy_run的时候不做切分
carryyu
reviewed
Aug 5, 2025
| self.model_inputs["block_tables"][idx : idx + 1, :block_num] = np.arange( | ||
| idx * block_num, (idx + 1) * block_num, 1 | ||
| ) | ||
| self.model_inputs["seq_lens_this_time"] = self.seq_lens_this_time_buffer |
| ) | ||
|
|
||
| def insert_prefill_inputs(self, req_dicts: List[Request]): | ||
| def insert_prefill_inputs(self, req_dicts: List[Request], num_running_requests): |
ltd0924
approved these changes
Aug 5, 2025
lizexu123
added a commit
to lizexu123/FastDeploy
that referenced
this pull request
Aug 5, 2025
* support real bsz * fix * fix xpu_model_runner.py,gpu_model_runner.py,gcu_model_runner.py,iluvatar_model_runner.py * add event_loop_ep * fix * Add comments * fix * support mtp real_batch_size * fix * self.tmp_seq_lens_this_time->self.seq_lens_this_time_buffer * fix * fix VL real_seq_lens_this_time * fix * fix mtp * fix * fix mtp * fix xpu * fix
Jiang-Jia-Jun
pushed a commit
that referenced
this pull request
Aug 6, 2025
* support real bsz * fix * fix xpu_model_runner.py,gpu_model_runner.py,gcu_model_runner.py,iluvatar_model_runner.py * add event_loop_ep * fix * Add comments * fix * support mtp real_batch_size * fix * self.tmp_seq_lens_this_time->self.seq_lens_this_time_buffer * fix * fix VL real_seq_lens_this_time * fix * fix mtp * fix * fix mtp * fix xpu * fix
iosmers
added a commit
that referenced
this pull request
Aug 8, 2025
xiaoguoguo626807
pushed a commit
to xiaoguoguo626807/FastDeploy
that referenced
this pull request
May 7, 2026
* support real bsz * fix * fix xpu_model_runner.py,gpu_model_runner.py,gcu_model_runner.py,iluvatar_model_runner.py * add event_loop_ep * fix * Add comments * fix * support mtp real_batch_size * fix * self.tmp_seq_lens_this_time->self.seq_lens_this_time_buffer * fix * fix VL real_seq_lens_this_time * fix * fix mtp * fix * fix mtp * fix xpu * fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the inference logic to use num_running_requests instead of max_num_seqs; the latter brought clear gains on smaller models.