vllm.v1.watermarking
¶
Modules:
-
gpu_sampler– -
gumbel–Gumbel-max watermark generation and detection primitives.
-
prfs– -
spec_decode– -
watermarker–
Classes:
-
DualKeyGumbelWatermarkDetector–Detect a dual-key watermark with weighted early fusion.
-
PhiloxPRF–Accelerator-friendly Philox4x32-10 watermark PRF.
-
SupportsSpeculativeDecoding–A watermarker compatible with standard speculative rejection sampling.
-
Watermarker–
DualKeyGumbelWatermarkDetector
¶
Bases: GumbelWatermarkDetector
Detect a dual-key watermark with weighted early fusion.
alpha is the weight assigned to key B; key A receives 1 - alpha.
Source code in vllm/v1/watermarking/gumbel.py
PhiloxPRF
¶
Bases: WatermarkPRF
Accelerator-friendly Philox4x32-10 watermark PRF.
Source code in vllm/v1/watermarking/prfs/philox.py
SupportsSpeculativeDecoding
¶
Bases: Protocol
A watermarker compatible with standard speculative rejection sampling.
Source code in vllm/v1/watermarking/watermarker.py
Watermarker
¶
Bases: ABC
Source code in vllm/v1/watermarking/watermarker.py
_try_sample_block(logits, num_steps, random_sampler, state)
¶
Sample a (request, step) draft block in one fused pass.
Returns None when there is no fused implementation, in which case the caller samples the block one step at a time.