mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
1.fix the bug of draft model with ep 2.fix sampler bug (#4589)
This commit is contained in:
@@ -567,6 +567,7 @@ class SpeculativeSampler(nn.Layer):
|
||||
max_model_len: int,
|
||||
share_inputs: List[paddle.Tensor],
|
||||
accept_all_drafts: bool = False,
|
||||
reject_all_drafts: bool = False,
|
||||
) -> paddle.Tensor:
|
||||
""" """
|
||||
|
||||
@@ -622,7 +623,7 @@ class SpeculativeSampler(nn.Layer):
|
||||
max_model_len,
|
||||
self.speculative_verify_window,
|
||||
True, # enable_topp
|
||||
self.speculative_benchmark_mode,
|
||||
(self.speculative_benchmark_mode or reject_all_drafts),
|
||||
accept_all_drafts,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user