[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:
co-authored by
Simon Veitner
parent
88f3c601b3
commit
c32495d58f
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user