[Perf][Model Runner V2] Compact sampling masks on GPU instead of unpacking the full-vocab bitmask on CPU (#54901)

Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: vx120 <893600387@qq.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: vx120 <893600387@qq.com>
This commit is contained in:
aoshen02
2026-09-03 19:03:36 -07:00
committed by GitHub
co-authored by Claude Fable 5.1 vx120
parent d6bce42983
commit 560ef78bfe
10 changed files with 188 additions and 108 deletions
+7
View File
@@ -2709,6 +2709,13 @@ class VllmConfig:
# fixed-width logprobs gather cannot reasonably size for.
blockers.append("max_logprobs is -1, allowing vocab-size logprob requests")
if self.model_config is not None and self.model_config.return_sampling_mask:
# gather_sampler_output() drops SamplingMaskTensors: masks come back None.
blockers.append(
"return_sampling_mask is set and the batch-sharded gather does "
"not forward sampling masks"
)
if (
self.speculative_config is not None
and self.speculative_config.enable_adaptive_verification