1.fix the bug of draft model with ep 2.fix sampler bug (#4589)

This commit is contained in:
RAM
2025-10-27 17:47:34 +08:00
committed by GitHub
parent 8aab4e367f
commit 25a983ba9c
2 changed files with 12 additions and 2 deletions

View File

@@ -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,
)