Fix more broken speculative decode tests (#17450)

Signed-off-by: Huy Do <huydhn@gmail.com>
This commit is contained in:
Huy Do
2025-05-01 06:05:58 -07:00
committed by GitHub
parent 2007d4d54f
commit b74d888c63
4 changed files with 9 additions and 4 deletions
+5
View File
@@ -51,9 +51,14 @@ class MultiStepWorker(ProposerWorkerBase, DelegateWorkerBase):
def set_include_gpu_probs_tensor(self) -> None:
# Need include_gpu_probs_tensor for MultiStepWorker
self.model_runner.sampler.include_gpu_probs_tensor = True
if hasattr(self.model_runner.model, "sampler"):
(self.model_runner.model.sampler.include_gpu_probs_tensor) = True
def set_should_modify_greedy_probs_inplace(self) -> None:
self.model_runner.sampler.should_modify_greedy_probs_inplace = True
if hasattr(self.model_runner.model, "sampler"):
(self.model_runner.model.sampler.should_modify_greedy_probs_inplace
) = True
@torch.inference_mode()
def sampler_output(