[watermark] compatibility validation (#56801)

Signed-off-by: Raphael Rialland <raphael.rialland@mistral.ai>
Signed-off-by: Simon Veitner <sveitner@redhat.com>
Co-authored-by: Simon Veitner <sveitner@redhat.com>
This commit is contained in:
Raphaël Rialland
2026-10-05 14:37:13 -04:00
committed by GitHub
co-authored by Simon Veitner
parent 88f3c601b3
commit c32495d58f
45 changed files with 1670 additions and 101 deletions
+8
View File
@@ -443,6 +443,13 @@ class AsyncLLM(EngineClient):
"does not match the EngineCoreRequest.request_id attribute. The "
"latter will be used, and the former will be ignored."
)
request_params = request.params
if isinstance(request_params, SamplingParams):
# This request object is owned by the engine from here on.
self.input_processor.apply_watermarking(
request_params,
self.input_processor.resolve_watermarking(request_params),
)
else:
if isinstance(prompt, dict) and "type" in prompt:
# Rendered EngineInput; no blocking preprocessing needed.
@@ -910,6 +917,7 @@ class AsyncLLM(EngineClient):
sampling_params=SamplingParams(
max_tokens=1,
extra_args={"kv_transfer_params": dict(kv_transfer_params)},
watermarking=False,
),
pooling_params=None,
arrival_time=time.time(),