vllm.v1.watermarking.spec_decode
¶
Functions:
-
speculative_target_watermark_key–Resolve the resample kernel's Philox key from configuration.
-
watermarked_rejection_sample–Use the target key except at contexts selected for ordinary sampling.
_resolve_watermark_key(watermarker)
¶
Return the Philox recovery key.
Source code in vllm/v1/watermarking/spec_decode.py
speculative_target_watermark_key(watermark_config)
¶
Resolve the resample kernel's Philox key from configuration.
Source code in vllm/v1/watermarking/spec_decode.py
watermarked_rejection_sample(target_logits, draft_logits, draft_sampled, cu_num_logits, pos, idx_mapping, expanded_idx_mapping, expanded_local_pos, temperature, seed, num_speculative_steps, contexts, watermarking, watermarker, watermarking_skip_mask=None, use_fp64=False)
¶
Use the target key except at contexts selected for ordinary sampling.