mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 08:37:06 +08:00
[BugFix] Add prefill restrictions for chunked_prefill+VL (#2983)
This commit is contained in:
@@ -150,10 +150,17 @@ class GPUModelRunner(ModelRunnerBase):
|
||||
"""
|
||||
Check whether prefill stage finished
|
||||
"""
|
||||
if int(paddle.max(self.share_inputs["seq_lens_encoder"])) != 0:
|
||||
return 1
|
||||
if self.enable_mm:
|
||||
# VL only support 1 batch to prefill
|
||||
prefill_statue = (self.share_inputs["seq_lens_this_time"] != 0) & (
|
||||
self.share_inputs["seq_lens_this_time"] != 1
|
||||
)
|
||||
return not paddle.any(prefill_statue).numpy()
|
||||
else:
|
||||
return 0
|
||||
if int(paddle.max(self.share_inputs["seq_lens_encoder"])) != 0:
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
|
||||
def _init_speculative_proposer(self):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user