[MRV2][XPU] use xpu sample kernel in mrv2 sampler (#57277)
Signed-off-by: zhenwei-intel <zhenwei.liu@intel.com> Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
co-authored by
Kunshang Ji
parent
76ee20c1ec
commit
6654bcbfca
@@ -58,7 +58,7 @@ class GPUWatermarkSampler(Sampler):
|
||||
pos: torch.Tensor,
|
||||
top_k: torch.Tensor | None,
|
||||
top_p: torch.Tensor | None,
|
||||
use_flashinfer: bool,
|
||||
use_fused_sampler: bool,
|
||||
) -> tuple[torch.Tensor, torch.Tensor]:
|
||||
enabled = self.watermarking.np[idx_mapping_np] & (
|
||||
self.sampling_states.temperature.np[idx_mapping_np] != 0
|
||||
@@ -71,7 +71,7 @@ class GPUWatermarkSampler(Sampler):
|
||||
pos,
|
||||
top_k,
|
||||
top_p,
|
||||
use_flashinfer,
|
||||
use_fused_sampler,
|
||||
)
|
||||
|
||||
processed_logits = apply_top_k_top_p(processed_logits, top_k, top_p)
|
||||
|
||||
Reference in New Issue
Block a user